Add a SearchControl component and reuse accross the UI#32935
Add a SearchControl component and reuse accross the UI#32935youknowriad merged 6 commits intotrunkfrom
Conversation
|
Size Change: -212 B (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
sarayourfriend
left a comment
There was a problem hiding this comment.
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
*Controlcomponents. I think we can still push it further by reusingBaseControland providinghelp,hideLabelFromVisionprops support and things like that.Testing instructions