Skip to content
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

feat(ControlBar): Add expand/collapse all buttons #203

Merged

Conversation

jeff-phillips-18
Copy link
Member

What

Closes #196

Description

Adds the ability for applications to show an expand all and collapse all button on the control bar.
The application must handle the callback and call the new Graph method expandAll or collapseAll. If the application is using a pipeline layout with generate spacer nodes and edges, it must recreate the model and relayout the view.

An example of just how this is done can be found in: PipelineGroupsDemo.collapseAllCallback

Note that there are 2 new methods added to the Graph interface and an optional parameter leafOnly to the getAllChildren method on the Node interface. Any application that is current implementing these interfaces without extending the base implementation will need to adjust accordingly.

Type of change

  • Feature

Screen shots / Gifs for design review

image

@jeff-phillips-18
Copy link
Member Author

Demo app surge: https://expand-collapse-all.surge.sh/

@patternfly-build
Copy link

patternfly-build commented May 29, 2024

Copy link
Collaborator

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for adding the documentation @jeff-phillips-18 , will be very helpful when implementing these updates in product.

@jeff-phillips-18 jeff-phillips-18 merged commit 6d0ff64 into patternfly:main May 31, 2024
8 checks passed
@jeff-phillips-18 jeff-phillips-18 deleted the expand-collapse-all branch May 31, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Expand All / Collapse All buttons in Control Bar
4 participants