lizmap-web-client icon indicating copy to clipboard operation
lizmap-web-client copied to clipboard

UI: Double clicking on group propagating the checked state

Open rldhont opened this issue 1 year ago • 17 comments

When double clicking on a group label or checkbox, the new checked state of the group will be propagated through the tree to all the children.

With this capability, the user will be able to check all the layers contained in a group whatever the depth.

lizmap-dblclicking-treeview

rldhont avatar Feb 08 '24 11:02 rldhont

Nice idea !

Gustry avatar Feb 08 '24 11:02 Gustry

Sometimes the double click does not work. It might due to the label being linked to the checkbox. @Gustry @mdouchin could you also test?

https://github.com/3liz/lizmap-web-client/assets/2145040/3f62fe94-a20e-4785-8dfa-559c6c625714

nboisteault avatar Feb 08 '24 16:02 nboisteault

Sometimes the double click does not work.

Indeed, I can confirm. An idea, maybe an icon could be added, similar to the "I" ? (not the best, but similar)

Gustry avatar Feb 09 '24 08:02 Gustry

@Gustry @nboisteault @mdouchin It is ready for review!

rldhont avatar Mar 29 '24 15:03 rldhont

Strange, I can't even try on the "Montpellier" project :

image

@nboisteault Which project did you use ?

Gustry avatar Apr 02 '24 13:04 Gustry

My comments above remains valid, I don't have any chekbox to try on the "Montpellier" project. On which project are you trying ?

Gustry avatar Apr 15 '24 12:04 Gustry

My comments above remains valid, I don't have any chekbox to try on the "Montpellier" project. On which project are you trying ?

The "Montpellier" project activates the option to disabled checkboxes for groups.

I am using the "testsrepository/treeview" project.

rldhont avatar Apr 15 '24 12:04 rldhont

I am using the "testsrepository/treeview" project.

Ok, but the first "group" in this project, it doesn't work for me with this PR.

Gustry avatar Apr 15 '24 12:04 Gustry

I am using the "testsrepository/treeview" project.

Ok, but the first "group" in this project, it doesn't work for me with this PR.

What do you mean by it doesn't work for me ?

rldhont avatar Apr 15 '24 13:04 rldhont

Freshly load the map http://lizmap.local:8130/index.php/view/map?repository=testsrepository&project=treeview Peek 2024-04-15 16-06

I do only double click

Gustry avatar Apr 15 '24 14:04 Gustry

Freshly load the map http://lizmap.local:8130/index.php/view/map?repository=testsrepository&project=treeview

I do only double click

Thanks. The first double click works, not the second one.

rldhont avatar Apr 15 '24 14:04 rldhont

This PR is a good move, but I'm not 100% convinced by the approach, given the number of feedbacks on this. A double click is "unknown" on a web interface.

Fine to discuss

Gustry avatar Apr 22 '24 12:04 Gustry

@nboisteault @Gustry @mdouchin @mind84 @gioman @josemvm @guenterw

I proposed the double click to propagate checked status to tree children, but I can implement an other way to do so. What is your prefered way to propagate checked status to tree children:

  1. Double click
  2. Click right
  3. Click middle
  4. Long press click

rldhont avatar Apr 24 '24 07:04 rldhont

If I understand (translate) it correctly, it is the function that is used in QGIS with Ctrl+click. Since not every user uses QGIS, I think the double-click is also best

guenterw avatar Apr 24 '24 07:04 guenterw

hi @rldhont for LWC >=3.7 we lost the text of the tooltip that is shown when the mouse passes over the layer name in the layer tree and i don't know if that was intentional... regardless of the choice, how do you intend to inform the user of the existence of this functionality?

however, i prefer double click

josemvm avatar Apr 24 '24 10:04 josemvm

Yes, if the choice is between what @rldhont exposed this morning, my choice is also with double click as well.

I was wondering if the behavior of 3.6 should be back or similar. Let's go with this PR and see.

regardless of the choice, how do you intend to inform the user of the existence of this functionality?

For now, I'm not sure too. I want to integrate a tutorial like https://github.com/3liz/lizmap-javascript-scripts/tree/master/library/ui/driver_tutorial from @altheaFeu

Gustry avatar Apr 24 '24 12:04 Gustry

One more basic thought about the group checkboxes: Since you have to decide whether to display them or not, I always choose to hide the group checkboxes. For example, if you have a group of aerial images with a checkbox, with the aerial images of the last 10 years, then there is always the risk that the group is checked and thus all 10 aerial images are loaded on top of each other. Or in the case of development plans: There is a group of development plans, including groups for 6 districts and the respective plans. Now it can make sense to show all plans for a district, but not necessarily for the whole municipality.

On the other hand, it often makes sense to activate all layers of a group. I would currently control this via the QGIS themes.

Thus, there is actually the desire to determine the display of the group checkbox per group. But this then leads to an inconsistent picture of the legend. Is this acceptable?

@Gustry I think the tutorial is a good idea

guenterw avatar Apr 24 '24 16:04 guenterw

The Lizmap project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 2 months and is being automatically marked as "stale". If there is no further activity on this pull request, it will be closed in two weeks.

github-actions[bot] avatar Jun 24 '24 15:06 github-actions[bot]

The Lizmap project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 2 months and is being automatically marked as "stale". If there is no further activity on this pull request, it will be closed in two weeks.

github-actions[bot] avatar Jun 26 '24 15:06 github-actions[bot]