SCEE icon indicating copy to clipboard operation
SCEE copied to clipboard

Add multiselect possibility for road segments

Open SLMapper opened this issue 2 years ago • 9 comments

Screenshot_20231118-181943_SCEE

Use case Several times I have the need to update multiple road segments at once with the same attributes (e.g. maxspeed). Allowing to select them at once would make this a smooth instead of demanding experience.

Proposed Solution

  • Add a button, which on press would let you choose additional segments to be selected.
  • Highlight all as selected of course.
  • Display the number of selected segments after the road type name
  • Change road type name to a generic, if different types are selected.
  • On "show/edit tags", show a kursive placeholder text for different values.
  • Allow to add / change / delete tags with the same value for all.

Alternative or additional feature:

  • Add last added key-value combination as suggestion to the bottom of the show/edit tags table (maybe even for multiple ones, when having added multiple of them)
  • have possibility to accept (add) or deny (not add) this.

This would however not help in an "edit" situation (unless it will also be presented in this case and on accept being merged/overwritten over the former value)

Edit: I discovered that kind of this already exists in the way that last values are displayed at the top of the suggested value dropdown 👍

SLMapper avatar Nov 18 '23 17:11 SLMapper

This is an excellent idea, and I'd be surprised if this wasn't implemented upstream in StreetComplete. Have you suggested it as a 'core' quest?

Thanks,

chris_debian

chrisdebian avatar Nov 18 '23 17:11 chrisdebian

Thank you! I first thought, yes let me post it there.

But how would the use case look for SC? I think the huge benefit would be for custom overly and show/edit tags, which does not exist in SC. For quests and overlys in SC a subsequent single select and answer certainly requires more clicks, but typically not this huge amount of typing duplicate text.

What do you think? Do you see a significant improvement for SC as well?

SLMapper avatar Nov 18 '23 19:11 SLMapper

The discussion in SC was done before introduction of overlays, but I doubt multi-select would be accepted now: https://github.com/streetcomplete/StreetComplete/issues/2996

It should be possible to implement such a multi-select mechanism, but this will require large changes to many things that expect a single element. I remember I had tried implementing this quite a while ago, but without even getting a useful start...

Helium314 avatar Nov 20 '23 10:11 Helium314

Thank you. Understand. I think the effort comes with handling & displaying selected data, not with adding data, right? Would the change be still big if only done for custom overlys? In this case there are no other ui elements to be considered than the key-value table, last edit date and quest suggestion.

SLMapper avatar Nov 20 '23 10:11 SLMapper

I think the effort comes with handling & displaying selected data, not with adding data, right?

Highlighting multiple element should already be possible, and selecting multiple elements is likely not too much work. Dealing with multiple elements will likely require more work. If it's for the custom overlay only, some sort of modified tag editor could be implemented. Getting the multi edit thing to work with the current system handling edits might be tricky, but should be doable.

Helium314 avatar Nov 20 '23 12:11 Helium314

The care should be taken that it is easy and quick to add multiple elements to selection (or the whole point is moot), but also (even more importantly) that the chance of modifying multiple elements by error is minimized.

IMHO, JOSM just barely manages that by its differentiating between click, ctrl-click, shift-click and shift-click-drag-bbox and allowing ctrl-shift-z (that undoes only last incorrect selection) as well as ctrl-f set substractions/additions, but I have not seen mobile implementation that would actually be usable in majority of cases (e.g. Vespucci has double-click-to-enter-multiselect-mode but in practice I find it more trouble than it is worth, so I basically never use it)

mnalis avatar Nov 22 '23 22:11 mnalis

Current behavior is that

  • when having selected one
  • the details/edit view at the bottom opens up (as seen in the screenshot above)
  • clicking on another element on the map changes the selecting to this

One idea for implementation (you may find better ideas): If in this details/edit view there would be a toggle / checkbox to (enable) "multiselect", after enabling it, selecting other elements would not change selection, but instead add them to the selection. Unselection can be done by clicking the element again.

Currently nothing happens / changes if you click the same element again. Clicking the baloon however removes selection. multiselect

SLMapper avatar Nov 23 '23 10:11 SLMapper

That should be possible using MainFragment.onClickedElement. Then check whether f is a CustomOverlayForm and has some multi select mode enabled.

Helium314 avatar Nov 27 '23 07:11 Helium314