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

Add multiselect possibility for road segments #493

Open
SLMapper opened this issue Nov 18, 2023 · 8 comments
Open

Add multiselect possibility for road segments #493

SLMapper opened this issue Nov 18, 2023 · 8 comments

Comments

@SLMapper
Copy link

SLMapper commented Nov 18, 2023

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 👍

@chrisdebian
Copy link

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

@SLMapper
Copy link
Author

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?

@Helium314
Copy link
Owner

The discussion in SC was done before introduction of overlays, but I doubt multi-select would be accepted now: streetcomplete#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...

@SLMapper
Copy link
Author

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.

@Helium314
Copy link
Owner

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.

@mnalis
Copy link
Collaborator

mnalis commented Nov 22, 2023

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)

@SLMapper
Copy link
Author

SLMapper commented Nov 23, 2023

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

@Helium314
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants