feat(deck-multi): migrate deck_multi chart to the v1 chart data API - #41730
Conversation
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>
|
Bito Automatic Review Skipped - Branch Excluded |
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
…41730) Co-authored-by: Claude Code <noreply@anthropic.com>
SUMMARY
Tier 4 of #41714 (targets
remove-legacy-viz-pipeline): migrate deck.gl Multiple Layers (deck_multi) offexplore_json— the lastuseLegacyApichart, and the last holdout in the deck.gl preset migration.deck_multidepended onexplore_jsontwice: the container query (whoseviz.pyclass fetched every sub-slice server-side just to hand back metadata and merged features) and each per-layer data fetch. Both move client-side:Multi/buildQuery.tsreturns an emptyquerieslist — the legacyDeckGLMultiLayer.query_objwas empty too; a new backend unit test pins thatChartDataQueryContextSchemaaccepts that shape.Multi.tsxfetches sub-slice metadata viaGET /api/v1/chart/<id>(bounded bydeck_slices), and loads each layer through its own registeredbuildQuery→POST /api/v1/chart/data→ registeredtransformProps, whose output payload is exactly what the layer generators consume. Legacy container payloads (cached) still short-circuit the metadata fetch.layer_filter_scope/filter_data_mapping),dashboardIdandparent_slice_idpropagation are unchanged — tests updated to assert them on the v1 POST payloads.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.POST /api/v1/chart/dataper layer (no/superset/explore_json/); layer-scoped dashboard filters behave as before.ADDITIONAL INFORMATION
🤖 Generated with Claude Code