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

fix(18204): Refactor the location of a group and its nodes #233

Merged

Conversation

vanch3d
Copy link
Contributor

@vanch3d vanch3d commented Dec 11, 2023

See https://hivemq.kanbanize.com/ctrl_board/57/cards/18204/details/

This PR improves the computation of the initial location of a group and, at its deletion, of its nodes.

The changes guarantee that, when a group is created, the selected nodes remain at the same visual position on the canvas. Similarly, when the nodes are ungrouped, their visual positions remain the same on the canvas. when the group is deleted.

The new implementation ensures that repetitive grouping and ungrouping don't introduce any "drift" on the visual canvas.

The PR also fixes two visual aspects of nodes on the graph:

  • the "edge handles" (used to connect nodes by an edge) are now properly "not manually connectable" and prevent the rendering of a "preview" of an edge when clicking and dragging
  • the rendering of a "resizable" group has been improved (bigger resize handles, wider grabbing area on the borders)

Before

screenshot-localhost_3000-2023 12 11-09_11_49

After

screenshot-localhost_3000-2023 12 11-09_11_19

@cla-bot cla-bot bot added the cla-signed label Dec 11, 2023
@vanch3d vanch3d requested review from sfrehse and simon622 December 11, 2023 09:12
@vanch3d vanch3d self-assigned this Dec 11, 2023
@vanch3d vanch3d changed the base branch from master to feat/18150/workspace-manual-grouping December 11, 2023 09:35
Copy link
Collaborator

@simon622 simon622 left a comment

Choose a reason for hiding this comment

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

looks good

@vanch3d vanch3d force-pushed the fix/18204/group-position branch from 9cae4f4 to 41d3174 Compare December 13, 2023 15:55
@vanch3d vanch3d merged commit 6e9fb52 into feat/18150/workspace-manual-grouping Dec 13, 2023
9 checks passed
@vanch3d vanch3d deleted the fix/18204/group-position branch December 13, 2023 15:56
vanch3d added a commit that referenced this pull request Dec 19, 2023
fix(18204): Refactor the location of a group and its nodes

* fix(18214): update type for group actions

* fix(18214): add bounding rect routine for groups

* fix(18214): update computation of position at creation and ungrouping

* fix(18214): fix connectable status

* fix(18214): fix group rendering

* test(18214): fix tests
vanch3d added a commit that referenced this pull request Dec 20, 2023
fix(18204): Refactor the location of a group and its nodes

* fix(18214): update type for group actions

* fix(18214): add bounding rect routine for groups

* fix(18214): update computation of position at creation and ungrouping

* fix(18214): fix connectable status

* fix(18214): fix group rendering

* test(18214): fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants