Skip to content

Conversation

@k-yle
Copy link
Collaborator

@k-yle k-yle commented Nov 17, 2025

Closes #3622

The relation dropdown list now remembers relations that you've already added during this edit session. Even if those relations are no longer visible on screen.

Showing every downloaded relation as originally proposed in #3622 becomes pretty chaotic, I think this is a reasonable compromise which is still quite helpful

1ec5
1ec5 previously approved these changes Nov 18, 2025

if (d.relation) {
recentlyAdded.add(d.relation.id);
allAdded.add(d.relation.id);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would end up being a negative counter decrementing from zero.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh i think the choice of variable names is a bit confusing, adding doesn't mean creating a new relation, but rather adding a member to a relation.

for example:

  • select w7634775
  • click + in the sidebar to add w7634775 as a member of any relation
  • pan somewhere completely different, and the relation you selected earlier will still be visible

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I see, so “selected” is probably a less confusing name internally. I hope users can figure out that that’s why these relations are lingering in the menu.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we think this will be confusing, we could exclude some relations that are always "local", for example type=restriction.

but as always when we hardcode random tags, it could cause even more confusion because no one can understand the logic

@1ec5 1ec5 dismissed their stale review November 18, 2025 09:23

Actually, this doesn’t seem to work for me. If I pan out of view, the relation list includes all the relations that aren’t in view, except for the ones I created.

Comment on lines +320 to +321
// any relation that has previously been added will remain
// in the dropdown for the rest of the edit session.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this be more intuitive if we sort some or all of the relations by recency instead of relation ID, as proposed in #7964?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah I think that would help, but a much more significant improvement would be openstreetmap/id-tagging-schema#1538 - this would filter out all the illogical options.

e.g. it would stop you from adding a road directly to a superroute, or adding a tree to a boundary relation, etc. etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep relations in relation membership dropdown for entire session

2 participants