Skip to content

Garage(s): Only keep capacity as fields#423

Merged
tyrasd merged 4 commits intoopenstreetmap:mainfrom
tordans:patch-3
May 12, 2022
Merged

Garage(s): Only keep capacity as fields#423
tyrasd merged 4 commits intoopenstreetmap:mainfrom
tordans:patch-3

Conversation

@tordans
Copy link
Copy Markdown
Collaborator

@tordans tordans commented Mar 22, 2022

Move fields from from https://github.com/openstreetmap/id-tagging-schema/blob/main/data/presets/building.json to the moreFields section to only show very relevant fields by default.

When using those presets I noticed that I tend to add the capacity to the level or height fields instead of the capacity fields. Since those (and all other) are not really common on garages, we should move the to the moreFields.


Would it be possible to write the code like this which could result in the same but a better data structure. However, I am not sure if the moreField would just merge the fields + moreFields values if used like this.

{
    "icon": "fas-warehouse",
    "fields": [
        "capacity"
    ],
    "moreFields": [
        "{building}"
    ],
}

Move fields from from https://github.com/openstreetmap/id-tagging-schema/blob/main/data/presets/building.json to the moreFields section to only show very relevant fields by default.
@tordans tordans changed the title garages: Only keep capacity as field Garages: Only keep capacity as fields Mar 22, 2022
@tordans tordans changed the title Garages: Only keep capacity as fields Garage(s): Only keep capacity as fields Mar 22, 2022
tyrasd added 2 commits May 12, 2022 11:28
… and use template syntax to tidy up moreFields list slightly
and also copy "moreFields" from building/garages preset
@tyrasd
Copy link
Copy Markdown
Member

tyrasd commented May 12, 2022

Would it be possible to write the code like this which could result in the same but a better data structure.

This inheritance works separately for fields and moreFields: In your example, this would only copy the moreFields from the building preset into the garages preset. I've tweaked your PR to use this inheritance to get rid of some of the fields in the list.

See ideditor/schema-builder#53 for further potential enhancements in this direction.

@tyrasd tyrasd merged commit 7b1b424 into openstreetmap:main May 12, 2022
@tordans tordans deleted the patch-3 branch May 13, 2022 07:36
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.

2 participants