Add insert waypoint button between mission items#1180
Merged
1Blademaster merged 2 commits intomainfrom Apr 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds UI affordances to insert new mission waypoints (and fence polygon vertices) directly from the map by rendering clickable midpoint “+” markers between adjacent items, with corresponding Redux reducers to insert and re-sequence items.
Changes:
- Added
insertDrawingItemAfter(generic) andinsertFencePolygonVertex(polygon-aware) reducers to insert items and re-sequence lists. - Rendered midpoint insert buttons on the mission and fence map overlays and wired them to the new reducers.
- Hardened mission/fence/rally table numeric input handling by ignoring non-finite/empty intermediate values from Mantine
NumberInput.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
gcs/src/redux/slices/missionSlice.js |
Adds reducers for inserting a mission item after an existing item and inserting a fence polygon vertex while updating seq/param1/z. |
gcs/src/components/missions/rallyItemsTableRow.jsx |
Adds numeric parsing guard to avoid writing invalid intermediate input values into state. |
gcs/src/components/missions/missionItemsTableRow.jsx |
Adds numeric parsing guards (and a coordinate-specific helper) for mission item table edits. |
gcs/src/components/missions/fenceItemsTableRow.jsx |
Adds numeric parsing guard to avoid writing invalid intermediate input values into state. |
gcs/src/components/mapComponents/missionItems.jsx |
Computes mission path midpoints and renders clickable midpoint insert buttons that dispatch insertion actions. |
gcs/src/components/mapComponents/midpointInsertButton.jsx |
New reusable map marker button component for midpoint “+” insertion. |
gcs/src/components/mapComponents/fenceItems.jsx |
Groups fence polygons, computes edge midpoints, renders insert buttons, and dispatches polygon-vertex insertion actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.