Skip to content

fix(input_select): Decouple input_select() and input_selectize() #1947

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

ErdaradunGaztea
Copy link

Fixes #1687

This PR follows the suggestions made in the issue and repurposes current input_select() implementation as _input_select_impl(). The new input_select() keeps the same signature but raises deprecation warnings upon using any of the three Selectize-related parameters.

Additionally, passing anything that's not a string (i.e. a HTML tag or None) as an option label raises another deprecation warning. The final goal would be to replace _Choices = Mapping[str, TagChild] with _Choices = Mapping[str, str], but I guess that comes after a period of deprecation.


It's my first PR to this project, so if I missed some important part of the PR process, please let me know.

Copy link
Collaborator

@schloerke schloerke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's my first PR to this project

Thank you for your PRs!

Please be sure to add an entry in the CHANGELOG.md file linking to your PR. (Related example)

@schloerke
Copy link
Collaborator

The app test failing in https://github.com/posit-dev/py-shiny/actions/runs/14320952734/job/40142214665?pr=1947#step:5:1519 is due to a change in this PR.

pytest ./tests/playwright/ai_generated_apps/bookmark/input_select

Please update the test app or fix the helper method. Thank you!

@ErdaradunGaztea
Copy link
Author

The app test failing in https://github.com/posit-dev/py-shiny/actions/runs/14320952734/job/40142214665?pr=1947#step:5:1519 is due to a change in this PR.

pytest ./tests/playwright/ai_generated_apps/bookmark/input_select

Please update the test app or fix the helper method. Thank you!

I made a mistake in the code, that's why it wasn't passing; fixed that. I've addressed all your other points, too. Please tell me if the updated approach with the DEPRECATED sentinel is how you do it, because there aren't any examples in the code to compare to (navbar_options_resolve_deprecated() is the only one).

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

Successfully merging this pull request may close these issues.

[bug]: ui.input_select() and ui.input_selectize()'s interfaces should be de-coupled
2 participants