Skip to content

improve definition of template presets be be less confusing#1766

Merged
tyrasd merged 3 commits intoopenstreetmap:mainfrom
matkoniecz:patch-17
Nov 18, 2025
Merged

improve definition of template presets be be less confusing#1766
tyrasd merged 3 commits intoopenstreetmap:mainfrom
matkoniecz:patch-17

Conversation

@matkoniecz
Copy link
Copy Markdown
Collaborator

fixes ideditor/schema-builder#216

Description, Motivation & Context

intended to replace weird and unusual construct with more widely used one, to achieve the same effect

Related issues

ideditor/schema-builder#216

Links and data

Relevant OSM Wiki links:

none

Relevant tag usage stats:

none

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
Copy Markdown

🍱 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.

Copy link
Copy Markdown
Collaborator

@k-yle k-yle left a comment

Choose a reason for hiding this comment

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

I think we'll need to update iD first – If you create a node tagge with @template=poi, this preset will now match, which is unexpected

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

I think that an internal preset appearing if someone puts in unreasonable tagging is entirely fine.

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

I think we'll need to update iD first – If you create a node tagge with @template=poi, this preset will now match, which is unexpected

screen-2025-11-12-15-06-13

actually, it will not

to check: is it still true after e5f076c

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

still does not

screen-2025-11-12-15-09-39

@matkoniecz matkoniecz changed the title avoid confusing contruct avoid unnecessary confusing contruct Nov 12, 2025
@matkoniecz matkoniecz marked this pull request as ready for review November 12, 2025 14:11
@k-yle
Copy link
Copy Markdown
Collaborator

k-yle commented Nov 13, 2025

actually, it will not

for completeness: it is matching, which is why you can see contact:facebook in moreFields. A normal node doesn't have contact:facebook.

whether this matters is a different question 🤷

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

I was happy that label will not change. I will check how it changes influence on fields but if adding truly weird tag will cause some moreFields to match I see no problem

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

Actually, "point has no tags" error disappearing and facebook presets appearing in moreTags is not being changed from the current iD anyway.

@tyrasd
Copy link
Copy Markdown
Member

tyrasd commented Nov 18, 2025

yeah, the idea to have this (admittedly quite confusing) construct was to make the preset never actually match any osm feature, even in the case that a user was adding the @template dummy tag on purpose. But for some reason it is not working as expected right now. I'll investigate this.

Also, it would probably less confusing to model it like locationSet: { exclude: ["Planet"] }

tyrasd added a commit to openstreetmap/iD that referenced this pull request Nov 18, 2025
this lets the preset to properly fall back to the generic point,linea or area preset in case no preset matches in the current region

see openstreetmap/id-tagging-schema#1766 (comment)
these should never actually apply to any real OSM feature on the planet.
@tyrasd tyrasd changed the title avoid unnecessary confusing contruct improve definition template presets be be less confusing Nov 18, 2025
@tyrasd tyrasd merged commit bd17024 into openstreetmap:main Nov 18, 2025
5 checks passed
@tyrasd tyrasd changed the title improve definition template presets be be less confusing improve definition of template presets be be less confusing Nov 18, 2025
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.

Document what include=999 + exclude=999 means

3 participants