FE-583: better petrinaut text wrapping#8623
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit f31b9c2. Bugbot is set up for automated code reviews on this repo. Configure here. |
🤖 Augment PR SummarySummary: Improves text wrapping for Petrinaut classic SDCPN node labels, especially long PascalCase identifiers. 🤖 Was this summary useful? React with 👍 or 👎 |
kube
left a comment
There was a problem hiding this comment.
That is a better solution 👍
See the output of git range-diff at https://github.com/hashintel/hash/actions/runs/24354100475
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 871f8d4. Configure here.

🌟 What is the purpose of this PR?
Improves the text-wrapping functionality in petrinaut nodes.
I've broken this PR into 2 commits. The first is what I think are uncontroversial css changes that simply handles multi-line overflows + ellipsis better in the classic nodes.
The second is a new approach of handling the pascal case splitting that behaves slightly differently to the current implementations and I'm open to throwing away if its not liked. I'll explain the implementation + differences with some examples below:
In the original version, we manually split pascal case into 2 lines. This means that if we have text that is too long, each individual line will ellipsify as in the first image. It also means that if we have a short pascal case it still splits into multiple lines.
In my new version, instead I add a zero width space between every pascal case character, which will then only break between pascal case characters if they do not fit on one line. If a very long word without a new pascal case section appears it uses overflow wrap to break anyway. Then uses line-clamp to keep the total max lines at 3 before ellipsifying.
The behaviour in most cases is identical, but how it handles very long words is slightly different.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR: