MarcusWolschon / osmeditor4android

Vespucci is a OpenStreetMap editor for Android
http://vespucci.io
Other
378 stars 83 forks source link

Display short_description on long press (default presets and custom presets) #1140

Open plcp opened 4 years ago

plcp commented 4 years ago

Vespucci Version

14.0.17

Download source

From Google PlayStore

Behaviour/Symptoms

When both display_value and short_description are set in a preset, short_description is ignored and not displayed. It seems to not be displayed elsewhere and inaccessible to the user.

This seems like a documented choice of Vespucci and thus this issue is a feature request.

Expected Behaviour

JOSM shows the provided description below the display value and this is most useful to give precisions on the use of a preset, notably on custom combo with list_entry keys.

One way to integrate this into Vespucci's UI may be spawning on a long press on the key a pop-up including details such as the options and their full description. An alternative would be a small blue « i » icon to tap or long press on the top-right corner of the key.

How to recreate

  <chunk id="water_level">
    <combo key="maxheight" text="Eau en galerie (entre&#xA0;1&#xA0;et&#xA0;10)" default="" values_sort="false">
      <list_entry value="1" display_value="Sec (1)" short_description="Sol propre, sablonneux, sec." />
      <list_entry value="2" display_value="Humide (2)" short_description="Sol humide, peu boueux, pas de flaques." />
      <list_entry value="3" display_value="Très Humide (3)" short_description="Sol très humide, pas de ruissellements, flaques occasionnelles." />
      <list_entry value="4" display_value="Boueux (4)" short_description="Sol boueux, aspect vaseux, marche difficile." />
      <list_entry value="5" display_value="Ruissellements (5)" short_description="Sol peu boueux, ruissellements, flaques occasionnelles." />
      <list_entry value="6" display_value="Peu Inondé (6)" short_description="Pieds recouverts, ruissellements par segments." />
      <list_entry value="7" display_value="Assez Inondé (7)" short_description="Genoux recouverts, cuissardes appréciées." />
      <list_entry value="8" display_value="Très Inondé (8)" short_description="Taille recouverte, cuissardes remplies." />
      <list_entry value="9" display_value="Totalement Inondé (9)" short_description="Torse recouvert, parfois épaules, l'eau ne touche pas le ciel." />
      <list_entry value="10" display_value="Danger, Immergé (10)" short_description="L'eau touche le ciel, épaules toujours recouvertes, complètement immergé." />
    </combo>
  </chunk>

Any other potentially relevant information

An another alternative would be to hack <link> entries with href keys set to inline data:image/svg+xml; ... svg describing the content.

simonpoole commented 4 years ago

Currently we throw away everything except the value we display in the end and a potential icon.

My thoughts up to now have been to add an info button or something similar that would provide a possible wiki link and any additional information. Implementing this will become more relatistic when we drop support for old devices in version 15 and can assume that we have a fairly large heap available on all supported devices.

Related https://github.com/MarcusWolschon/osmeditor4android/issues/986