Q42 / sanity-plugin-page-tree

MIT License
25 stars 5 forks source link

Feature request: Collapse all/Expand all button #30

Open edustef opened 6 months ago

edustef commented 6 months ago

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

djohalo2 commented 5 months 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 5 months 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 😄