Repository navigation
feat: add updateTooltipFields to dispatch tooltip action in KeplerSlice - #425
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded a public API method Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/kepler/src/KeplerSlice.ts`:
- Around line 476-491: The updateTooltipFields logic currently appends newFields
to existingFields, causing stale entries and duplicate names; change it to
derive the dataset's next fields array from the incoming fieldNames (preserving
order and removing duplicates) by mapping each name to {name, format} where
format is taken from existingFields by matching name (e.g., lookup by name) or
null if not present, then dispatch interactionConfigChange with
tooltipConfig.config.fieldsToShow[datasetId] set to that new array (or remove
the datasetId key if fieldNames is empty) instead of spreading
[...existingFields, ...newFields]; update references to existingFields,
newFields, fieldNames, fieldsToShow, tooltipConfig, interactionConfigChange,
mapId, and datasetId accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ac87338b-82d4-401b-b074-695cb64d748c
📒 Files selected for processing (1)
packages/kepler/src/KeplerSlice.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…ce (#425) Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit