Skip to content

[2.x] fix: show and let people cancel an active search from the header - #4909

Merged
imorland merged 2 commits into
2.xfrom
im/search-active-state
Aug 6, 2026
Merged

[2.x] fix: show and let people cancel an active search from the header#4909
imorland merged 2 commits into
2.xfrom
im/search-active-state

Conversation

@imorland

@imorland imorland commented Aug 6, 2026

Copy link
Copy Markdown
Member

Follow-up to #4906, which turned the header search into a button — an active search's query and its clear button were both hidden at header widths, leaving a filtered page with nothing to explain it and no way back outside the modal. Also fixes the drawer collapsing its links into an overflow menu.

Searching happens in a modal, but the results outlive it: people run a
search, close the modal and browse the filtered page. The old text input
carried the query while they did, and replacing it with a button dropped
that — at header widths both the query and the clear button were hidden,
so a filtered page had nothing to explain why it was filtered and no way
back except reopening the modal.

The control now takes the room it needs while a search is active: the
query is shown, with an accented icon following the same signal the
notification bell uses, and the clear button beside it. Clearing already
navigated away from the results; it was only ever unreachable. Nothing
changes while there is no search — the button stays a bare icon.

Also fixes the drawer collapsing its links into an overflow menu. The
guard for "these items are not on one line" tested `flex-direction`,
which computes to `row` on every element whatever its display type, so
it never fired on the drawer's block-level stack. It now tests the
display type, and leaves the count alone while the row measures zero,
which is what a closed drawer does.
@imorland
imorland requested a review from a team as a code owner August 6, 2026 08:26
@imorland imorland added this to the 2.0.0-rc.6 milestone Aug 6, 2026
Clearing an active search shrinks the control from the query it was
showing back to a bare icon, which hands a good ninety pixels back to the
navigation beside it. Nothing noticed: the observer watched the container,
whose width had not changed, so collapsed links stayed in the overflow
menu until the page was reloaded.

The siblings sharing the line are now observed too, so room they give back
is room the row can use again.
@imorland
imorland merged commit f950db8 into 2.x Aug 6, 2026
24 checks passed
@imorland
imorland deleted the im/search-active-state branch August 6, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant