Background:
As a part of making working with templates in Visual Editor easier, we will change the way in which parameters can be discovered, added and removed from a template invocation.
Requirements
- Implement behind a feature flag with:
- Add a search field beneath the template name, when the template has parameters using OOUI SearchInputWidget (type=search). Placeholder text: "Find field"
- Hide search field for templates without parameters.
- Wire any content changes to update our search index.
- When search term is entered, filter parameters within that template and show results using the same criteria in the current search (under Add more information dropdown). Show results essentially means to hide all non-relevant parameters from the sidebar. Note: current search on test instance is not displaying correct results, including when the exact label of parameter is typed. Needs de-bugging.
- Filter applies only to the parameter list in the sidebar, not to the template content on the right-hand side (all currently selected parameters should remain visible, not just those included after the filter).
- If no matching parameters are found, display text: "No matches found."
- When multiple templates/content exists, filter only within a single template. Do not hide the other templates/content.
Mocks
Related tickets:
- Prototyping tickets: T263474: VE Dialog on Test Instance: Search for parameters within a template