Skip to content

feat(FlightMap): add mission item grouping and improve map usability#14623

Open
rubenp02 wants to merge 6 commits into
mavlink:masterfrom
Ventor-Innovations:feature/mission-item-map-usability
Open

feat(FlightMap): add mission item grouping and improve map usability#14623
rubenp02 wants to merge 6 commits into
mavlink:masterfrom
Ventor-Innovations:feature/mission-item-map-usability

Conversation

@rubenp02

Copy link
Copy Markdown
Contributor

Description

A variety of bugfixes and a new mission item grouping feature to improve mission map usability.

fix(PlanView): make new mission items draggable

Newly inserted simple mission items, such as waypoints created with the plus button shown on mission legs, could become current before their asynchronous map indicator finished loading, leaving their drag area unusable until the item was selected again.

Drag areas now wait for their indicator to load, making new items immediately draggable.

fix(FlightMap): draw current mission item on top

When multiple simple mission items shared the same position, later items could partially cover the current target, including its number. The current item is now drawn on top, ensuring the active navigation target can always be identified during flight.

feat(FlightMap): group overlapping mission items

Simple mission items can share coordinates or become close enough at the current map scale for their indicators to overlap. Only the topmost indicator could then be reliably identified or selected, particularly on touchscreens.

They are now combined into a single group indicator with direct access to every grouped item.

Key changes:

  • Groups items in screen space and updates the groups when the map scale or item positions change. Indicators remain separate while they can still be selected individually.
  • Shows the current item's normal marker label when the group contains it, or that of the lowest-sequence item otherwise. A new intermediate marker size and an ellipsis below the label distinguish groups from individual items.
  • Opens a non-modal horizontal selector when a group is selected in Plan or Fly view. The selector grows with its contents up to a viewport-relative limit while keeping every member directly accessible. Command-specific labels preserve their normal abbreviations and include sequence numbers to distinguish repeated items.
  • Keeps each simple mission item independently loaded. This preserves mission legs, loiter circles, dragging, and other associated map visuals. Complex items do not interact with the grouping system.

fix(FlightMap): keep items visible at all zooms

MapQuickItem's default auto-fade hides simple mission indicators at low zoom levels, removing mission context when several items occupy a small area.

Grouped indicators manage that density without losing access to any item. Automatic fading is therefore disabled, allowing simple mission markers to remain visible and selectable at every zoom level.

fix(PlanView): hide split handles on short legs

The split handle remained visible on legs whose midpoint was too close to either endpoint for an inserted item to remain separately selectable.

It now hides whenever the resulting item would join the same indicator group.

fix(FlightMap): hide arrows on short legs

Direction arrows could become larger on screen than their underlying mission legs, obscuring rather than clarifying the route.

They now hide whenever a leg's projected length is shorter than the 30-pixel width of the arrow canvas.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/Build changes
  • Other

Testing

  • Tested locally
  • Added/updated unit tests
  • Tested with simulator (SITL)
  • Tested with hardware

Platforms Tested

  • Linux
  • Windows
  • macOS
  • Android
  • iOS

Flight Stacks Tested

  • PX4
  • ArduPilot (The changes are stack-agnostic, but SITL testing was performed with ArduPilot.)

Screenshots

imagen imagen imagen imagen imagen

Checklist

  • I have read the Contribution Guidelines
  • I have read the Code of Conduct
  • My code follows the project's coding standards
  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally

Related Issues

Closes #8728


By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).

rubenp02 added 2 commits July 17, 2026 18:40
Newly inserted simple mission items, such as waypoints created with the
plus button shown on mission legs, could become current before their
asynchronous map indicator finished loading, leaving their drag area
unusable until the item was selected again.

Drag areas now wait for their indicator to load, making new items
immediately draggable.
When multiple simple mission items shared the same position, later items
could partially cover the current target, including its number. The
current item is now drawn on top, ensuring the active navigation target
can always be identified during flight.
@rubenp02
rubenp02 requested a review from HTRamsey as a code owner July 17, 2026 17:04
Copilot AI review requested due to automatic review settings July 17, 2026 17:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves mission map usability across PlanView and FlyView by introducing a screen-space grouping mechanism for overlapping simple mission item indicators, while also addressing several interaction/visibility issues (drag readiness, z-ordering, arrow visibility).

Changes:

  • Added MissionItemIndicatorGroup to cluster overlapping simple mission item indicators and provide an in-place selector for choosing among grouped items.
  • Updated mission item visuals to integrate with grouping and to ensure newly-created items are immediately draggable once their indicator finishes loading.
  • Disabled mission-item auto-fade and hid direction arrows / split handles when the corresponding leg is too short at the current zoom.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/PlanView/TransectStyleMapVisuals.qml Passes map control into MapLineArrow after it became an explicit dependency.
