Skip to content

Conversation

@ErdaradunGaztea
Copy link
Contributor

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
Contributor 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).

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.

Thank you for your PR!

@schloerke schloerke enabled auto-merge (squash) April 29, 2025 18:12
@schloerke schloerke merged commit 5cb608f into posit-dev:main Apr 29, 2025
54 checks passed
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