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

Space Tool Improvements 1/2 #480

Merged
merged 10 commits into from
Oct 25, 2022
Merged

Space Tool Improvements 1/2 #480

merged 10 commits into from
Oct 25, 2022

Conversation

philippfromme
Copy link
Contributor

@philippfromme philippfromme commented Aug 14, 2020

Which issue does this PR address?

Breaking Changes

  • label behavior for laid-out connection is not disallowed anymore

Related to camunda/camunda-modeler#1750
Child of camunda/camunda-modeler#1753

Space tool improvements 2/2: bpmn-io/bpmn-js#1344

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Aug 14, 2020
@philippfromme philippfromme force-pushed the space-tool-attachers branch 4 times, most recently from b81f941 to f1e760e Compare August 14, 2020 15:18
@philippfromme philippfromme marked this pull request as ready for review August 14, 2020 15:24
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Aug 14, 2020
@nikku nikku added backlog Queued in backlog and removed needs review Review pending labels Nov 12, 2020 — with bpmn-io-tasks
@philippfromme philippfromme force-pushed the space-tool-attachers branch 2 times, most recently from 52c0f32 to 65967cf Compare January 6, 2021 08:50
@nikku nikku changed the base branch from master to develop January 6, 2021 09:41
@nikku
Copy link
Member

nikku commented Jan 6, 2021

Let us target develop with that change. This is a new feature.

@philippfromme philippfromme changed the title feat(space-tool): consider attachers when getting constraints Space Tool Improvements 1/2 Jan 6, 2021
@pinussilvestrus pinussilvestrus added needs review Review pending and removed backlog Queued in backlog labels Jan 21, 2021
Copy link
Member

@nikku nikku left a comment

Choose a reason for hiding this comment

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

Likely needs another follow up: bpmn-io/bpmn-js#1344 (review)

@nikku nikku force-pushed the space-tool-attachers branch 2 times, most recently from 8bc2a44 to 7ffafe1 Compare January 22, 2021 12:36
@nikku nikku added backlog Queued in backlog and removed needs review Review pending labels Jan 25, 2021
@philippfromme philippfromme force-pushed the space-tool-attachers branch 3 times, most recently from bd70f94 to 2bd04f6 Compare January 26, 2021 15:23
@philippfromme philippfromme force-pushed the space-tool-attachers branch 2 times, most recently from 9b5270e to a56e98e Compare August 19, 2022 07:18
@nikku nikku changed the title Space Tool Improvements 1/2 WIP: Space Tool Improvements 1/2 Oct 18, 2022
@philippfromme
Copy link
Contributor Author

This PR is actually ready to be reviewed.

@nikku
Copy link
Member

nikku commented Oct 18, 2022

Then we shall review it. Please move to needs review.

@philippfromme philippfromme added needs review Review pending and removed backlog Queued in backlog labels Oct 19, 2022
@philippfromme philippfromme changed the title WIP: Space Tool Improvements 1/2 Space Tool Improvements 1/2 Oct 19, 2022
@barmac
Copy link
Member

barmac commented Oct 21, 2022

I rebased this on develop.

@barmac
Copy link
Member

barmac commented Oct 21, 2022

I run bpmn-js#develop with this PR and 3 test cases fail:

Chrome Headless 106.0.5249.0 (Mac OS 10.15.7) modeling - label layouting integration space tool should NOT adjust / move with a skewed line FAILED
	AssertionError: expected { x: 25, y: 0 } to deeply equal { x: 0, y: 0 }
	    at expectLabelMoved (webpack-internal:///./test/spec/features/modeling/LabelLayoutingSpec.js:584:20)
	    at eval (webpack-internal:///./test/spec/features/modeling/LabelLayoutingSpec.js:551:9)
	    at Modeler.invoke (webpack-internal:///../diagram-js/node_modules/didi/dist/index.esm.js:232:15)
	    at Context.eval (webpack-internal:///./test/helper/index.js:246:20)
.........................................................................
Chrome Headless 106.0.5249.0 (Mac OS 10.15.7) features/modeling - create/remove space create space should create space to the left FAILED
	AssertionError: expected <SequenceFlow_3_label> position to equal
	  { x: 147, y: 204 }
	but got
	  { x: 168, y: 204 }
Chrome Headless 106.0.5249.0 (Mac OS 10.15.7) features/modeling - create/remove space case 1 should create space to the left FAILED
	AssertionError: expected <SequenceFlow_C_label> position to equal
	  { x: 477, y: 233 }
	but got
	  { x: 437, y: 412 }

Let's investigate whether we are introducing breaking changes in the PR or the tests are too rigid and assure a buggy behaviour.

@philippfromme
Copy link
Contributor Author

philippfromme commented Oct 21, 2022

3 test cases fail:

These 3 tests are failing because 4851c17 is a breaking change. They all expect connection labels not to be moved when the connection is laid out. That is not the expected behavior:

brave_MEWPfxWyFm

The expected behavior is this:

brave_naq5DyS02D

If only the source or target of a connection is moved the connection is laid out. If both source and target move, the connection is moved.

I marked the commit introducing the breaking change: 4851c17

@barmac barmac merged commit 48e2422 into develop Oct 25, 2022
@barmac barmac deleted the space-tool-attachers branch October 25, 2022 12:25
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants