Repository navigation
fix: advanced filters could not be cleared from the filter bar - #9989
Merged
Merged
Conversation
A filter the chips cannot show (a top level OR, an operator without a chip mode, or the same dimension filtered twice) rendered only the read only "Advanced (BETA)" pill. The unified filter bar kept the Clear filters button inside the chip branch, the pill had no remove control, and `ExpressionFilterManager.clear()` never reset `isComplexFilter`. The explore session store then restored the filter on every reload of an empty url, so the only way out was clearing sessionStorage by hand. The pill gets a remove button, Clear filters renders for advanced filters in the filter bar and the canvas inspector, and clearing resets the complex flag.
k-anshul
approved these changes
Oct 7, 2026
nishantmonu51
added a commit
that referenced
this pull request
Oct 7, 2026
A filter the chips cannot show (a top level OR, an operator without a chip mode, or the same dimension filtered twice) rendered only the read only "Advanced (BETA)" pill. The unified filter bar kept the Clear filters button inside the chip branch, the pill had no remove control, and `ExpressionFilterManager.clear()` never reset `isComplexFilter`. The explore session store then restored the filter on every reload of an empty url, so the only way out was clearing sessionStorage by hand. The pill gets a remove button, Clear filters renders for advanced filters in the filter bar and the canvas inspector, and clearing resets the complex flag.
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.
A filter the chips cannot represent (a top level
OR, an operator without a chip mode, or the same dimension filtered twice) left the filter bar with only the read-only "Advanced (BETA)" pill and no way to remove it. Regression from #9746, where the "Clear filters" button moved inside the chip branch.ExpressionFilters.svelte: "Clear filters" renders for an advanced filter too. It is gated onisComplexFilterrather than on the pill, since a param the chips cannot show may parse to no pill at all. The Add filter button stays hidden while the pill is shown.AdvancedFilter.svelte: migrated to runes and given an optionalonRemove, rendered as a remove button next to the pill. The filter bar and the canvas inspector passexpressionFilterManager.clear(); read-only surfaces leave it unset.ExpressionFilterManager.clear()resetsisComplexFilter. The navigation after a clear does not parse the params again, so without this the bar stayed empty with no Add filter button.VerticalExpressionFilters.svelte(canvas inspector) gates its Clear button on the flag as well, since a pureORhas no top-level chip managers.filter_advanced_removemessage in both locales.Tooltip.Providerthe pill needs), and a Playwright test that clears the filter from a shared URL and reloads.The sessionStorage restore for an empty explore URL is unchanged: the cleared state is what gets persisted now, so a reload stays clean.
Steps to reproduce
/explore/AdBids_metrics_explore?f=publisher IN ('Facebook') OR domain IN ('google.com').Closes ENG-1136
Checklist: