Skip to content

Add USE search box toggle and form to search widget#196

Open
djanelle-mit wants to merge 5 commits into
masterfrom
use-588
Open

Add USE search box toggle and form to search widget#196
djanelle-mit wants to merge 5 commits into
masterfrom
use-588

Conversation

@djanelle-mit

@djanelle-mit djanelle-mit commented Jun 9, 2026

Copy link
Copy Markdown

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

  • Any theme or plugin whose stylesheets have changed has had its version
    string incremented.

Secrets

  • All new secrets have been added to Pantheon tiers
  • Relevant secrets have been updated in Github Actions
  • All new secrets documented in README

Documentation

  • Project documentation has been updated
  • No documentation changes are needed

Accessibility

  • ANDI or Wave has been run in accordance to
    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

  • Stakeholder approval has been confirmed
  • Stakeholder approval is not needed

Dependencies

YES | NO dependencies are updated

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • The changes have been verified
  • The documentation has been updated or is unnecessary
  • New dependencies are appropriate or there were no changes

@matt-bernhardt matt-bernhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these are minor, but the question about preventSearch is probably the biggest request I have.

  1. 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.

  1. On the smallest screens, I think the UI collapses in a way that gets confusing:
Image
  1. 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we change this template comment to prevent confusion in future cleanup?

@djanelle-mit

Copy link
Copy Markdown
Author

@matt-bernhardt All three points have been updated. Would love your re-review when you get a chance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants