Skip to content

Conversation

@timonlazarviadee
Copy link

@timonlazarviadee timonlazarviadee commented Aug 26, 2025

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

2025-08-26 09-48-39

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@CLAassistant
Copy link

CLAassistant commented Aug 26, 2025

CLA assistant check
All committers have signed the CLA.

});

function getTextHeightForTextAnnotation(event) {
return event.gfx.firstChild.lastChild.lastChild.y.animVal[0].value;
Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure how to make this look nicer. If you know another way, please show me with a pointer.

@barmac
Copy link
Member

barmac commented Sep 4, 2025

Hi, thanks for your contribution. We will look into this soon.

@barmac barmac added the needs review Review pending label Sep 4, 2025
@nikku nikku requested review from a team, barmac and philippfromme and removed request for a team September 10, 2025 06:56
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Sep 10, 2025
@nikku nikku requested a review from jarekdanielak September 10, 2025 06:56
@barmac barmac added the needs review Review pending label Sep 10, 2025
@barmac
Copy link
Member

barmac commented Sep 10, 2025

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

Copy link
Member

@barmac barmac left a comment

Choose a reason for hiding this comment

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

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.

@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Sep 10, 2025
@barmac barmac added the backlog Queued in backlog label Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backlog Queued in backlog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add resizing for all text elements as for TextAnnotation

4 participants