-
Notifications
You must be signed in to change notification settings - Fork 242
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: ellipsis with maxWidth #542
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
Passed | Secrets | 0 0 0 0 | View in Orca |
d38b506
to
3965eb6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Although I'm not sure what the problem is, but I think this fix makes sense. Since we're transferring float numbers from JS to WASM (Yoga), there must be some data loss in between so this is safer.
🎉 This PR is included in version 0.10.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
### Description This may be a temporary fix, I didn't dig deep into yoga. But when the return value of width here doesn't change (assuming the value of width is 216.9), when we later get the width through `parent.getComputedWidth()`, sometimes it returns 216 and sometimes 217. I'm not sure if this is a yoga bug, but it seems related to the entire page width. Closes: vercel#540 https://github.com/vercel/satori/assets/22126563/6929db4c-60e8-4a85-ae8b-497ad64c317e
Description
This may be a temporary fix, I didn't dig deep into yoga. But when the return value of width here doesn't change (assuming the value of width is 216.9), when we later get the width through
parent.getComputedWidth()
, sometimes it returns 216 and sometimes 217. I'm not sure if this is a yoga bug, but it seems related to the entire page width.Closes: #540
Screen.Recording.2023-09-14.at.11.11.07.PM.mov