patternfly / react-topology

MIT License
13 stars 20 forks source link

feat(pipelines): Add focus on newly expanded/collapsed groups #210

Closed jeff-phillips-18 closed 5 months ago

jeff-phillips-18 commented 6 months ago

What

Closes #206

Description

Adds a feature to focus on a group after it has been expanded or collapsed.

On expand the group will be shown in the view with the graph set to fit around the group so that the entire expansion can be viewed or be zoomed in on to emphasize the group.

On collapse, the view may be zoomed out so as not to show extra white space due to the collapsing of the group and the group will be centered in the view.

Note that a new method centerInView was added to the Graph interface and an optional parameter node to the fit method on the Graph interface. Any application that is current implementing these interfaces without extending the base implementation will need to adjust accordingly.

Type of change

jeff-phillips-18 commented 6 months ago

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

patternfly-build commented 6 months ago

Preview: https://react-topology-pr-topology-210.surge.sh

github-actions[bot] commented 5 months ago

:tada: This PR is included in version 5.4.0-prerelease.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: