grist-core icon indicating copy to clipboard operation
grist-core copied to clipboard

[UI Issue] Option to collaps left side bar pages by default

Open S7venLights opened this issue 2 years ago • 6 comments

We have a table with a lot of pages sorted into categories. When opening the public link all those categories are expanded by default, making it hard to navigate. PYT Issue report collapse 1

Would be nice to have an option for collapsed by default (see screenshot). If there is such an option, sorry I wasn't able to find it. PYT Issue report collapse

S7venLights avatar Feb 12 '23 15:02 S7venLights

PS this doc is still under construction, please don't share far and wide yet

S7venLights avatar Feb 12 '23 15:02 S7venLights

I understand the request, and it makes sense. Similar ideas have come up before with variations, e.g. in this request in the Community Forum: https://community.getgrist.com/t/remember-collapsed-navigation-items-and-favorites/1443.

We'd welcome a proposal for how it could work to satisfy these overlapping needs.

dsagal avatar Feb 27 '23 23:02 dsagal

I'd +1 this request - adding lots of tables begins creating a lot of visual noise, especially when they're functional tables that aren't really used by users directly but are used by multiwidget pages. I can reduce the noise by hiding various tables inside parent tables, but only if they stay collapsed by default.

For conceptual implementation, one option is to store state for the arrow for returning viewers. But then you have to store state for each parent table, for each user.

A simpler approach that would require only one stored variable per document would be a checkbox option in Document Settings to "Default collapse nested tables for all users". This would work in the opposite way it does now: the state of collapse isn't remembered upon reload, but it defaults to collapsed. Users can expand categories if they wish. That seems like it would cover most users' needs who have lots of tables.

I would agree with the other poster in the community forum that it would be nice to have category headers that are not tables and serve only as section headers to categorize other tables, but that's a separate issue (though it'd work nicely with "Default collapsed").

derekmoeller avatar Feb 27 '23 23:02 derekmoeller

Agree with @derekmoeller although instead of only having the collapse all setting in the doc settings.

Perhaps there can be a button in the left tables panel that let's you collapse all and expand all. The button could be on top of the left panel under the 'Add New' button.

So to be clear, implementing both @derekmoeller and my idea would cover all needs.

As to https://community.getgrist.com/t/remember-collapsed-navigation-items-and-favorites/1443 I think if someone specifically needs the state to be remembered, maybe that could be done with cookies??

S7venLights avatar Feb 28 '23 13:02 S7venLights

Noticed the new feature of having the emoji not appear twice... Nice!

S7venLights avatar Jul 22 '23 23:07 S7venLights

Any progress on this. Having the tables collapsed by default would be really helpful

DavidFabijan avatar Apr 17 '25 08:04 DavidFabijan

What do you all think about this design? It's just a new menu item, so no visible changes in the UI normally. There would be a new option -- only for pages that contain children -- to save this page's state, shown as "Collapse by default" when it's collapsed, or "Expand by default" when it's expanded:

Image

Using the option will update a new bit in the page's saved state. Since the "saving" of the state is a creator action (part of configuring the document for other users), it seems OK if it's two clicks away and has to be done for each page, but it adds some flexibility compared to "expand all / collapse all".

Feedback welcome!

dsagal avatar Jun 30 '25 13:06 dsagal

That looks good. Very good in fact. In my case I have quite a few levels of children in my document (yes things might have grown a bit out of hand), and being able to collapse just a few levels would be amazing.

DavidFabijan avatar Jun 30 '25 14:06 DavidFabijan

Indeed it would be very handy, thanks for the design proposal and self-assignment :-)

Related: on some software, you can ctrl+click (or alt+click or shift+click) on the arrow to expand or collapse all the children/sub-tree of the selected item.

For example it is the case for MacOS file explorer. Same in VSCode.

It could help quickly navigate complex documents – moreover it would be possible to add a root page element (I often do that for sections) to allow this tweak to work for the whole document pages tree.

tayflo avatar Jul 15 '25 20:07 tayflo

This ability to save collapsed/expanded state of items has gotten released!

Image

The main ask of this issue was to allow the creator to configure the document with many pages to hide the noise and help end-users see the more important ones. This new Set default: Expand/Collapse option addresses it, so I'm closing the issue.

There were some other related ideas mentioned in this thread, which haven't been designed or implemented. Here's a summary:

  • Expand-all / Collapse-all option.
  • Ctrl+click (or alt+click or shift+click) on the arrow to expand or collapse all the children/sub-tree of the selected item.
  • Category headers that are not tables and serve only as section headers to categorize other tables.

Feel free to open new issues for them as needed.

dsagal avatar Aug 06 '25 18:08 dsagal