Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend OptionList so that an option's prompt can be replaced in some way #2603

Closed
davep opened this issue May 18, 2023 · 4 comments · Fixed by #2985
Closed

Extend OptionList so that an option's prompt can be replaced in some way #2603

davep opened this issue May 18, 2023 · 4 comments · Fixed by #2985
Assignees
Labels
enhancement New feature or request Task

Comments

@davep
Copy link
Contributor

davep commented May 18, 2023

In support of #2518 the OptionList widget should have a method that allows for the replacement of an option's prompt, or at the very least the swapping out of one option for another.

@davep davep added enhancement New feature or request Task labels May 18, 2023
@davep davep assigned davep and unassigned davep May 18, 2023
@davep
Copy link
Contributor Author

davep commented May 19, 2023

Moving this back to backlog as, while it's a good idea, I think, it's far less critical now given that I've taken the multi-select widget in a slightly different direction when it comes to managing the changing of the options.

@rodrigogiraoserrao
Copy link
Contributor

(This issue is reserved for the EuroPython 2023 sprint. If you are not participating in the sprint, please refrain from working on this issue. Thanks!)

The OptionList widget should grow a (couple of) method(s) to allow replacing prompts, like Dave mentions above.
Take a look at the methods that OptionList already implements to deal with prompts and notice many come in pairs.

Think about the following:

  • What makes more sense? Creating a rename_prompt method or a replace_prompt? Or both?
  • Should you create the method above and a _at_index variation, or just one of the two?

Good luck and have fun!

@nekeal
Copy link
Contributor

nekeal commented Jul 22, 2023

I'd like to work on this one if it's still available;D 🚀

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants