-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: allow text annotations for message flows #2292
base: develop
Are you sure you want to change the base?
feat: allow text annotations for message flows #2292
Conversation
Thanks for the contribution. Could you please add tests for the solution? Best if they are next to the sequence flow + text annotation tests https://github.com/bpmn-io/bpmn-js/pull/1652/files#diff-e392ba8806c6b6cc243eb595499dc53b20b902520100055ffd344331d3be71a0 |
@barmac while creating the tests i found no way to actually see the models created by the tests to visually check them. Could you please explain or link to a guide on how to run a single test to be able to debug it? |
You can use mocha's |
@comlit Also have a look at
I imagine a similar test is required for message flow entries. |
@barmac thanks for the directions. I added the tests for the messageflow next to the ones for the sequenceflow in the latest commits. While adding the tests two questions came up.
|
I think we can safely assume that a text annotation is placed top-right from the anchor point (so the horizontal pool way). Users can always move it, and we avoid surprises.
Place it in LayoutConnectionBehaviorSpec as the behavior deals with associations attached to connections, so both sequence flows and message flows. |
While creating the LayoutConnectionBehaviour test I noticed another problem. When importing a diagram, the associations between MessageFlows and their connected TextAnnotations are not rendered correctly (well technically not rendered at all). I attached the error Message and the file it occurs on below. It would assume that this has something to do with the order in which the elements are rendered, but found no approach on how to change that behaviour.
|
I can reproduce the error. This is indeed a problem with the order of drawing the elements, so the fix would be placed somewhere in the import directory. So this issue is not really a quick fix. Please let me know what your decision is. |
Yes I would like to try fixing that. If I need further assistance or get stuck I will write again. |
added ability to add a text annotation to a message flow
closes #2281