feat(dashboard): chart customizations modal and plugins
User description
SUMMARY
- Adds Chart Customizations to the "Edit filters" modal. Time Grain and Time Column moved from Filters to the Chart Customizations. Chart Customizations can now be added using plugins just like Filters. Continuation of #33831.
- Add deck.gl Layer Visibility chart customization - allows for hiding layers in Multi Layer Deck.gl Chart
Requirements for chart customizations: Replace current structure (separate "Add filter" / "Add customization" / "Add divider" buttons) With: Single dropdown button
- Button label: "+ New" (secondary button)
- Dropdown options:
- Filter
- Customization
- Divider
Add collapsible sections (like dataset folders in Explore):
Section 1: Filters
- Contains all filter items
- User can reorder items within this section only
Section 2: Customization
- Contains all customization controls:
- Dynamic group by
- Time column
- Time grain
- Hide layers (deck.gl)
User can reorder items within this section only Important constraint: Customization controls cannot be moved to Filters section and vice versa
Requirements for Deck.gl Layer Visibility customization: BY DEFAULT IT’S A MULTISELECT
- Functions as an inverse selection filter with multiselect field
- By default, all available layers from deck.gl charts are displayed
- User selects layers to exclude from charts
- Shows tooltip on hover always for this typeomization settings)
- Applies to all deck.gl Multiple Layer charts in the dashboard
Design and requirements for reordering layers:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
CodeAnt-AI Description
Unify configuration: edit filters and chart customizations in one modal and persist changes
What Changed
- The Filters modal is redesigned to include two collapsible sections (Filters and Customization) with a sidebar and content pane so you can add and edit chart customizations (dynamic group by, time grain, deck.gl layer visibility) alongside native filters in the same place.
- Chart customizations are rendered in the filter bar as filter-like controls (cards) — selecting a column or value updates a pending customization state, shows loading/errors while loading dataset columns, and can be required; these pending customization changes are applied together with filters when you click Apply.
- Apply now persists pending chart customization changes to the dashboard and triggers chart updates; Clear All resets customization selections and can clear saved customization columns/data masks.
- Deck.gl layer visibility is supported as a chart customization and the query schema includes visible_deckgl_layers so multi-layer deck.gl charts respect hidden layers chosen in customization.
Impact
✅ Configure filters and chart customizations from one modal
✅ Persist chart customization changes when applying filters
✅ Hide layers in multi-layer deck.gl charts from dashboard
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
@codeant-ai ask: Your question here
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
@codeant-ai ask: Can you suggest a safer alternative to storing this secret?
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
@codeant-ai: Your feedback here
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
@codeant-ai: Do not flag unused imports.
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
@codeant-ai: review
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Korbit doesn't automatically review large (3000+ lines changed) pull requests such as this one. If you want me to review anyway, use /korbit-review.
Bito Automatic Review Skipped - Large PR
Bito didn't auto-review this change because the pull request exceeded the line limit. No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
Codecov Report
:x: Patch coverage is 82.08955% with 12 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 68.19%. Comparing base (1127374) to head (b1dd85a).
:warning: Report is 154 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| superset/dashboards/api.py | 66.66% | 9 Missing :warning: |
| superset/daos/dashboard.py | 88.88% | 1 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #36062 +/- ##
===========================================
+ Coverage 0 68.19% +68.19%
===========================================
Files 0 638 +638
Lines 0 47208 +47208
Branches 0 5090 +5090
===========================================
+ Hits 0 32193 +32193
- Misses 0 13743 +13743
- Partials 0 1272 +1272
| Flag | Coverage Δ | |
|---|---|---|
| hive | 43.69% <28.35%> (?) |
|
| mysql | 67.07% <82.08%> (?) |
|
| postgres | 67.12% <82.08%> (?) |
|
| presto | 47.33% <28.35%> (?) |
|
| python | 67.98% <82.08%> (?) |
|
| sqlite | 66.83% <82.08%> (?) |
|
| superset-extensions-cli | 94.90% <ø> (?) |
|
| unit | 100.00% <ø> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
🎪 Showtime deployed environment on GHA for c5d95c4
• Environment: http://52.33.173.36:8080 (admin/admin) • Lifetime: 48h auto-cleanup • Updates: New commits create fresh environments automatically
-
Can't scroll down this panel
-
Clear all button in the filter bar doesn't clear customizations
-
There are 2 menu items that do the same thing - "Add or edit filters" and "Chart customizations". I think if we want to have 2 separate buttons, then clicking "Chart customization" should automatically focus the first customization in filters modal, not the first filter
-
Default value doesn't seem to work - it doesn't appear when I save the config like it does for filters
-
The description icon shouldn't be displayed in the popover
-
I created a filter with scoping like in the screenshot, but when I hover over it, all charts are greyed out as if they're not in scope. Not sure how I triggered it, because it started working again after refreshing the page
-
Is there a difference between Time column and Time grain in Filters and Chart customizations?
-
Grouping applied via Chart customization doesn't carry over to Explore like it does for filters
-
Dataset is sometimes not picked up by chart customization item even though it's set in the config, and the dataset is definitely available for charts and filters
-
Not sure if sorting is working - I don't see any difference when I enable it
-
It looks like sometimes the chart customization is not applied - here I set group by city, but the charts in scope were not affected (they were affected correctly when I was testing a few minutes ago)
Also if chart customizations should be displayed in filter's badge of the affected charts
🎪 Showtime deployed environment on GHA for edfb454
• Environment: http://35.95.40.211:8080 (admin/admin) • Lifetime: 48h auto-cleanup • Updates: New commits create fresh environments automatically
🎪 Showtime deployed environment on GHA for edfb454
• Environment: http://44.247.100.146:8080 (admin/admin) • Lifetime: 48h auto-cleanup • Updates: New commits create fresh environments automatically
New set of comments after the latest changes - tested on this dashboard http://44.247.100.146:8080/superset/dashboard/8/?native_filters_key=TdTDjneR_ko
- When I do the following: set 1 native filter and a customization, go to a chart from the dashboard, go back to the dashboard, all native filters except for the one that I set are now out of scope (they shouldn't be)
-
Chart customizations set on the dashboard don't appear in Explore when I click on a chart (filters appear so I guess customizations should too?)
-
It looks a bit weird that chart customizations are below filters out of scope. Perhaps the order should be filters, customizations, and then out of scope?
- Should we also have chart customizations out of scope section?
-
When chart customization's scope is set even to 1 chart, we send requests for all charts when a value is set. In case of filters, if only 1 chart is in scope, we only send 1 request
-
Default value is not working correctly - when I open a dashboard which has customization with default value set, that value appears in the filter bar, but is not actually applied to the dashboard
-
When I hover over the chart customization's title, it's highlighted and cursor changes to pointer, even though the title is not clickable
-
Something's wrong with scoping - even though I set the scope to 1 chart, more are highlighted when I hover over the customization field. Moreover, all charts have that customization icon, but it doesn't look like they were actually affected by it. EDIT: apparently some stuff is not refreshing correctly after editing the customizations, it's working fine after refreshing the dashboard
-
Setting sorting still doesn't seem to do anything for me :( (or I don't know what to look for)
🎪 Showtime deployed environment on GHA for edfb454
• Environment: http://35.86.247.51:8080 (admin/admin) • Lifetime: 48h auto-cleanup • Updates: New commits create fresh environments automatically
CodeAnt AI is reviewing your PR.
CodeAnt AI is running Incremental review
CodeAnt AI is running Incremental review
🎪 Showtime deployed environment on GHA for 5e6d2bf
• Environment: http://52.43.125.6:8080 (admin/admin) • Lifetime: 48h auto-cleanup • Updates: New commits create fresh environments automatically
⚠️ DEPRECATED WORKFLOW ⚠️
@kgabryje This workflow is deprecated! Please use the new Superset Showtime system instead:
- Replace "testenv-up" label with "🎪 trigger-start"
- Better reliability and easier management
- See https://github.com/mistercrunch/superset-showtime for details
Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments
@kgabryje Ephemeral environment spinning up at http://34.215.6.235:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.
CodeAnt AI is running Incremental review
CodeAnt AI is running Incremental review
CodeAnt AI is running Incremental review