Open petereon opened 9 months ago
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: https://github.com/petereon/beaupy/compare/master...yfernandes-uturn:beaupy:feature/title-for-selects
This definitely sounds useful and is a very welcome change, please feel free to open a PR.
@yfernandes-uturn Including a comment on another PR related to this feature as a reference: https://github.com/petereon/beaupy/pull/72#issuecomment-1721176046
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.
select
andselect_multiple
should be able to section the options in the multiple sections. To provide sectionsDict[str, List[str]]
would be passed as anoptions
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 aDict
rather than aList
.