joaopedroab opened a new pull request, #38374:
URL: https://github.com/apache/superset/pull/38374
### SUMMARY
The Deck.gl MapBox chart's Opacity, Default longitude, Default latitude,
and Zoom control panel fields had no effect on the display.
**Root causes:**
- **Opacity**: The `global_opacity` control was missing `renderTrigger:
true`, so changing it didn't trigger a re-render — users had to re-run the
query to see changes.
- **Viewport fields**: `transformProps.ts` never extracted
`viewportLongitude`, `viewportLatitude`, or `viewportZoom` from `formData`, so
they were never passed to the MapBox component.
Additionally, `MapBox.tsx` had no mechanism to respond to prop changes for
these values.
**Changes:**
- Add `renderTrigger: true` to `global_opacity` control in
`controlPanel.ts`
- Extract and pass viewport values through `transformProps.ts`
- Add `componentDidUpdate` to `MapBox.tsx` to update viewport state when
props change
- Add tests for `transformProps` and `MapBox` component
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — behavior change: controls that previously had no effect are now
functional.
### TESTING INSTRUCTIONS
1. Create a Deck.gl MapBox chart with data containing longitude/latitude
columns
2. **Test Opacity**: In the Data tab → Visual Tweaks, change Opacity (e.g.
from 1 to 0.3) → chart should update immediately without re-running the query
3. **Test Viewport**: In the Customize tab → Viewport, change Default
longitude, Default latitude, or Zoom → map should pan/zoom to the new values
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #38315
- [ ] Required feature flags:
- [x] 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]