gligen-gui icon indicating copy to clipboard operation
gligen-gui copied to clipboard

combine "show-all" and "hide-all" buttons

Open kuldp18 opened this issue 2 years ago • 2 comments

I think a toggle button is better than having two separate buttons. The toggle button changes states based on if the boxes are visible or not.

kuldp18 avatar Feb 19 '24 12:02 kuldp18

I found several issues with this.

  1. Firstly it isn't functionally the same; with this there is no way to instantly show/hide all the boxes.
  2. If I start with all boxes visible, the button says "HIDE ALL" but if I individually hide every box; the button still says "HIDE ALL".
  3. Similarly if I start with all boxes hidden, the button says "SHOW AL" but if I individually make every box visible it still says "SHOW ALL"
  4. It is confusing for the user to see some of the boxes visible and a button saying "HIDE ALL"; but upon clicking that button instead of all the boxes being hidden (like you'd expect from what the button says); it hides the ones that were visible and instead shows the ones that were hidden.

I think if points 2 and 3 were fixed this could possibly be a useful additional feature.

mut-ex avatar Feb 20 '24 02:02 mut-ex

I found several issues with this.

  1. Firstly it isn't functionally the same; with this there is no way to instantly show/hide all the boxes.
  2. If I start with all boxes visible, the button says "HIDE ALL" but if I individually hide every box; the button still says "HIDE ALL".
  3. Similarly if I start with all boxes hidden, the button says "SHOW AL" but if I individually make every box visible it still says "SHOW ALL"
  4. It is confusing for the user to see some of the boxes visible and a button saying "HIDE ALL"; but upon clicking that button instead of all the boxes being hidden (like you'd expect from what the button says); it hides the ones that were visible and instead shows the ones that were hidden.

I think if points 2 and 3 were fixed this could possibly be a useful additional feature.

Biggest issue is managing state and rendering the correct state. I will try to work on the bugs. Can I implement some hacky state management to tackle this?

kuldp18 avatar Feb 20 '24 09:02 kuldp18