Appearance
Saved searches
Save the filters of a list under a name and apply them again later.
filters-filtersbase--saved-searches-menuOpen in Storybook ↗When to use
- People filter the same list the same way again and again: Awaiting review, Recently edited by me.
- A filter set is worth keeping and finding back by name.
When not to use
- A filter every user needs on a list: make it a default filter of that list instead.
- One-off filtering: just use the filter panel.
Anatomy
Saved searches have three parts:
- Saved searches menu: a labelled overflow menu at the top of the filter panel, under Clear all and Apply filter(s). It holds the actions, the searches used last on this list and All saved searches.
- All saved searches: a dialog that slides in from the right with a full list of saved searches: filters, result count, sorting and one selectable row at a time, confirmed with Confirm selection.
- Applied chip: while the filter panel is closed, the applied search shows beside the Filters button as a chip (
--chip-padding,--radius-chip) with its title, a dot when it has changed and a ✕.
The menu only shows to signed-in users, on lists where saved searches are turned on.
Variants
| Menu item | What it does | Available |
|---|---|---|
| Save changes | stores the current filters in the applied search | a search is applied |
| Save as new | opens a form to save the current filters as a new search | filters are active or a search is applied |
| Edit label | opens the applied search's own page | a search is applied |
| Delete | asks for confirmation, then deletes the applied search | a search is applied |
| Recent searches | applies that search; the applied one is highlighted | up to five, per list |
| All saved searches | opens the dialog with every saved search | always |
modals-savedsearches--pickerOpen in Storybook ↗States
| State | What you see | Trigger |
|---|---|---|
| None applied | the menu's first four items are disabled, unless filters are active (Save as new) | — |
| Applied | the search's filters are set and the list updates; highlighted in the menu; chip beside Filters when the panel is closed | picking a search |
| Modified | a dot after the chip's title | changing the filters after applying a search |
| Removed | chip gone, all filters cleared | ✕ on the chip, or deleting the search |
filters-filterstoggle--statesOpen in Storybook ↗Applying a search replaces the current filters and applies them at once. Save changes and Delete confirm with a notification.
Keyboard & accessibility
- The menu follows the overflow menu: Enter, Space or ↓ opens it, ↑ and ↓ move, Escape closes it. Disabled items stay focusable and are marked
aria-disabled. - The chip is a button named Saved search: {name}, remove. The modified dot is hidden from assistive technology.
- The dialog follows the modal; its rows use the list's checkboxes.
Content
- Name a search after what it finds, not after who made it: Fantasy without a cover image.
- Translation keys:
saved-searches.*.