openstreetmap / id-tagging-schema

🆔🏷 The presets and other tagging data used by the iD editor
ISC License
156 stars 157 forks source link

Reuse labels for `traffic_calming` #1246

Closed Dimitar5555 closed 3 months ago

Dimitar5555 commented 4 months ago

Resolves #1152

Note: I haven't tested it which is why I've marked it as a draft.

github-actions[bot] commented 4 months ago

:bento: You can preview the tagging presets of this pull request here.

Dimitar5555 commented 4 months ago

It looks like it's not working. Will adding presets/ in the beginning fix the problem?

image

tordans commented 4 months ago

@Dimitar5555 I think the way to do this is https://github.com/ideditor/schema-builder?tab=readme-ov-file#stringscrossreference When I look through the code https://github.com/search?q=repo%3Aopenstreetmap%2Fid-tagging-schema+%22strings%22&type=code&p=2 I see cases like https://github.com/openstreetmap/id-tagging-schema/blob/87d7b90f93c822c879392466016c55b0e7932905/data/fields/crossing/markings_yes-PL.json#L14 But looking at https://github.com/search?q=repo%3Aopenstreetmap%2Fid-tagging-schema+%22options%22&type=code&p=5 there is no case that looks like what you are doing.

In general, this reference feature only works in very specific cases, not always.

Dimitar5555 commented 4 months ago

stringsCrossReference is for the options in a field. It's not related to the field's label. Currently it's not possible to cross reference labels between presets and fields. This is a limitation of the schema builder.

Blocked by https://github.com/ideditor/schema-builder/issues/162

tordans commented 3 months ago

@Dimitar5555 thanks for opening the other issue. Can we close this PR until that is resolved?