feat: add point and line sketching to Draw on Map - #3639
Open
igorDykhta wants to merge 9 commits into
Open
Conversation
added 2 commits
August 15, 2026 11:54
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands kepler.gl’s “Draw on Map” editor to support point/line sketches, improves editing/selection UX (including line translation), adds “copy all” and “convert sketches to layer” actions, and documents the workflow.
Changes:
- Add point and line drawing modes, updated tooltips, selection behavior, and line-translation interaction improvements.
- Add utilities + reducer/action support to copy sketches as GeoJSON and convert sketches into a new GeoJSON dataset/layer.
- Add filter polygon visual differentiation + on-map filter badges, plus docs/i18n/test updates.
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/node/utils/index.js | Registers the new editor feature util test suite. |
| test/node/utils/editor-utils-test.js | Extends editor-layer utility coverage for new modes/tooltips/selection + styling. |
| test/node/utils/editor-feature-utils-test.js | Adds unit tests for new editor feature conversion/sanitization helpers. |
| test/node/reducers/vis-state-test.js | Adds reducer tests for sketch↔filter behavior and convert-to-layer action. |
| SUMMARY.md | Adds “Draw on Map” to documentation navigation. |
| src/utils/src/index.ts | Exports new editor feature utility module + types. |
| src/utils/src/editor-feature-utils.ts | Implements sketch sanitization, FC conversion, filter→sketch conversion, and filter badge anchor selection. |
| src/reducers/src/vis-state.ts | Wires new CONVERT_EDITOR_FEATURES_TO_LAYER action to updater. |
| src/reducers/src/vis-state-updaters.ts | Implements convert-to-layer updater and sketch restoration when removing final filtered layer. |
| src/localization/src/translations/ru.ts | Adds new Draw on Map tooltip/toolbar/editor strings (RU). |
| src/localization/src/translations/pt.ts | Adds new Draw on Map tooltip/toolbar/editor strings (PT). |
| src/localization/src/translations/ja.ts | Adds new Draw on Map tooltip/toolbar/editor strings (JA). |
| src/localization/src/translations/fi.ts | Adds new Draw on Map tooltip/toolbar/editor strings (FI). |
| src/localization/src/translations/es.ts | Adds new Draw on Map tooltip/toolbar/editor strings (ES). |
| src/localization/src/translations/en.ts | Adds new Draw on Map tooltip/toolbar/editor strings (EN). |
| src/localization/src/translations/cn.ts | Adds new Draw on Map tooltip/toolbar/editor strings (CN). |
| src/localization/src/translations/ca.ts | Adds new Draw on Map tooltip/toolbar/editor strings (CA). |
| src/layers/src/editor-layer/modify-mode-extended.ts | Skips modify when intermediate handle is hit on a line to allow translating the whole line. |
| src/layers/src/editor-layer/feature-styles.ts | Adds filter detection + dash-array helper; adjusts point coloring behavior. |
| src/layers/src/editor-layer/editor-layer.ts | Adds point/line drawing modes, updated fill/highlight behavior, and new dash-array logic. |
| src/layers/src/editor-layer/editor-layer-utils.ts | Expands drawing-active detection; improves click selection logic and tooltip copy for new behaviors. |
| src/constants/src/default-settings.ts | Adds new editor modes and EDITOR_DRAW_MODES helper list. |
| src/components/src/map/map-draw-panel.tsx | Adds UI controls for point/line, copy-all, and convert-to-layer actions. |
| src/components/src/map/map-control.tsx | Plumbs through the new convert-to-layer callback. |
| src/components/src/map/map-control-toolbar.tsx | Tweaks toolbar icon container layout to better handle new icons. |
| src/components/src/map-container.tsx | Wires convert-to-layer action and renders filter badges overlay when editor is visible. |
| src/components/src/editor/filter-feature-badges.tsx | Adds on-map clickable badges for polygon filters. |
| src/components/src/editor/feature-action-panel.tsx | Hides “Filter layers” panel for non-filterable geometries instead of showing disabled UI. |
| src/components/src/editor/editor.tsx | Refines Escape key handling to avoid interfering with typing targets and improve mode reset behavior. |
| src/components/src/common/toolbar-item.tsx | Adds disabled + tooltip support to toolbar items. |
| src/components/src/common/icons/line-string.tsx | Adds new line icon. |
| src/components/src/common/icons/index.tsx | Exports new icons. |
| src/components/src/common/icons/draw-point.tsx | Adds new point icon. |
| src/actions/src/vis-state-actions.ts | Adds convertEditorFeaturesToLayer action creator + updates editor mode docs. |
| src/actions/src/action-types.ts | Adds CONVERT_EDITOR_FEATURES_TO_LAYER action type. |
| docs/user-guides/README.md | Links to Draw on Map guide. |
| docs/user-guides/j-get-started.md | Updates getting-started filters section to reference spatial filtering via Draw on Map. |
| docs/user-guides/e-filters.md | Clarifies column vs spatial filtering and links to Draw on Map. |
| docs/user-guides/draw-on-map.md | Adds new Draw on Map user guide. |
| docs/api-reference/actions/actions.md | Updates setEditorMode documentation snippet and parameter description. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
added 2 commits
August 15, 2026 21:08
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
added 5 commits
August 15, 2026 22:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan