Skip to content

feat(deck-multi): migrate deck_multi chart to the v1 chart data API - #41730

Merged
rusackas merged 2 commits into
remove-legacy-viz-pipelinefrom
legacy-viz-t4-deck-multi
Jul 3, 2026
Merged

feat(deck-multi): migrate deck_multi chart to the v1 chart data API#41730
rusackas merged 2 commits into
remove-legacy-viz-pipelinefrom
legacy-viz-t4-deck-multi

Conversation

@rusackas

@rusackas rusackas commented Jul 3, 2026

Copy link
Copy Markdown
Member

SUMMARY

Tier 4 of #41714 (targets remove-legacy-viz-pipeline): migrate deck.gl Multiple Layers (deck_multi) off explore_json — the last useLegacyApi chart, and the last holdout in the deck.gl preset migration.

deck_multi depended on explore_json twice: the container query (whose viz.py class fetched every sub-slice server-side just to hand back metadata and merged features) and each per-layer data fetch. Both move client-side:

  • New Multi/buildQuery.ts returns an empty queries list — the legacy DeckGLMultiLayer.query_obj was empty too; a new backend unit test pins that ChartDataQueryContextSchema accepts that shape.
  • Multi.tsx fetches sub-slice metadata via GET /api/v1/chart/<id> (bounded by deck_slices), and loads each layer through its own registered buildQueryPOST /api/v1/chart/data → registered transformProps, whose output payload is exactly what the layer generators consume. Legacy container payloads (cached) still short-circuit the metadata fetch.
  • Layer-scoped dashboard filtering (layer_filter_scope/filter_data_mapping), dashboardId and parent_slice_id propagation are unchanged — tests updated to assert them on the v1 POST payloads.
  • Known minor behavior notes: initial autozoom falls back to the saved viewport when no pre-merged container features exist (bounds previously came from the container payload), and dashboard filter badges no longer aggregate child-layer applied-filter metadata (the legacy container merged it server-side).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

No visual change in layer rendering; see autozoom note above.

TESTING INSTRUCTIONS

  • npm run test -- plugins/preset-chart-deckgl/src/Multi — 30 tests pass (layer loading via registries, dashboardId/parent_slice_id propagation on POST payloads, layer visibility filtering, viewport handling).
  • pytest tests/unit_tests/charts/data/test_empty_query_context.py — empty-queries context accepted.
  • Manual: open a saved deck.gl Multiple Layers chart; network tab shows one POST /api/v1/chart/data per layer (no /superset/explore_json/); layer-scoped dashboard filters behave as before.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

The multi-layer chart becomes fully client-side, completing the deck.gl
preset migration. Its buildQuery produces an empty queries list (the
legacy DeckGLMultiLayer.query_obj was empty too, and the v1 query
context schema accepts that shape, covered by a unit test). Multi.tsx
now fetches sub-slice metadata through /api/v1/chart/<id> instead of
reading it from the explore_json container payload, and loads each
layer through its own registered buildQuery + /api/v1/chart/data +
transformProps instead of per-layer explore_json GETs. Layer-scoped
dashboard filtering, dashboardId and parent_slice_id propagation are
unchanged, and legacy container payloads still short-circuit the
metadata fetch. Autozoom falls back to the saved viewport when no
pre-merged container features exist.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dosubot dosubot Bot added change:frontend Requires changing the frontend viz:charts:deck.gl Related to deck.gl charts labels Jul 3, 2026
@bito-code-review

bito-code-review Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped - Branch Excluded

Bito didn't auto-review because the source or target branch is excluded from automatic reviews.
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.
You can change the branch exclusion settings here, or contact your Bito workspace admin at evan@preset.io.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.69231% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.68%. Comparing base (907b18a) to head (f15137d).
⚠️ Report is 7 commits behind head on remove-legacy-viz-pipeline.

Files with missing lines Patch % Lines
...nd/plugins/preset-chart-deckgl/src/Multi/Multi.tsx 61.22% 19 Missing ⚠️
...lugins/preset-chart-deckgl/src/Multi/buildQuery.ts 0.00% 2 Missing ⚠️
...end/plugins/preset-chart-deckgl/src/Multi/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           remove-legacy-viz-pipeline   #41730      +/-   ##
==============================================================
+ Coverage                       63.91%   64.68%   +0.76%     
==============================================================
  Files                            2697     2698       +1     
  Lines                          148702   148734      +32     
  Branches                        34331    34339       +8     
==============================================================
+ Hits                            95040    96204    +1164     
+ Misses                          51912    50768    -1144     
- Partials                         1750     1762      +12     
Flag Coverage Δ
hive 39.19% <ø> (ø)
javascript 69.48% <57.69%> (-0.04%) ⬇️
mysql 57.84% <ø> (?)
postgres 57.91% <ø> (?)
presto 40.73% <ø> (ø)
python 59.30% <ø> (+1.65%) ⬆️
sqlite 57.48% <ø> (ø)
unit 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rusackas
rusackas merged commit e7baa73 into remove-legacy-viz-pipeline Jul 3, 2026
57 checks passed
@rusackas
rusackas deleted the legacy-viz-t4-deck-multi branch July 3, 2026 07:38
rusackas added a commit that referenced this pull request Jul 7, 2026
rusackas added a commit that referenced this pull request Jul 7, 2026
rusackas added a commit that referenced this pull request Jul 8, 2026
rusackas added a commit that referenced this pull request Jul 10, 2026
rusackas added a commit that referenced this pull request Jul 13, 2026
rusackas added a commit that referenced this pull request Jul 14, 2026
rusackas added a commit that referenced this pull request Jul 15, 2026
rusackas added a commit that referenced this pull request Jul 15, 2026
rusackas added a commit that referenced this pull request Jul 16, 2026
rusackas added a commit that referenced this pull request Jul 17, 2026
rusackas added a commit that referenced this pull request Jul 20, 2026
rusackas added a commit that referenced this pull request Jul 20, 2026
rusackas added a commit that referenced this pull request Jul 20, 2026
rusackas added a commit that referenced this pull request Jul 21, 2026
rusackas added a commit that referenced this pull request Jul 21, 2026
rusackas added a commit that referenced this pull request Jul 23, 2026
rusackas added a commit that referenced this pull request Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend plugins size/L viz:charts:deck.gl Related to deck.gl charts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants