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

fix: disable caching bounds for arrow labels #7343

Merged
merged 2 commits into from
Nov 25, 2023

Conversation

dwelle
Copy link
Member

@dwelle dwelle commented Nov 25, 2023

Since we've recently stopped updating arrow labels, we don't invalidate Bounds cache for labels when container is moved. This is causing bugs when checking for visibility and such.

This PR is a hotfix to ignore cache for bound text. Proper fix after proper analysis.

Copy link

vercel bot commented Nov 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Nov 25, 2023 10:31pm
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Nov 25, 2023 10:31pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Nov 25, 2023 10:31pm

@dwelle dwelle merged commit fe75f29 into master Nov 25, 2023
8 of 9 checks passed
@dwelle dwelle deleted the dwelle/disable-arrow-label-cache branch November 25, 2023 22:32
Copy link

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 72.53% / 70% 45721 / 63033
🟢 Statements 72.53% / 70% 45721 / 63033
🟢 Functions 68.8% / 68% 1447 / 2103
🟢 Branches 81.01% / 70% 5717 / 7057
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/element/bounds.ts 83.55% 90.75% 89.28% 83.55% 187-268, 287-291, 314-315, 447-450, 495-496, 558-564, 573-575, 600-601, 626-637, 693-703, 736-739, 783-784
Generated in workflow #1151

Copy link

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dist/excalidraw.production.min.js 324.56 KB (0%) 6.5 s (0%) 105 ms (-12.36% 🔽) 6.6 s
dist/excalidraw-assets/locales 280.73 KB (0%) 5.7 s (0%) 33 ms (+5.41% 🔺) 5.7 s
dist/excalidraw-assets/vendor*.js 826.02 KB (0%) 16.6 s (0%) 293 ms (+17.49% 🔺) 16.9 s

wangshijun added a commit to wangshijun/excalidraw-blocklet that referenced this pull request May 22, 2024
patch release

* tag 'v0.17.5':
  v0.17.5
  fix: parse embeddable srcdoc urls strictly & escape attribute url html
  v0.17.4
  fix: Gist embed allowing unsafe html (excalidraw#7883)
  fix: keep customData when converting to ExcalidrawElement (excalidraw#7656)
  fix: umd build so it can be used in browser (excalidraw#7349)
  fix: disable caching bounds for arrow labels (excalidraw#7343)
  fix: bounds cached prematurely resulting in incorrectly rendered labels (excalidraw#7339)
  docs: upgrade to @excalidraw/[email protected] (excalidraw#7285)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant