Q42 / sanity-plugin-page-tree

MIT License
23 stars 3 forks source link

Feature request: Collapse all/Expand all button #30

Open edustef opened 2 months ago

edustef commented 2 months ago

A button that collapses or expands all the trees and subtrees.

djohalo2 commented 1 month ago

Hi @edustef, there is already the possibility to collapse/expand the root and children. Only while using multiple roots with an internationalized page tree there will be several to close manually. Would you want to be able to collapse those with a single button? Just trying to understand the feature request 😄

edustef commented 1 month ago

Hey @djohalo2. It's true when having no internalization there's only a single root however with localization you have multiple roots and I want a button that collapses all of them. Now I'm also not sure about the current behavior and can't test since I'm on the phone but if the root is collapsed I imagine the children stay the same. The proposed button would collapse not only all the roots but also all the subtrees as well. Hope I'm clear enough 😄