-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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 Timeline LongText wrap issue #6258
base: develop
Are you sure you want to change the base?
Fix Timeline LongText wrap issue #6258
Conversation
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6258 +/- ##
==========================================
- Coverage 4.47% 4.47% -0.01%
==========================================
Files 385 384 -1
Lines 54180 54192 +12
Branches 598 623 +25
==========================================
Hits 2425 2425
- Misses 51755 51767 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
if (word.length * 8 > width) { | ||
const splitWord = word.match(/.{1,10}/g) || []; // Split long words into chunks | ||
words.push(...splitWord.reverse()); // Push chunks back into words |
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.
Hard-coding these values could cause issues if font size is different.
📑 Summary
This PR fixes the issue where long text in Timeline diagrams overflows outside the color block instead of wrapping properly. The solution ensures text automatically wraps and stays inside the designated block.
Resolves #6182
📏 Design Decisions
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.