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

Restore import definitions in 3.x #1111

Closed
wants to merge 128 commits into from
Closed

Conversation

barmac
Copy link
Member

@barmac barmac commented Jun 27, 2019

This PR restores Viewer#importDefinitions as it occurred that it is a useful and actively used method. I removed it in f8f9334 as it wasn't documented, tested or marked in any other way as part of public API. However, as its main functionality which is opening a diagram without XML import is extremely useful, it seems to be reasonable to actually add this to the Viewer's public API.

philippfromme and others added 30 commits April 26, 2019 18:31
This better aligns our collapse behavior with other tools.
This prevents multiple incoming sequence flows to target events of an
event-based gateway when the connection source is not an event-based
gateway.
Handles two new scenarios:

1. A user wants to connect an event-based gateway to an event-based
gateway target with existing incoming sequence flows. The existing
sequence flows are removed before connecting the new one.

2. A user wants to replace a gateway, that is already connected to
event-based gateway targets, with an event-based gateway. The existing
incoming sequence flows of the targets, which do not belong to the
newly replaced event-based gateway, are removed before the replacement
operation finishes.

This is because target elements in an event gateway configuration
must not have any additional incoming sequence flows other than
that from the event gateway.
This allows basic support for diagram-js frame elements.

Closes #959
Closes #960
* Restructure tests to make them more clear
* Add tests for businessObject updates (especially groups)
This covers two scenarios:

1. When a shape is replaced with an expanded subprocess
2. When a subprocess is toggled from collapsed to expanded

Only when:

1. There are incoming sequence flows (previous content)
2. There are no outgoing sequence flows (following content)
@barmac barmac requested a review from nikku June 27, 2019 15:26
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jun 27, 2019
@barmac barmac changed the title Restore import definitions Restore import definitions in 3.x Jun 27, 2019
@barmac barmac force-pushed the restore-import-definitions branch from 84b6170 to 0803df2 Compare June 27, 2019 15:27
@nikku
Copy link
Member

nikku commented Jun 27, 2019

This PR restores Viewer#importDefinitions as it occurred that it is a useful and actively used method.

How do you deduce it is actively used?

@nikku
Copy link
Member

nikku commented Jun 27, 2019

In any way, we should use it ourselves if we decide to keep it around.

test/spec/ViewerSpec.js Outdated Show resolved Hide resolved
test/spec/ViewerSpec.js Outdated Show resolved Hide resolved
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.

Could we use #importDefinitions ourselves?

@barmac barmac force-pushed the restore-import-definitions branch from 0803df2 to 3c1dc1e Compare June 28, 2019 06:34
@barmac
Copy link
Member Author

barmac commented Jun 28, 2019

Done.

@barmac barmac requested a review from nikku June 28, 2019 06:38
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.

Looks super good. 🍰

barmac added 2 commits June 28, 2019 10:26
This was removed in f8f9334, but it occurred that
the method is used productively  by some of the clients.
This commit restores the method as part of public API.

Use `Viewer#importDefinitions` to import previously
parsed definitions. Now it is also possible to pass
the diagram or diagram id to be rendered during
graphical import.
@nikku nikku force-pushed the restore-import-definitions branch from 3c1dc1e to 9c063f8 Compare June 28, 2019 09:06
@nikku
Copy link
Member

nikku commented Jun 28, 2019

Merged via 63fabac.

Please use different feature branches for backports and actual fix next time 🌷

@nikku nikku closed this Jun 28, 2019
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jun 28, 2019
@delete-merged-branch delete-merged-branch bot deleted the restore-import-definitions branch June 28, 2019 09:08
@barmac
Copy link
Member Author

barmac commented Jun 28, 2019

OK, thanks for the feedback!

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.

6 participants