-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feature: Add Title Property to select and select_multiple Inputs #76
Feature: Add Title Property to select and select_multiple Inputs #76
Conversation
feat: add title also on single select
Working on the tests |
@petereon tests and lint running successfully now. Changes:
|
@yfernandes-uturn thank you very much and apologies for the delay, I've been busy with work. I am going to review now. |
Don't worry @petereon! Just want to make it as smooth as possible for you to review and incorporate this into your awesome lib :) |
@@ -231,6 +231,7 @@ def prompt( | |||
|
|||
def select( | |||
options: List[Union[Tuple[int, ...], str]], | |||
title: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As is, this constitutes a breaking change as anyone using beaupy
without named parameters and relying on argument order would encounter issues.
We could avoid a breaking change if the title
was made the last parameter, but that's a not very natural place for it to be. I am not sure if it is worth a breaking change and associated major-version bump. Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, I am not against breaking changes and I think this one might be worthwhile. If you agree, I am going to branch out master into a new branch for the 4.0.0
version, as there are more things I want to wiggle around in the API and we should make the pull request against said new branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I definitely agree that although essential, it's a too small feature for a major bump, and that the natural place for it would be one of the first args. I'd say it could stay on hold in a "staging" branch, and be released along with other changes on a next major bump. I can help by working on the original purpose of #74 and other issues too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or it could maybe be released as b0 of next major version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great! I've made a staging branch for eventual v4
, staging/v4.0. Could you please move this pull request to that branch?
As for the other issues, I will gladly accept contributions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Just moved it. And count on me for further contributions 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed the type of title is wrong in the comments, will update it quickly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅
Thanks, merged! |
This PR introduces a new
title
property for bothselect
andselect_multiple
input types.Changes:
title
property toselect
andselect_multiple
inputs.Motivation:
The
prompt
input inbeaupy
offers an interactive way for users to input data, where the question disappears upon confirmation. This PR brings theselect
andselect_multiple
inputs in line with this behavior, making the user experience more consistent and intuitive.Please review the changes and provide feedback. Looking forward to integrating this enhancement to improve the user interaction in
beaupy
.