Skip to content

Show conflicting tags in merge operation tooltip#12367

Open
Xaves23 wants to merge 1 commit into
openstreetmap:developfrom
Xaves23:fix/show-conflicting-tags-on-merge
Open

Show conflicting tags in merge operation tooltip#12367
Xaves23 wants to merge 1 commit into
openstreetmap:developfrom
Xaves23:fix/show-conflicting-tags-on-merge

Conversation

@Xaves23
Copy link
Copy Markdown

@Xaves23 Xaves23 commented May 21, 2026

Fixes #11406
When merging ways, tags are checked to see if a conflict exists. The tool tip did not give hints on which tags were conflicting. Now the conflicting tags are listed in the conflicting tag merge operation tool tip.

Before
"These features can't be merged because some of their tags have conflicting values."

After
"These features can't be merged because some of their tags have conflicting values: natural, surface"

Example screenshot:
Screenshot 2026-05-21 at 4 27 20 pm

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the merge operation UX so that when a merge is blocked due to tag conflicts, the tooltip can list which tag keys are conflicting (addressing #11406).

Changes:

  • Extend actionJoin.disabled() to report conflicting tag keys along with the conflicting_tags reason.
  • Update merge operation tooltip logic to show a detailed conflicting_tags message including the key list.
  • Adjust join action tests to accommodate the updated disabled() return shape for conflicting tags.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
modules/actions/join.js Returns conflict details (type + conflicting keys) when tag conflicts prevent joining ways.
modules/operations/merge.js Unwraps the join action disabled reason and conditionally displays a detailed tooltip including conflicting keys.
data/core.yaml Adds a new localized string for the detailed conflicting-tags tooltip message.
test/spec/actions/join.js Updates expectations for conflicting_tags to match the new disabled-reason structure.

Comment thread modules/actions/join.js
Comment on lines 210 to 212
if (conflicting) {
return 'conflicting_tags';
return { type: 'conflicting_tags', keys: conflictingKeys };
}
Comment on lines +84 to +88
if (disabled === 'conflicting_tags') {
var actionDisabled = _action.disabled(context.graph());
if (actionDisabled.keys && actionDisabled.keys.length) {
return t.append('operations.merge.conflicting_tags_details',
{ keys: actionDisabled.keys.join(', ') });
Comment thread test/spec/actions/join.js
]);

expect(iD.actionJoin(['-', '=']).disabled(graph)).to.equal('conflicting_tags');
expect(iD.actionJoin(['-', '=']).disabled(graph)).to.deep.include({ type: 'conflicting_tags' });
Comment thread test/spec/actions/join.js
Comment on lines +622 to 623
expect(iD.actionJoin(['-', '=']).disabled(graph)).to.deep.include({ type: 'conflicting_tags' });
});
Comment thread test/spec/actions/join.js
Comment on lines +633 to 634
expect(iD.actionJoin(['-', '=']).disabled(graph)).to.deep.include({ type: 'conflicting_tags' });
});
Comment thread test/spec/actions/join.js
Comment on lines +644 to 645
expect(iD.actionJoin(['-', '=']).disabled(graph)).to.deep.include({ type: 'conflicting_tags' });
});
@tyrasd tyrasd added the usability An issue with ease-of-use or design label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

usability An issue with ease-of-use or design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: display conflicting tags when merging features

3 participants