Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements a vertex deletion feature for polygon and polyline annotations, adding a new configurable keybind (default: x) that allows users to delete individual vertices by hovering over them. It also fixes a bug where deleting an annotation mid-edit would leave the ULabel state stuck in edit mode.
Changes:
- Added
delete_vertex_keybindconfiguration option with default value "x" - Implemented vertex deletion logic with automatic cleanup (polylines with ≤1 point and polygon layers with <3 points are removed)
- Fixed state clearing bug in annotation deletion to prevent edit mode getting stuck
- Added comprehensive E2E tests for vertex deletion functionality
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/configuration.ts | Added new delete_vertex_keybind configuration property |
| src/toolbox_items/keybinds.ts | Registered the delete vertex keybind in the toolbox UI |
| src/listeners.ts | Added keypress handler for delete vertex keybind |
| src/index.js | Implemented delete_vertex, undo/redo methods, and state clearing fixes; added is_vertex flag to edit candidates |
| src/actions.ts | Added action handlers for delete_vertex operations |
| tests/testing-utils/drawing_utils.js | Added helper functions for drawing polygons and polylines in tests |
| tests/e2e/keybind-functionality.spec.js | Added E2E tests for vertex deletion functionality |
| src/version.js | Bumped version to 0.23.0 |
| package.json | Updated version to 0.23.0 |
| api_spec.md | Documented the new delete_vertex_keybind configuration |
| CHANGELOG.md | Added release notes for version 0.23.0 |
| .github/tasks.md | Updated task list with completed implementation items |
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.
Vertex Delete
Description
delete_vertex_keybind(default:x)PR Checklist
package.jsonhas been bumped since last releasepackage.jsonandsrc/version.jsapi_spec.md)changelog.mdBreaking API Changes
No