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

Overlay selector is counter-intuitive #211

Closed
Phyks opened this issue Jun 20, 2019 · 11 comments
Closed

Overlay selector is counter-intuitive #211

Phyks opened this issue Jun 20, 2019 · 11 comments
Milestone

Comments

@Phyks
Copy link
Contributor

Phyks commented Jun 20, 2019

Hi,

It seems the overlay selector is broken. Indeed, when going to the layers panel, expanding the list and clicking "Mapillary coverage", the line gets selected but the checkbox is never ticked. The overlay is actually rendered without overlaying apparently.

2019-06-21-004326

When clicking the checkbox, nothing happens.

2019-06-21-004333

@Phyks Phyks changed the title Coverage selector is broken Ovelay selector is broken Jun 20, 2019
@nrenner
Copy link
Owner

nrenner commented Jun 21, 2019

This is how it's supposed to work:

  • click on the name shows a preview of that layer without any other layers (active layers turned off)
  • the checkbox adds (or removes) the layer to the layer switcher

So despite looking similar with the checkbox, it's not an extended layer switcher - it configures the layer switcher. I guess this somehow needs to be made more clear.

@Phyks
Copy link
Contributor Author

Phyks commented Jun 21, 2019

click on the name shows a preview of that layer without any other layers (active layers turned off)

Ok! This works fine for me (although this is not very intuitive). I'd tend to prefer not changing the usual behavior of clicking a label to tick the checkbox (especially on touch screens). Another option (maybe clearer from UX point of view) would be to have a magnifying glass icon next to the item to toggle the preview mode?

Capture d’écran 2019-06-21 à 11 39 01

the checkbox adds (or removes) the layer to the layer switcher

When ticking the checkbox, the overlay layer is not shown on the map for me (checked with different overlays, this is not a mapillary coverage bug). I can reproduce on http://brouter.de/brouter-web/.

No error in the console, no network calls made (so the layer is somehow not fetched) :/

This is only the case for the "More" overlays, such as Mapillary coverage or Waymarked Trails MTB. The default overlays (Waymarked Trails Hiking/Cycling etc) do work fine.

@nrenner
Copy link
Owner

nrenner commented Jun 21, 2019

Ticking the checkbox does not show the layer, it only adds it to the layer switcher list. To activate you need to tick it in the layer switcher (tha part above the buttons).

@Phyks
Copy link
Contributor Author

Phyks commented Jun 21, 2019

Ticking the checkbox does not show the layer, it only adds it to the layer switcher list. To activate you need to tick it in the layer switcher (tha part above the buttons).

Got it! Sorry about this, I definitely missed the way it should be working…

In my opinion, the "Personal layers" button works very well because, first the labelling hints that it will only add it to the list and then the selector is in a modal and user can see the effect on the layer list through transparency. Ideas to improve the UX here could be:

  • Rename the "Plus" button to something emphasizing that the layers will be added in the list. Something like "Settings" or "Favorite layers" or something like this?
  • Maybe use a modal for this "Plus" submenu?

@Phyks Phyks changed the title Ovelay selector is broken Ovelay selector is counter-intuitive Jun 21, 2019
@Phyks Phyks changed the title Ovelay selector is counter-intuitive Overlay selector is counter-intuitive Jul 1, 2019
@Phyks
Copy link
Contributor Author

Phyks commented Jul 5, 2019

There is another bug that clicking a category will not check/uncheck all the items within it.

I tried to work a bit on this but jsTree is quite a nightmare and very rigid, I did not manage to do much… current attempt is at https://github.com/nrenner/brouter-web/compare/master...Phyks:overlay_selector?expand=1.

@nrenner
Copy link
Owner

nrenner commented Jul 5, 2019

I disabled root nodes on purpose.

Because I thought it would make the handling easier (multiple selection is also disabled), not be a common use case and also thought the disabled style looks nice because it better distinguishes the root nodes and emphasises the leaf nodes.

@nrenner
Copy link
Owner

nrenner commented Jul 5, 2019

As for the magnifying glass icon you suggested, one approach might be to use CSS ::after with content on the selection class of jsTree.

@Phyks
Copy link
Contributor Author

Phyks commented Jul 9, 2019

I disabled root nodes on purpose.

This is fine for me, but root nodes should probably not have a checkbox icon then :)

As for the magnifying glass icon you suggested, one approach might be to use CSS ::after with content on the selection class of jsTree.

Actually, I though about it. Adding a magnifying glass icon is not a big deal. Handling properly the hover effect and the click action, overloading the jsTree default behavior is quite a nightmare or would require a lot of JS. :/

@nrenner
Copy link
Owner

nrenner commented Jul 13, 2019

but root nodes should probably not have a checkbox icon then :)

It still serves as indicator whether child nodes are selected or not. Disabled checkboxes seem to be styled with opacity=0.8 (maybe not obvious enough).

I misinterpreted your magnifying glass suggestion as a pure tooltip. Because my idea for a first improvement would have been to keep the behaviour, but to provide better feedback/hints, ideas:

  • tooltip on hover over name (not checkbox) indicating preview (like the magnifying glass), with an active state when selected
  • and/or "Preview" message box in a corner of the map
  • "add" indicator for the checkbox, e.g. plus sign inside the checkbox?
  • hint that layer was added when checkbox clicked, e.g. message box or animation moving the checked tree entry to the insert position in the switcher list

I chose the option to separate selection from checkbox click on purpose, as this is how I imagined it when thinking about this feature. The idea was that with a couple of lesser known and regional layers, where you would need to check coverage of your area, clicking or keying through the previews of multiple layers should be easy and more prominent than finally adding a chosen layer.

@Phyks
Copy link
Contributor Author

Phyks commented Jul 16, 2019

Disabled checkboxes seem to be styled with opacity=0.8 (maybe not obvious enough).

Indeed, I did not spot it before you told me :) Maybe not having a hand cursor on these would help as well?

I misinterpreted your magnifying glass suggestion as a pure tooltip. Because my idea for a first improvement would have been to keep the behaviour, but to provide better feedback/hints, ideas:

This looks like a nice workflow to me to help users understand the behavior of the list!

@nrenner
Copy link
Owner

nrenner commented Jul 20, 2019

Maybe not having a hand cursor on these would help as well?

The pointer cursor is indeed a bit misleading, but e.g. a not-allowed cursor would need to be applied to the checkbox only, as there is still the double-click on the text to collapse/expand (default cursor?).

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

No branches or pull requests

3 participants