Skip to content

Routing: Drag & drop reordering and single add button for routing waypoints #867

Description

@dopenguin

Description

Rework the waypoint input handling so that waypoints can be reordered via drag & drop and new waypoints are added only through a single button placed below the input list instead of being inserted at arbitrary positions. Since drag & drop makes ordering explicit, positional insertion via per-row add buttons is no longer needed.

Current behavior

  • Each waypoint row in RoutingInput.ce.vue has its own 'add' button that inserts a new empty input at that specific index (routeStore.setRoute(index)).
  • There is no way to reorder existing waypoints.
  • The order is only controllable by inserting at a specific position.
  • Each row also has a 'remove' button, with a minimum of two waypoints enforced (route.length === 2).

Expected behavior

  • Users can reorder existing waypoint inputs (the route array in store.ts) via drag & drop with an accessible, keyboard-operable alternative (e.g. move up / move down).
  • On reorder, the route array order updates so the route request reflects the new sequence.
  • The per-row 'add' button is removed. A single 'add waypoint' button appears below the input list in RoutingWrapper.ce.vue and appends a new empty waypoint at the end.
  • The existing 'max two fillable inputs' guard (addWaypointButtonDisabled) is preserved on the new single add button.
  • The per-row remove button and the minimum-of-two-waypoints constraint remain unchanged.

Affected areas

File What needs to change
src/plugins/routing/components/RoutingInput.ce.vue Remove the add button, add drag handle / reorder controls.
src/plugins/routing/components/RoutingWrapper.ce.vue Render the single add button below the v-for input list.
src/plugins/routing/store.ts Adjust setRoute (or add dedicated append + reorder actions) to support append-at-end and reordering of the route array. Consider resetting currentlyFocusedInput on reorder.

Out of scope

Changes to the routing request/response logic beyond honoring the new waypoint order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrefactorRefactoring of previous code

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions