mayuriphad opened a new pull request, #44962: URL: https://github.com/apache/superset/pull/44962
### SUMMARY `ExtentTag` used truthiness checks for `fixedZoom`, `fixedLatitude` and `fixedLongitude`, so a value of `0` (zoom level 0, the equator, the prime meridian) was rendered as "unset" even though it is set. It now checks `typeof value === 'number'`, so `0` renders as `0` / `0.000000`, and missing values still render as "unset". ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Text-only change in the extent tag of the Map View control: - Before: `Zoom: 5 | Lat: unset | Lon: 12.000000` for a latitude of `0` - After: `Zoom: 5 | Lat: 0.000000 | Lon: 12.000000` ### TESTING INSTRUCTIONS - New `ExtentTag.test.tsx` covers set values, `0` values and missing values. The `0` case fails without this change and passes with it. - `npx jest src/explore/components/controls/MapViewControl`, `oxfmt --check` and `oxlint` pass on the changed files. - Manually: in a chart with a Map View control, choose Custom and set an extent with latitude, longitude or zoom `0`. The tag shows `0` instead of "unset". This doesn't overlap with #44850, which adds `MapViewControl` tests and leaves this behavior unpinned on purpose; its "missing values show unset" test still holds with this change. ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #44919 - [ ] 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]
