Skip to content

Conversation

@FloEdelmann
Copy link
Contributor

@FloEdelmann FloEdelmann commented Oct 14, 2025

Description, Motivation & Context

Fix issues found by ideditor/schema-builder#242:

  • Remove duplicate keys from fields
  • Remove duplicate terms from presets
  • Remove empty addTags/removeTags from presets
  • Remove empty fields/moreFields from presets
  • Remove empty terms from presets

Related issues

Links and data

Relevant OSM Wiki links:
Relevant tag usage stats:

Checklist and Test-Documentation Template

Read on to get your PR merged faster…

Follow these steps to test your PR yourself and make it a lot easier and faster for maintainers to check and approve it.

This is how it works:

  1. After you submit your PR, the system will create a preview and comment on your PR:

    🍱 Your pull request preview is ready.
    If this is your first contribution to this project, the preview will not happen right away but requires a click from one of the project members. We will do this ASAP.

  2. Once the preview is ready, use it to test your changes.

  3. Now copy the snippet below into a new comment and fill out the blanks.

  4. Now your PR is ready to be reviewed.

## Test-Documentation

### Preview links & Sidebar Screenshots

<!-- Use the preview to find examples, select the feature in question and **copy this link here**.
     Find examples of nodes/areas. Find examples with a lot of tags or very few tags. – Whatever helps to test this thoroughly.
     Add relevant **screenshots** of the sidebar of those examples. -->

<!-- FYI: What we will check:
     - Is the [icon](https://github.com/ideditor/schema-builder/blob/main/ICONS.md) well chosen.
     - Are the fields well-structured and have good labels.
     - Do the dropdowns (etc.) work well and show helpful data. -->

### Search

<!-- **Test the search** of your preset and share relevant **screenshots** here.
     - Test the preset name as search terms.
     - Also test the preset terms and aliases as search terms (if present). -->

### Info-`i`

<!-- **Test the info-i** for your fields and preset and share relevant **screenshots** here.
     The info needs to help mappers understand the preset and when to use it.
     [Learn more…](https://github.com/openstreetmap/id-tagging-schema/blob/main/CONTRIBUTING.md#info-i)
 -->

### Wording

- [ ] American English
- [ ] `name`, `aliases` (if present) use Title Case
- [ ] `terms` (if present) use lower case, sorted A-Z
<!-- Learn more in https://github.com/openstreetmap/id-tagging-schema/blob/main/GUIDELINES.md#2-design-the-preset -->

@github-actions
Copy link

🍱 Your pull request preview is ready

Please use this preview to check your changes. Ideally use the test documentation template and document your test results by commenting on the PR. This will speed up the review process for everyone.

FYI, once this PR is merged, you can use the iD Editor Preview to test your changes in interaction with all other changes.

"ref",
"direction_vertex"
],
"moreFields": [],
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it (or elsewhere) changing behaviour by blocking implicit inheritance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked this one and a few others (with both fields and moreFields) and they previously didn't block implicit inheritance (which also matches the implementation: https://github.com/openstreetmap/iD/blob/d9b070be735d76e6c3d47bf4d532cde42d9d0e8c/modules/presets/preset.js#L295-L336) and don't do it either now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

then it is quite useful as I would expect empty array to block it

Copy link
Collaborator

@matkoniecz matkoniecz left a comment

Choose a reason for hiding this comment

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

annoying to test, but seems to not break anything?

and clarifying implicit inheritance status is helpful

@tyrasd tyrasd merged commit 95fab6d into openstreetmap:main Oct 21, 2025
5 checks passed
@FloEdelmann FloEdelmann deleted the cleanup branch October 21, 2025 09:38
@tyrasd
Copy link
Member

tyrasd commented Oct 22, 2025

In
dbd2a9c, I had to revert a small part of this PR, as it turns out that the addTags: {} does have an effect which is required for the Address preset to work properly.

@FloEdelmann
Copy link
Contributor Author

Oh, thanks for noticing and reverting! Sorry I didn't catch this during testing.

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.

3 participants