New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE: Collapse All Button in Content and Page Tree #3756
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition!
Left some first feedback, and didn't test the feature itself yet in the backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Devclaim,
excellent solution! 💯
I left some nitpick comments on the code, but I was also able to test your change locally and it works like a charm 👍
I know this one was tough to figure out. Thanks a lot for staying on it!
Thanks for your effort, this is great work!
packages/neos-ui/src/Containers/LeftSideBar/NodeTree/style.module.css
Outdated
Show resolved
Hide resolved
packages/neos-ui/src/Containers/LeftSideBar/NodeTree/style.module.css
Outdated
Show resolved
Hide resolved
…ule.css Co-authored-by: Wilhelm Behncke <2522299+grebaldi@users.noreply.github.com>
Thank you for your Feedback, I think I have replied to all your suggestions. I do need some help with the translations though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Devclaim,
thanks so much for your adjustments! Sorry for the delayed response, I've been busier with 9.0 stuff than I anticipated.
Your integration of the i18nRegistry
is absolutely correct 👍 I've added a code suggestion to solve the remaining issue. After that, we're good to go :)
Co-authored-by: Wilhelm Behncke <2522299+grebaldi@users.noreply.github.com>
Thank you, that fixed the Issue, I will add the remaining translations asap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Devclaim! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works great!
What I did
Add a Button to collapse all collapsable Nodes in the Content and Page Tree in the LeftSideBar. Since I didn't like how it looked as an IconButton, it's just text indicating exactly what it does.
Note: Currently Nodes that are closed by default behave differently than other Nodes (Instead of being added to the toggled state in the Redux Store when collapsed, they are added when they are expanded). I wasn't able to make it work without generating new Bugs so I just gave up, but I think this should be looked into at some point.
How I did it
Add a selector to either select all document nodes or content nodes that are collapsable (DocumentNodes must have children with subtypes of Document and ContentNodes must have children with SubTypes of Content and contentCollection )
Add the Button on the top right of the Tree Container
How to verify it
Open all the Nodes and click "Collapse all" :)