Skip to content

Move category file into a prop of preset #283

@tordans

Description

@tordans

Right now, the category a preset belongs to is handled in a separate file.
Whenever we add presets, we need to remember to update those lists.
Instead, we could make this a prop of the preset.

See openstreetmap/id-tagging-schema#1916 (comment) where we noticed that some where missing and discussed the sort order.

Advantage: Easy to see remember whenever we work on the preset.
Disadvantage: We need to find a different way to sort the presets (now it is the order of the category-array; could be usage stats or just A-Z or a weight prop).

Possible code…

{
  categories: [ 
    { key: 'playground', weight: 1.1 } 
  ]
}
{
  categories: { 
    playground: 1.1 
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions