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

Sub process: visible label(s) after changing to collapsed sub process #1695

Closed
mnp-mid opened this issue Jul 11, 2022 · 4 comments · Fixed by #1719
Closed

Sub process: visible label(s) after changing to collapsed sub process #1695

mnp-mid opened this issue Jul 11, 2022 · 4 comments · Fixed by #1719
Assignees
Labels
bug Something isn't working spring cleaning Could be cleaned up one day

Comments

@mnp-mid
Copy link

mnp-mid commented Jul 11, 2022

Visible label(s) after changing to collapsed sub process with start, task and end event inside.
The label of the start event is even moving far more outside.

This issue occures only by clicking the steps through. Import and Export of the diagram works proberly.
It is tricky to reproduce. See the uploaded gif animation for detailed steps.

Steps to Reproduce

  1. append task and end event
  2. change task to sub process (expanded)
  3. append task and end event in the sub process
  4. Add labels to start, task and end event
  5. Click on collapsed sub process

Hint: Its not quite clear if the start event inside the sub process may or may not be moved in order to reproduce the error.

bpmn-io-subprocess

Expected Behavior

Hide the label inside the sub process.

Environment

  • Browser: [Chrome 69 103.0.5060.66 (Offizieller Build) (64-Bit), Edge 103.0.1264.49 (Offizielles Build) (64-Bit)]
  • OS: [e.g. Windows 10]
@mnp-mid mnp-mid added the bug Something isn't working label Jul 11, 2022
@pinussilvestrus
Copy link
Contributor

Thanks for the detailed explanation, I can reproduce this 👍 Moving this to backlog

@pinussilvestrus pinussilvestrus added backlog Queued in backlog spring cleaning Could be cleaned up one day labels Jul 15, 2022
@philippfromme philippfromme self-assigned this Aug 17, 2022
@philippfromme philippfromme added in progress Currently worked on and removed backlog Queued in backlog labels Aug 17, 2022
@philippfromme
Copy link
Contributor

philippfromme commented Aug 17, 2022

Root Cause Analysis 🔍

This was assumed to have been fixed (cf. #1617). However, the fix only works if you don't move the label, so effectively, it's still broken.

Here's what's happening:

However, not 🐒 patching still doesn't fix the issue since the parent will still end up being the root element (cf. https://github.com/bpmn-io/bpmn-js/blob/v9.3.2/lib/features/ordering/BpmnOrderingProvider.js#L134). So we're basically trying to fix the parent of the label in 2️⃣ places. 🤡

I see two possible approaches:

1. Labels are always children of the parents of their label target

  • this would require us to not 🐒 patch the hovered element anymore and to default to the label targets parent when computing the order

2. Move labels to appropriate root element when collapsing a shape

  • this would require us to add a behavior

@philippfromme
Copy link
Contributor

I will go for the second approach as it is less intrusive.

@philippfromme
Copy link
Contributor

Fixed by #1719.

@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spring cleaning Could be cleaned up one day
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants