Multi-object group selection (iD-style)#17
Open
tordans wants to merge 2 commits into
Open
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Wow, very ambitious! I've always felt this would be too much work to justify, but it will be interesting to see what you come up with. |
Owner
Author
|
I agree, this can get super complex fast. Already writing the plan showed how much stuff iD has to do to handle this and the edge cases are many. I would consider this a pure exploration PR once something works. Will close this for now because creating this PR was more of an accident TBH; I did not even translate the input 🤦 . |
Add binding design constraints from review of the existing implementation: additive selection model, mixed-key/diff-based tag commit, plain-tap rules, long-press creation, dedicated add-mode state, dedicated group-drag path, toolbar gating, and member highlighting.
|
I'm interested in seeing how this exploration goes. It still seems really complicated. iD seems like it punts on many of the complicated parts, but maybe that's correct and acceptable. |
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.
Problem
Als GoMap-Nutzer/in, möchte ich mehrere Kartenobjekte zu einer temporären Gruppe zusammenfassen und gemeinsam bearbeiten können, damit ich mehrere POIs oder Wege effizient verschieben und deren Attribute in einem Durchgang anpassen kann — ähnlich wie im iD-Editor.
Aktuelles Verhalten: Beim Anklicken eines Objekts erscheint ein Tooltipp (Pushpin) mit Verschiebe-Symbol; es ist immer nur ein Objekt ausgewählt. Attribute bearbeiten betrifft nur dieses eine Objekt. Es gibt keine Möglichkeit, mehrere Objekte zu gruppieren, gemeinsam zu verschieben oder Tags mit Konfliktbehandlung („mehrfache Werte") zu pflegen.
Gewünschtes Verhalten:
Implementation notes (by Cursor)
Branch:
feature/multi-object-group-selectionPlan doc:
docs/plans/multi-object-group-selection.mdThis PR adds the feature plan; implementation follows in subsequent commits on this branch.
Architecture
selectedNode/Way/Relationto an orderedSelectionGroup: [OsmBaseObject]onEditorMapLayer/MapView. KeepselectedPrimaryas anchor (first member / pushpin target).GroupSelectionBarat top of map — member chips (preset/geometry icons) in selection order, + for add modes.Map & pushpin
friendlyDescription(); group → localized “Group” + existing move handle.dragMove/dragFinishto translate all member geometries together (with undo grouping).Attributes (POI)
POITabBarControllertakes multiple selections; merge tag dict per key.(object → value)(iD-style).commitChanges()applies changes to every group member.Suggested phases
Key files
EditorMapLayer.swift,EditorMapLayer+Edit.swift,MapView.swift,PushPinView.swift,MainViewController.swiftPOITabBarController.swift,POICommonTagsViewController.swift,POIAllTagsViewController.swiftGroupSelectionBar.swift, multi-value tag presenterTesting notes (by @tordans)
Gruppe anlegen & Leiste
Mitglieder hinzufügen
Verschieben
Attribute (Mehrfachbearbeitung)
Regression
Made with Cursor
Note
Low Risk
Documentation-only change with no production code, data paths, or user-facing behavior.
Overview
Adds
docs/plans/multi-object-group-selection.md, a code-review-backed implementation plan for iD-style multi-object editing. No app or map code changes in this diff—only the spec for follow-on work.The plan keeps existing single-selection (
selectedPrimary,Selections) and layers an ephemeralgroupMemberslist, a topGroupSelectionBar, long-press on the pushpin to start a group, dedicatedGroupAddMode(separate from geometryplusButtonTimestamp), a group-only drag path that skips single-objectdragFinishsemantics, and diff-based tag commits withmixedKeys/userEditedKeys(no sentinel strings in stored tags). It also defines tap behavior while grouped, edit-toolbar gating, member highlighting, and a five-phase rollout with called-out files (EditorMapLayer,MapView,PushPinView, POI controllers, newGroupSelectionBar/GroupTagMerge).Reviewed by Cursor Bugbot for commit b0819d4. Bugbot is set up for automated code reviews on this repo. Configure here.