rusackas opened a new pull request, #42533: URL: https://github.com/apache/superset/pull/42533
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY The Waterfall control panel never defined `formDataOverrides`, so it never drained the shared "standardized controls" metric/column queue that Explore uses to hand off metrics/columns between viz types on switch. Every other single-metric echarts chart (Pie, Gauge, Sunburst, Radar, BigNumber, etc.) consumes exactly one metric from that queue via `getStandardizedControls().shiftMetric()`. Waterfall skipped this, so: 1. Switching from e.g. Line (`metrics: [A, B]`) to Waterfall queued `[A, B]` but never shifted anything out. 2. Whatever metric the user ended up with on Waterfall got pushed back onto the (still full) queue. 3. Switching back to Line popped the whole queue, producing `[metric_from_waterfall, A, B]` — duplicate measures. This PR adds the standard `formDataOverrides` to the Waterfall control panel so it shifts a single metric and pops all columns from the queue, matching the pattern used everywhere else. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — this is a form-data plumbing fix, not a rendering change. See the repro steps in #32835 and the linked video from @msyavuz there. ### TESTING INSTRUCTIONS 1. Create a chart with a Line viz and two metrics (e.g. `COUNT(*)` and `SUM(some_column)`). 2. Switch the viz type to Waterfall. 3. Switch back to Line. 4. Before this fix: the metrics list would contain a duplicate. After this fix: the original two metrics are preserved with no duplication. Also added a unit test (`plugins/plugin-chart-echarts/test/Waterfall/controlPanel.test.ts`) pinning that Waterfall's `formDataOverrides` consumes a single metric and all queued columns from `getStandardizedControls()`. ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #32835 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