src/PlanView/TakeoffItemMapVisual.qml Hooks takeoff indicator into the new indicator grouping system and interactive gating.
src/PlanView/SimpleItemMapVisual.qml Passes indicator-group and visibility/interaction flags into MissionItemIndicator.
src/PlanView/PlanView.qml Instantiates the grouping component in PlanView and hides split UI for too-short legs at current zoom.
src/PlanView/MissionItemMapVisualBase.qml Fixes drag-area readiness by waiting for the async indicator to be loaded; routes clicks via indicator activation when available.
src/PlanView/MissionItemMapVisual.qml Plumbs indicatorGroup into simple-item visuals at load time.
src/PlanView/MissionItemIndexLabel.qml Adds “medium” sizing and optional sub/supplementary text to support group indicators and selector labels.
src/FlightMap/MapItems/PlanMapItems.qml Instantiates grouping in FlyView’s plan overlays and passes it into mission item visuals; updates arrows for new MapLineArrow API.
src/FlightMap/MapItems/MissionItemIndicatorGroup.qml New: performs screen-space grouping and shows a non-modal horizontal selector panel for grouped items.
src/FlightMap/MapItems/MissionItemIndicator.qml Integrates grouping (representative visibility, activation behavior, z-ordering, disabling auto-fade).
src/FlightMap/MapItems/MapLineArrow.qml Adds explicit mapControl dependency and hides arrows when legs are shorter than the arrow canvas at current zoom.
src/FlightMap/CMakeLists.txt Registers the new MissionItemIndicatorGroup.qml in the FlightMap QML module.

Comment thread src/FlightMap/MapItems/MissionItemIndicatorGroup.qml
Comment thread src/FlightMap/MapItems/MissionItemIndicator.qml Outdated
rubenp02 added 4 commits July 17, 2026 19:24
Simple mission items can share coordinates or become close enough at the
current map scale for their indicators to overlap. Only the topmost
indicator could then be reliably identified or selected, particularly on
touchscreens.

They are now combined into a single group indicator with direct access
to every grouped item.

Key changes:
- Groups items in screen space and updates the groups when the map scale
  or item positions change. Indicators remain separate while they can
  still be selected individually.
- Shows the current item's normal marker label when the group contains
  it, or that of the lowest-sequence item otherwise. A new intermediate
  marker size and an ellipsis below the label distinguish groups from
  individual items.
- Opens a non-modal horizontal selector when a group is selected in Plan
  or Fly view. The selector grows with its contents up to a
  viewport-relative limit while keeping every member directly
  accessible. Command-specific labels preserve their normal
  abbreviations and include sequence numbers to distinguish repeated
  items.
- Keeps each simple mission item independently loaded. This preserves
  mission legs, loiter circles, dragging, and other associated map
  visuals. Complex items do not interact with the grouping system.
MapQuickItem's default auto-fade hides simple mission indicators at low
zoom levels, removing mission context when several items occupy a small
area.

Grouped indicators manage that density without losing access to any
item. Automatic fading is therefore disabled, allowing simple mission
markers to remain visible and selectable at every zoom level.
The split handle remained visible on legs whose midpoint was too close
to either endpoint for an inserted item to remain separately selectable.

It now hides whenever the resulting item would join the same indicator
group.
Direction arrows could become larger on screen than their underlying
mission legs, obscuring rather than clarifying the route.

They now hide whenever a leg's projected length is shorter than the
30-pixel width of the arrow canvas.
@rubenp02 rubenp02 changed the title Mission item grouping and map usability improvements feat(FlightMap): add mission item grouping and improve map usability Jul 17, 2026
@rubenp02
rubenp02 force-pushed the feature/mission-item-map-usability branch from 88998d2 to b9557c5 Compare July 17, 2026 17:27
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Build results unavailable — artifact download from one or more platform workflows failed (likely artifact retention expiry or transient API error). The combined report cannot be generated for this run.

See the Build Results workflow run for details.

@DonLakeFlyer
DonLakeFlyer requested a review from Copilot July 17, 2026 20:03
@DonLakeFlyer

Copy link
Copy Markdown
Contributor

Can you move the bugs which should go into 5.1 into their own pull?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Comment on lines +18 to +22
readonly property bool _isCurrentItem: missionItem ? missionItem.isCurrentItem || missionItem.hasCurrentChildItem : false
readonly property bool _usesAbbreviation: missionItem && missionItem.abbreviation.length > 0
readonly property var _group: indicatorGroup ? indicatorGroup.groupForItem(missionItem) : null
readonly property bool _isGrouped: _group && _group.items.length > 1
readonly property bool _isGroupRepresentative: !_group || _group.representative === missionItem
Comment on lines +233 to +236
required property var modelData

readonly property bool _usesAbbreviation: modelData.abbreviation.length > 0
readonly property string _supplementaryLabel: !_usesAbbreviation ? "" : `${modelData.abbreviation} (${modelData.sequenceNumber})`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Waypoint clustering when waypoints are close to eachother, or on top of eachother

3 participants