Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show more relevant presets when switching preset of an object #10138

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tyrasd
Copy link
Member

@tyrasd tyrasd commented Feb 28, 2024

When changing the preset of an existing object, the preset list currently contains a few of the recently used presets and a relatively long "default" list of presets which match the selected feature's geometry. Listing the completely context-less list of "defaults" is in general not very useful: it is pretty unlikely that one wants to change a building feature to something completely different like a park for example.1 Usually one wants to change an object's preset to either refine it (choosing to a more specific sub-preset, e.g. from a Doctor to a General Practitioner), or update the map by choosing a closely related preset (e.g. when switching from a shop=shoes to shop=clothes if a POI changed in reality or the POI was previously mapped incorrectly).

In this PR, the suggestions are based on the object's previous preset:

  • if it was part of a category, show that category again (e.g. editing a highway=primary will offer the "Major Roads" category)
  • if a preset has sub-presets: offer up to 5 of these (e.g. barrier=kerb will offer presets like Raised Curb, Lowered Curb, etc.)
  • show the "partent" i.e. more generic preset if there is a matching one
  • show up to 5 "sibling" presets

(currently this also increases the number of shown previously used presets from 4 to 5, see #9545)

Some unfinished business:

  • should these be sorted differently, e.g. before the previously used presets)?
  • should there be a visual separation between these suggestions, the recents and the defaults?
  • investigate if a better sorting of candidates could be done when many siblings exist (e.g. building=yes might more likely be changed to a common building type like building=house, compared to something rare like building=yurt for example)
  • add mechanism to offer more related presets (and/or more recently used presets)
  • add test cases

Footnotes

  1. There is a little bit of merit to not completely omit showing these defaults, tough: It teaches the mapper that there are many very different thing one can map in OSM: e.g. from natural features, landuse and water features, to points of interest, etc.

suggestions are based on the object's previous preset:
* if it was part of a category, show that category again (e.g. editing a `highway=primary` will offer the "Major Roads" category)
* if a preset has sub-presets: offer up to 5 of these (e.g. `barrier=kerb` will offer presets like Raised Curb, Lowered Curb, etc.)
* show the "partent" i.e. more generic preset if there is a matching one
* show up to 5 "sibling" presets

this also increases the number of shown previously used presets from 4 to 5.

todo:
* should these be sorted differently, e.g. before the previously used presets)?
* should there be a visual separation between these suggestions, the recents and the defaults
* investigate if better candidates could be found when many siblings exist
* add mechanism to show more related presets (or recently used presets)
* write test cases
@tyrasd tyrasd added usability An issue with ease-of-use or design preset An issue with an OpenStreetMap preset or tag labels Feb 28, 2024
@tyrasd tyrasd added this to the 2.29 milestone Feb 28, 2024
@tyrasd tyrasd marked this pull request as draft February 28, 2024 12:38
@tyrasd tyrasd changed the title show more relevant presets when chaning preset of an object show more relevant presets when switching preset of an object Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preset An issue with an OpenStreetMap preset or tag usability An issue with ease-of-use or design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant