You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/10/02 21:48:27 UTC
[I] Explore Contour control: thresholds of 0 are treated as unset (isoband like [-1, 0] shown and edited as an isoline) [superset]
sadpandajoe opened a new issue, #44913:
URL: https://github.com/apache/superset/issues/44913
### Bug description
Several checks in the Contour control use truthiness on numeric thresholds, so `0` is treated as missing:
- An isoband with `lowerThreshold: -1, upperThreshold: 0` is classified as an isoline: re-opening it selects the Isoline tab and the option label/tooltip shows it as an isoline.
- A threshold of `0` renders as an empty input in the Isoband tab, and the "lower must be lower than upper" validation is skipped when either value is 0.
- An isoline with `lowerThreshold: 0` is labelled with threshold `-1` (`lowerThreshold || -1`).
Steps to reproduce: add an Isoband with lower = -1, upper = 0, Save, then re-open it (or look at its label in the control).
Expected: `0` is a valid threshold; the contour stays an isoband.
### Where
`superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx`
- L49-L54 `isIsoband`: `return contour.upperThreshold && contour.lowerThreshold;`
- L83-L84 validation guard `contour.upperThreshold && contour.lowerThreshold`
- L289, L304 `value={contour.lowerThreshold || ''}` / `upperThreshold || ''`
`superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx`
- L52 `const isIsoband = upperThreshold;`
- L69-L70 `lowerThreshold || -1`
### Suggested fix
Use `!= null` / `typeof x === 'number'` checks (and `?? ''` for the inputs) instead of truthiness.
### Found by
Found while adding React Testing Library coverage for Explore controls (all line numbers are against `master` at `bc3698b5d6`).
--
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: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Explore Contour control: thresholds of 0 are treated as unset (isoband like [-1, 0] shown and edited as an isoline) [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #44913: Explore Contour control: thresholds of 0 are treated as unset (isoband like [-1, 0] shown and edited as an isoline)
URL: https://github.com/apache/superset/issues/44913
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org