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

SearchControl: Deprecate onClose prop #65334

Open
mirka opened this issue Sep 13, 2024 · 1 comment
Open

SearchControl: Deprecate onClose prop #65334

mirka opened this issue Sep 13, 2024 · 1 comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality

Comments

@mirka
Copy link
Member

mirka commented Sep 13, 2024

What problem does this address?

The onClose prop is not used anymore in the Gutenberg app. It was originally intended to render a close button to "trigger your own logic to close the search field entirely, rather than just clearing the input value."

The prop itself is causing confusion to consumers (#64921), and I think the UI pattern of a single button that doubles as a reset and a close is questionable from a UX standpoint.

What is your proposed solution?

I think we can soft deprecate the feature. For consumers that really want to maintain the original behavior, however unrecommended, we can issue guidance to use the suffix prop.

@mirka mirka added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Sep 13, 2024
@ciampo
Copy link
Contributor

ciampo commented Sep 20, 2024

we can issue guidance to use the suffix prop.

Agreed. We could add a dedicated Storybook example too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

2 participants