-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add a SearchControl component and reuse accross the UI #32935
Conversation
Size Change: -212 B (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
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.
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.
I think converting this to use BaseControl is a good idea.
Not sure about wordpress/i18n
it may be an inextricable dependency of components
🤷
What do you think about adding some tests for this component?
04c946a
to
759bc9c
Compare
Add the BaseControl usage to the component, which means now, it supports help and hideLabelFromVision (which I made true by default for this control, it seemed like a better default for a Search control) |
I could use some help here with the react native failures @mchowning @geriux |
Sure! I'll check it out 👍 |
@youknowriad 👋 it is currently failing because of the missing Adding that file with the styles fixes the issue. |
@geriux Thanks for the hint, I think I fixed it (moved the styles from the inserter native style to the search control one), let's see what the tests say. |
5bffc52
to
11c7322
Compare
e1a97b5
to
fc6accc
Compare
69f49cc
to
5bc8bb7
Compare
Builds on top of #32922
The need for a reusable search control UI component became clear over time. It's now being used in three places: Inserter, Block Manager and Template Part placeholder state.
I tried to make its API close to all the other
*Control
components. I think we can still push it further by reusingBaseControl
and providinghelp
,hideLabelFromVision
props support and things like that.Testing instructions