Skip to content

Conversation

Slowhand0309
Copy link
Contributor

This PR fixes an issue where shapes containing labeled arrows could be truncated when exported.
Fixes #5224.

A patch has been applied to the SVG export process to address this.
If this approach does not meet expectations, please feel free to close this PR.

before after
before after

Change type

  • bugfix
  • improvement
  • feature
  • api
  • other

Test plan

  1. Exported shapes as PNG with arrow labels extending beyond their bounding box (as shown above) to confirm they were not cut off.
  2. Also tested a case where the arrow label did not protrude.
  • Unit tests
  • End to end tests

Release notes

  • Fixed an issue where shapes containing labeled arrows could be truncated when exported.

Copy link

vercel bot commented Aug 8, 2025

@Slowhand0309 is attempting to deploy a commit to the tldraw Team on Vercel.

A member of the Team first needs to authorize it.

@huppy-bot huppy-bot bot added the bugfix Bug fix label Aug 8, 2025
@Slowhand0309 Slowhand0309 changed the title [Bug]: Arrow labels can be truncated when exporting Fix: Arrow labels can be truncated when exporting Aug 8, 2025
@mimecuvalo mimecuvalo requested a review from SomeHats August 22, 2025 08:24
@mimecuvalo
Copy link
Member

thx for the PR @Slowhand0309 !

@SomeHats you're the arrow expert, i think this looks good but could use your eye!

@SomeHats
Copy link
Contributor

Thanks for the PR @Slowhand0309! We generally try really hard not to add this sort of per-shape special-casing to the editor (there are a few places in the codebase where it happens, but we're trying to reduce them over time!)

I've put up a PR with an alternative approach here that achieves the same sort of thing without the special casing.

@SomeHats SomeHats closed this Aug 22, 2025
@Slowhand0309
Copy link
Contributor Author

@mimecuvalo @SomeHats
Thank you for your comment. I understand the direction. The alternative PR is great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Arrow labels can be truncated when exporting
3 participants