fix(deck.gl): scatterplot stops rendering points with empty value of categorical color#39430
Conversation
Code Review Agent Run #b1d836Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
| const formatCategoryLabel = (k: string) => { | ||
| if (k === NULL_CATEGORY_KEY) { | ||
| return t('N/A'); | ||
| } |
There was a problem hiding this comment.
🟠 Architect Review — HIGH
NULL_CATEGORY_KEY is mapped to the user-facing label "N/A" only when rendering the legend, while Scatter and Arc tooltips still display the raw cat_color value; for points with null/undefined category this results in "NULL" being shown on hover instead of "N/A", creating an inconsistent and implementation-leaking user experience.
Suggestion: Centralize category label formatting (including NULL_CATEGORY_KEY → "N/A") and reuse it in the Scatter and Arc tooltip renderers (e.g., via tooltipUtils.CommonTooltipRows.category) so all user-facing category displays are consistent.
Fix in Cursor | Fix in VSCode Claude
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** superset-frontend/plugins/preset-chart-deckgl/src/components/Legend.tsx
**Line:** 91:94
**Comment:**
*HIGH: NULL_CATEGORY_KEY is mapped to the user-facing label "N/A" only when rendering the legend, while Scatter and Arc tooltips still display the raw cat_color value; for points with null/undefined category this results in "__NULL__" being shown on hover instead of "N/A", creating an inconsistent and implementation-leaking user experience.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
The flagged issue is correct. NULL_CATEGORY_KEY ('NULL') is mapped to 'N/A' only in the Legend component's formatCategoryLabel function, but Scatter and Arc tooltips display the raw cat_color value, showing 'NULL' for null/undefined categories. This creates inconsistency. superset-frontend/plugins/preset-chart-deckgl/src/utils.ts superset-frontend/plugins/preset-chart-deckgl/src/components/Legend.tsx |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #39430 +/- ##
==========================================
+ Coverage 64.49% 64.53% +0.03%
==========================================
Files 2557 2557
Lines 133097 133104 +7
Branches 30910 30915 +5
==========================================
+ Hits 85846 85903 +57
+ Misses 45761 45711 -50
Partials 1490 1490
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
SUMMARY
Include empty results for categorical color column in Scatterplot and Arc charts.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before

After

TESTING INSTRUCTIONS
ADDITIONAL INFORMATION