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

Sectioned select and select_multiple #74

Open
petereon opened this issue Sep 15, 2023 · 3 comments
Open

Sectioned select and select_multiple #74

petereon opened this issue Sep 15, 2023 · 3 comments

Comments

@petereon
Copy link
Owner

select and select_multiple should be able to section the options in the multiple sections. To provide sections Dict[str, List[str]] would be passed as an options argument, such that the keys are section names and values are lists of options to be presented in that section. This bring into the questions of how the preprocessing of the options will work having passed a Dict rather than a List.

@yfernandes-uturn
Copy link

Hello! I recently started using beaupy and felt the need for a title for both select and select_multiple. The documentation suggests using a regular print, but for an application with different data inputs, it looked odd since the prompts would display questions that disappeared once the user confirmed their answer, but the selects didn’t. I went ahead and created a fork and implemented this. I know it's not quite the same idea as this issue, but if you find it useful, I can open a PR. Here's the comparison link: master...yfernandes-uturn:beaupy:feature/title-for-selects

@petereon
Copy link
Owner Author

This definitely sounds useful and is a very welcome change, please feel free to open a PR.

@petereon
Copy link
Owner Author

petereon commented Sep 27, 2023

@yfernandes-uturn Including a comment on another PR related to this feature as a reference: #72 (comment)

Feel free to diverge from whatever I have described there, but please don't rely on specific string formatting (as in #72) or some sort of numeric indexing (as cutie) as such things lack transparency for the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants