openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.34k stars 1.2k forks source link

Improve presets=* feature (Favorites, UI) #6665

Open tordans opened 5 years ago

tordans commented 5 years ago

My goal is to create a single purpose editor by changing the iD config. This editor should only allow and show what is need for the current single purpose so learning the tool is as easy as possible and users cannot break too much by accident.

As as follow up to https://github.com/openstreetmap/iD/issues/6553, I suggest …

a. Automatically make all presets of the presets-parameter (list and external file) a favorite in the new toolbar.

Example: Right now, one can create a singe purpose editor but the favorites are empty at the start, which makes it harder to spot the single purpose action. http://preview.ideditor.com/master/#background=Berlin-2019&disable_features=boundaries&locale=en&map=20.48/52.47762/13.44972&presets=amenity/bicycle_parking

b. I also suggest to hide the "Add Feature"-Feature, whenever all current presets are part of the favorites-bar. The dorpdown does not have any advantage in this situations and only makes the UI more complex.

c. I also suggest to hide the default "Favorites" "add node, way, area" whenever the presets=* feature is used, since those presets already specify the type of mapping and allow choosing the correct type (node, way…) via the preset.

quincylvania commented 5 years ago

Thanks for the suggestions, @tordans! I thought this would be tricky since the quick presets were tied to geometry, but we changed that for #6760.

Now the toolbar works as described when using the presets parameter. If more than 10 presets are allowed then the Add Feature browser dropdown will reappear.

This should be really useful for targeted mapping!

Screen Shot 2019-08-19 at 3 30 18 PM