Automattic / Automattic/jetpack

Search: Applied Filters should persist in UI even if no matching docs

Open
#8,716 2 comments 0 reactions 0 assignees View on GitHub
[Feature] Search [Status] Design Review Complete Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

If you search and then apply some filters, those filters should persist in the UI even if a subsequent search does not match the filter anymore. Consider:

- Search for term X
- Apply filter Y
- You have one post matching
- Then change the search term so that no posts match
- The filter Y is still applied, but is not displayed because nothing is matching it. If the user removed it then some other posts may match.

This sorta leads to the user ending up in a UI deadend. The root of the problem is that the filters we display are entirely based off of what was returned from the API. We should also include any filters that have already been applied.

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named in the issue. Start by tracing the search-results filter UI and the API-derived filter list; done means an applied filter remains visible after changing the term to a query with no matches, while removing it can restore other results.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, react
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.