michael-s-molina opened a new pull request, #37894: URL: https://github.com/apache/superset/pull/37894
### SUMMARY Fixes conditional formatting painting empty cells when blank values (null, undefined, NaN, whitespace-only strings) are present. **Also in this PR:** - Introduced a reusable `isBlank` utility in `@apache-superset/core` that checks for null, undefined, NaN, and whitespace-only strings using lodash functions - Replaced local `isString`/`isBoolean` helper functions in `getColorFormatters.ts` with their lodash equivalents ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF **Before:** Empty cells are incorrectly colored when conditional formatting rules like `metric < 50` are applied (null is coerced to 0, which satisfies the condition). <img width="1913" height="855" alt="Screenshot 2026-02-11 at 10 58 14" src="https://github.com/user-attachments/assets/0e6018a1-11fd-4423-ba29-efa1b94f164a" /> **After:** Empty cells are left unformatted. Only cells with actual values are evaluated against conditional formatting rules. <img width="1911" height="864" alt="Screenshot 2026-02-11 at 11 11 20" src="https://github.com/user-attachments/assets/bb55502e-a90f-43d1-9db7-d470fe35da7a" /> ### TESTING INSTRUCTIONS 1. Create a chart that supports conditional formatting (Pivot Table or Table) with a dataset that produces empty cells 2. Add a conditional formatting rule such as `metric < 50` 3. Verify that empty cells are **not** colored 4. Verify that cells with actual values below 50 **are** colored 5. Verify that `IsNull` conditional formatting still correctly highlights null cells 6. Verify that `IsTrue`/`IsFalse` conditional formatting still works on boolean columns ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] 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]
