Show partial relation memberships in multiselection#12018
Open
Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Open
Show partial relation memberships in multiselection#12018Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the raw membership editor UI logic to compute parent relations across selected entities using a union of all parent relations instead of only the shared/intersected ones, affecting what relations appear and how they’re counted/displayed.
Changes:
- Replaced shared-parent (intersection) relation gathering with a new
getAllParentRelations()implementation (union + dedupe by relation id). - Updated the section label count and membership list generation to use the new parent relation gathering logic.
You can also share your feedback on Copilot code review. Take the survey.
Author
|
Please review this PR @tyrasd . |
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.
Mergin.fix.mp4
Currently, when multiple features are selected, the relation panel only shows relations shared by all selected entities. This hides relations that belong to only some of the selected features.
This PR changes the logic to collect the union of parent relations instead of the intersection, so all relation memberships are shown in the panel.
I also updated the relation count so it correctly reflects the number of displayed relations.
Example
Before:
Way A → R1
Way B → R2
Multiselect → Relations (0)
After:
Way A → R1
Way B → R2
Multiselect → Relations (no of relations) showing R1 and R2
Tested locally using real data with roads belonging to different bus route relations.
And at the bottom add:
Fixes #9198