rusackas opened a new pull request, #43946:
URL: https://github.com/apache/superset/pull/43946

   ### SUMMARY
   `StatefulChart` (used to render each Matrixify grid cell) keeps its own 
hardcoded `RENDER_TRIGGER_SHARED_CONTROLS` allowlist of shared controls that 
only affect rendering, not data fetching. It exists because string-based 
control references (e.g. `['echart_options']`) can't be introspected for their 
`renderTrigger` flag without importing `@superset-ui/chart-controls` into 
`@superset-ui/core`, which would create a circular dependency.
   
   That allowlist only listed 5 of the 10 controls that `sharedControls.tsx` 
actually marks `renderTrigger: true`, missing `echart_options`, `color_picker`, 
`linear_color_scheme`, `x_axis_time_format`, and `x_axis_number_format`. Since 
the Timeseries Line/Bar/SmoothLine/Area and MixedTimeseries control panels 
reference `echart_options` as a bare string, `shouldRefetchData()` couldn't 
tell it apart from a data-affecting control, so editing the "ECharts Options" 
field on a chart embedded in a Matrixify grid forced a full per-cell data 
requery instead of a plain re-render (matches the "works outside Matrixify, 
breaks once it's active" repro in #39008).
   
   This adds the missing entries to the allowlist and a comment noting it needs 
to stay in sync with `sharedControls.tsx`.
   
   ### TESTING INSTRUCTIONS
   - Added a unit test in `StatefulChart.test.tsx` that reproduces the bug: 
with a control panel referencing `echart_options` as a string (as Timeseries 
charts do), changing `echart_options` should not trigger a data refetch, only a 
re-render. Fails before this change, passes after.
   - `npm run test -- StatefulChart.test.tsx` (from `superset-frontend/`)
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #39008
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] 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]

Reply via email to