1513 dynamic resizing labels#2345
Conversation
lib/features/modeling/BpmnUpdater.js
Outdated
| }); | ||
|
|
||
| function getTextHeightForTextAnnotation(event) { | ||
| return event.gfx.firstChild.lastChild.lastChild.y.animVal[0].value; |
There was a problem hiding this comment.
I'm not sure how to make this look nicer. If you know another way, please show me with a pointer.
|
Hi, thanks for your contribution. We will look into this soon. |
|
Some interactions don't work properly or are not intuitive, so there's still some work ahead. I'd expect that the horizontal resize snaps to the text width. The label jump on vertical resize is also unintuitive. Screen.Recording.2025-09-10.at.11.43.31.mov |
barmac
left a comment
There was a problem hiding this comment.
Please add a test for horizontal resize as it's clearly not working correctly. The feature is useful, but we need to make sure it works correctly.
d604e3b to
ec9aa3b
Compare
|
@timonlazarviadee Multiple test cases are failing right now. Please check. |
|
Hey @timonlazarviadee! This looks cool, sorry that we've kept you waiting for so long. Let's try to get this ready to merge... It seems your branch is quite old, and we've recently added a feature related to external labels - label links, cf. #2328 Would you mind rebasing this branch on top of the latest |
2f393e8 to
31ee9c8
Compare
|
@timonlazarviadee why does the PR change the code related to Text Annotations? I can break some of the text annotations behaviors now that works without your changes, cf. overlapping of text and connection line below. I would be much easier to review and test your changes, if they were better isolated.
|
I expected that TextAnnotations would be treated dynamically as labels. If you prefer the previous behavior, I can exclude TextAnnotations from this logic. To better centralize the code, I would suggest extracting the resizing logic currently located in Do you think this approach would improve the structure and maintainability of the code? To proceed with the implementation of this feature, I would also like to define a clear Definition of Done. In your opinion, what should this include, @jarekdanielak? |
31ee9c8 to
71601c4
Compare
|
Alright, let's start one step at a time, by refactoring your We already have an utility for labels: WDYT? |
|
Sounds good to me. |
|
I rearranged the code to the LabelUtil.ts |
64850a7 to
e4d2cae
Compare


Proposed Changes
This pull request concerns dynamic resizing of text fields. To this end, labels have been made resizable and code has been added that adjusts the height of the text to match the width.
Closes #1513
Visual demo
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/srtoolCloses {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}