Add USE search box toggle and form to search widget#196
Conversation
matt-bernhardt
left a comment
There was a problem hiding this comment.
Some of these are minor, but the question about preventSearch is probably the biggest request I have.
- I think this PR also needs to include some change to the plugin's javascript, because at the moment it looks like the multidev is allowing submission of an empty search form.
I'm not sure why - I see that we've preserved the same markup as the Bento partial, so the same call to preventSearch() on line 47 of the javascript should still function (and in fact it does work if you call it in the console yourself). It might be that something earlier in the js is failing under USE conditions - there are issues in the console that I haven't dug into yet.
- On the smallest screens, I think the UI collapses in a way that gets confusing:
- The new USE partial should probably have a unique file comment block?
| @@ -0,0 +1,39 @@ | |||
| <?php | |||
| /** | |||
| * The "Alma variant" of the search tab for all content - which will search the Bento app. | |||
There was a problem hiding this comment.
Could we change this template comment to prevent confusion in future cleanup?
|
@matt-bernhardt All three points have been updated. Would love your re-review when you get a chance! |
matt-bernhardt
left a comment
There was a problem hiding this comment.
Thanks for making those changes - this all looks good to me. I'm looking forward to removing the Alma and EDS branches from this plugin (and the responsive tabs plugin, etc etc) once this system launches.
![]()
Developer
To support the launch of Unified Search, we want to introduce a simplified search box to the Wordpress homepage. This new search box removes the tabs and sends the user to USE instead of Bento. Note that this state will only last for a few months until the homepage redesign lands.
This work introduces a new radio button option to change the widget's behavior on launch day.
The radio button changes to a new template that removes the tabs from the search experience and adds our NLS toggle. This toggle is NOT hooked up to anything yet, and will be done via DiscoEng in a future ticket.
The javascript for this plugin was edited. When removing the tabs we introduced a bug with the responsive tabs script, which was looking for markup that no longer exists. We've conditionally added a class back into the markup that was added when the responsive tabs plugin was run to preserve styling.
Stylesheets
string incremented.
Secrets
Documentation
Accessibility
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Stakeholder approval
Dependencies
YES | NO dependencies are updated
Code Reviewer
(not just this pull request message)