pattern-directory icon indicating copy to clipboard operation
pattern-directory copied to clipboard

Block theme: Keep search term when changing categories.

Open StevenDufresne opened this issue 1 year ago • 4 comments

Describe the bug We don't persist the search term when you change categories. Adding a keyword is a deliberate action that should persist until the user makes the deliberate action to remove it (which I logged an issue for here https://github.com/WordPress/pattern-directory/issues/673).

Reproduce Steps to reproduce the behavior:

  1. Go to wp.org/patterns/
  2. Click on "Footers"
  3. Search for "copyright"
  4. Click "All"
  5. Notice the search keyword is no longer applied.

Expected After clicking "All", I should still be filtering based on the search term.

StevenDufresne avatar Apr 16 '24 23:04 StevenDufresne

That's the expected behavior, because you navigate top-down, the filters apply in that order— so you can search within a category or filter within a category or search, but clicking a different category goes back to the "top of the funnel". This pattern was established with Showcase.

ryelle avatar Apr 16 '24 23:04 ryelle

Thinking back, I may have brought this up then as well. 😄

I feel like this needs hands-on user testing. I'll try to find some users to test the showcase and report back.

StevenDufresne avatar Apr 17 '24 04:04 StevenDufresne

I agree, the flow makes sense. Search context is a search results page.

alexstine avatar Apr 17 '24 22:04 alexstine

If we don't think this is a legitimate concern, should we at least update the breadcrumb to reflect that context?

Currently when I search it goes from:

All Patterns \ Text

to

All Patterns \ Search Results 

Suggestion

All Patterns \ Text

to

All Patterns \ Text \ Search Results

StevenDufresne avatar Apr 18 '24 04:04 StevenDufresne