refac: unified expression filter component across explore, canvas, alerts and reports - #9746
Open
AdityaHegde wants to merge 28 commits into
Open
refac: unified expression filter component across explore, canvas, alerts and reports#9746AdityaHegde wants to merge 28 commits into
AdityaHegde wants to merge 28 commits into
Conversation
AdityaHegde
force-pushed
the
refac/unified-filter-component
branch
from
August 10, 2026 14:20
fb87403 to
0e9eb72
Compare
AdityaHegde
force-pushed
the
refac/unified-filter-component
branch
from
August 11, 2026 12:57
21c97f9 to
cc9c8e9
Compare
AdityaHegde
marked this pull request as ready for review
August 19, 2026 06:18
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.
We have 3 different filter implementation across explore, canvas, alerts and reports with action code like toggling dimension value duplicated. This PR unifies expression filters components.
ExpressionFilter.svelteacts as the unified filter component that takes aExpressionFilterManager.ExpressionFilterManagercontainsMetricsViewFilterManagerper configured metrics views. It also has the full list ofDimensionFilterManager/MeasureFilterManageracross metrics views, deduped by name. Takes all the filters fromMetricsViewFilterManagerand creates a sorted list for default filters bar, required first, followed by pinned, followed by dimension and finally measure filters.MetricsViewFilterManageris a wrapper per joiner. For existing filter bar it is always anANDjoiner. Future PR will support more advanced editing likeORfilter and nestedAND/OR. Ensures pinned/required filters have an entry. Also handles adding new dimension/measure filter.DimensionFilterManagerencapsulates all actions for a dimension filter. This code was spread out in different places. Along withDimensionFilter.svelteit handles everything for a dimension filter.MeasureFilterManagerencapsulates all actions for a measure filter. Along withMeasureFilter.svelteit handles everything for a measure filter.MetricsViewsProvider. All dimension and measure selectors are come from here.YAMLConfigProviderthat provide config that is yaml only and not maintained as a state while rendering dashboard. Currently this has required/pinned filters.DashboardConfigProviderfor quickly buildingExploreDashboardConfigProviderorCanvasDashboardConfigProvider.For explore,
ExpressionFilterManagertoStateManagers.ExpressionFilter.sveltepassing it theExpressionFilterManagerfromStateManagers.ExpressionFilterManagerdirectly.For canvas,
ExpressionFilterManagertoCanvasEntity.ExpressionFilterManager.timeAndFilterStorebut uses data from parent'sExpressionFilterManagerfor expression related fields.There will be a follow up to move time controls as well.
Checklist: