[2.x] fix: show and let people cancel an active search from the header - #4909
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.