-
Notifications
You must be signed in to change notification settings - Fork 159
[APP-538] feat: canvas default filter support #8391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
See Figma here. |
|
@briangregoryholmes : Is this ready for review ? Still on track for the release next week? |
AdityaHegde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit too large for a 100% review. Approving this as a 90% review.
ericokuma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UX looks good to me
This branch is functional, but we might need further iteration. |
|
Looks good @briangregoryholmes |
|
Great job everyone! |
* wip * wip * cleanup and qa * rudimentary pinning UI and cleanup * wip measure support * pinning fixes * hide no filters added when adding a temporary filter * show measure pills in default filters sidebar * reorg * cleanup * initial measure apply fix * display labels instead of ids * add saved as default state * remove import * add pinning to measures, update designs * resolve issue with filters opening after apply * design update * gofumpt * revert * sorting * default bug fixes * save as default button states * quality checks * feedback and qa * delete file * quality check fix * save as default when no time range param present in url fix * remove import * bug fixes and qa * fix: save default state button incorporates pinned state * remove log * cleanup * remove logs * remove logs * rework sorting * temp bug fix * embed bug fixes, qa and cleanup * remove comment * move constructor * comment * remove unused function * remove imports * test fix * revert temporary change * bookmarks test fixes * quality check * test fixes * remove logs * unused variable * test fixes * filter opening fix * remove file * rework subscriber * test fixes and rework * test fix * time control refactor * remove comment * revert package-lock changes * embed test fix * test fix * test fixes * test fixes * remove log * cleanup * remove logs * test and feedback changes * feedback and fixes * refactor init * fix for turning off filter bar * metricssql support first pass * cleanup and feedback * test fix * remove unused import * test fixes * test fixes and cleanup * test fix * test fix attempt * rework init of dimension filter component * remove remaining _ prefixed stores * flatten api returned expressions * remove function input * add rudimentary tests * add test * update default ranges * store pinned state locally on dropdown before applying * support canvases with no time dimension * uncomment components and remove log * change first day of week function to check for time dimension * support metrics sql templating in markdown * type fix * cleanup * refine comment * variable name * remove unused property * rename API * format
* wip * wip * cleanup and qa * rudimentary pinning UI and cleanup * wip measure support * pinning fixes * hide no filters added when adding a temporary filter * show measure pills in default filters sidebar * reorg * cleanup * initial measure apply fix * display labels instead of ids * add saved as default state * remove import * add pinning to measures, update designs * resolve issue with filters opening after apply * design update * gofumpt * revert * sorting * default bug fixes * save as default button states * quality checks * feedback and qa * delete file * quality check fix * save as default when no time range param present in url fix * remove import * bug fixes and qa * fix: save default state button incorporates pinned state * remove log * cleanup * remove logs * remove logs * rework sorting * temp bug fix * embed bug fixes, qa and cleanup * remove comment * move constructor * comment * remove unused function * remove imports * test fix * revert temporary change * bookmarks test fixes * quality check * test fixes * remove logs * unused variable * test fixes * filter opening fix * remove file * rework subscriber * test fixes and rework * test fix * time control refactor * remove comment * revert package-lock changes * embed test fix * test fix * test fixes * test fixes * remove log * cleanup * remove logs * test and feedback changes * feedback and fixes * refactor init * fix for turning off filter bar * metricssql support first pass * cleanup and feedback * test fix * remove unused import * test fixes * test fixes and cleanup * test fix * test fix attempt * rework init of dimension filter component * remove remaining _ prefixed stores * flatten api returned expressions * remove function input * add rudimentary tests * add test * update default ranges * store pinned state locally on dropdown before applying * support canvases with no time dimension * uncomment components and remove log * change first day of week function to check for time dimension * support metrics sql templating in markdown * type fix * cleanup * refine comment * variable name * remove unused property * rename API * format

This PR adds support for specifying default time, dimension and measure filters when loading a Canvas dashboard for the first time. When using the builder surface in Rill Developer, the workspace provides a quick way to save the currently selected filters as default, which propagate to the YAML as metrics SQL statements:
To support the use of multiple metrics views across a single canvas, these metrics SQL filters are keyed with the name of the underlying metrics view.
FilterStateclassFilterStateclasses happens through the newFilterManagerf.{{metrics_view_name}}FilterStateclass has actions on it that allow for filter state manipulationFilterManagerclass has proxies for these functions to call them across multipleFilterStateclassesCanvasProvidercomponent no matter where a Canvas is renderedFilterStateclass (and to the URL) independently, though the actual URL navigation is batched for each user actiononUrlChangefunction as well as updated getters and setters incanvas/state-managers.tsRuntimeProviderfor embeds, sets the runtime in the topmost layout load function insteadTimeManagerandTimeStateclassesOutstanding items:
Checklist:
Note
Adds per-metrics-view canvas filtering with pinning and saved defaults, updates URL/schema and parser, refactors initialization/embeds, and introduces new UI to manage and display default/pinned filters.
FilterManagerandMetricsViewFilterwith consolidated UI/state.f.{metrics_view}) and batching of navigation.CanvasSpecwithpinned_filters;CanvasPresetwithfilter_expr; updates Swagger/TS/Go protobufs.filters.pinnedanddefaults.filtersfrom YAML.handleCanvasStoreInitializationandonUrlChange; removesRuntimeProviderfor embeds; sets runtime in layout.SaveDefaultsButton, default filters display; enhancedChip(pin/gray), filter buttons/chips; time/comparison tweaks.Filtersclass; updates bookmark handling and tests to new comparison/filters.Written by Cursor Bugbot for commit defa8bf. This will update automatically on new commits. Configure here.