-
Notifications
You must be signed in to change notification settings - Fork 37
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
Block theme: Allowing users to clear the search form and submit. #673
Comments
I've added the "All" link which clears the search by bringing you back out to the archives page, in #669. It doesn't make sense to me to search for an empty string to get back to the full archives, so I think what we've got on Patterns now makes more sense. |
I'm not sure it's clear that in order to clear my search while on the "All" category, I need to click on "All" again. Thinking about this use case:
How would this user know that they need to click "all" to remove their keyword? EDIT: I recognize they can move back through the breadcrumbs. |
Just noting that we have this issue everywhere we use the Core Search block: Developer Resources, Developer Blog, Showcase, etc. 😅 That said, I think it feels more awkward here due to the categories. |
Considering this is a core block, and we would probably want the same behavior everywhere, this should either be addressed in core or in wporg-mu-plugins. However, it seems to be very intentional that the search form does not submit when empty.
Also, empty-search results don't really work by default (for example, this still uses the search result template). So I don't think this would gain any traction in core. If we decide the wporg case is different, then this should be moved over to wporg-mu-plugins so it applies across the site. |
Yeah, I understand the situation where you have already searched for something and now want to clear your search. The current setup makes this a bit difficult. On the current Plugins site, searching for an empty string takes you back to the homepage, which I don't think would work (or be intuitive) in all search bar implementations across WordPress.org. Also if you have not already searched, I don't feel like you should be able to search for an empty string. |
Describe the bug
We currently submit the page to apply filters and/or reset states. However, the search bar currently includes the
required
attribute which makes it impossible to clear the search term directly. I think we should remove that attribute which gives users the ability to clear their search term.I did this for the wp.org/plugins theme and think we should do it here.
Problem
The text was updated successfully, but these errors were encountered: