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: double space in wrapped sequence diagram messages #5649

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

Yash-Singh1
Copy link
Member

📑 Summary

Some sequence diagrams that had multiple spaces in them and were wrapped, explicitly set wrapping in the config or message and/or a message inside a break statement, resulted in rendering errors since the words weren't split correctly resulting in mermaid trying to calculate the text dimensions of an empty string.

Resolves #4298

Repro:

        sequenceDiagram
break Get the Salesforce  Account
AWS->>LamdaGetAccount : GetAccount
LamdaGetAccount->>Salesforce: sd
Salesforce->>LamdaGetAccount: ds
end

Resolves #5617

Repro:


sequenceDiagram

actor User as User/Browser
participant API1 as api.example.com
participant API2 as contacts.example.com

User ->> API1 :wrap: Send Access Token As Cookies  With Different Request
 

📏 Design Decisions

Simple one-liner fix to filter out empty strings in word split in wrapLabel.

📋 Tasks

Make sure you

@github-actions github-actions bot added the Type: Bug / Error Something isn't working or is incorrect label Jul 17, 2024
Copy link

netlify bot commented Jul 17, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 99644ba
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/6697491c99e0a9000810112b
😎 Deploy Preview https://deploy-preview-5649--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 5.86%. Comparing base (b1b480a) to head (99644ba).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5649   +/-   ##
=======================================
  Coverage     5.86%   5.86%           
=======================================
  Files          274     273    -1     
  Lines        41087   41076   -11     
  Branches       488     512   +24     
=======================================
  Hits          2408    2408           
+ Misses       38679   38668   -11     
Flag Coverage Δ
unit 5.86% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
packages/mermaid/src/utils.ts 41.71% <0.00%> (ø)

... and 1 file with indirect coverage changes

Copy link

argos-ci bot commented Jul 17, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 17, 2024, 4:43 AM

@Yash-Singh1 Yash-Singh1 added this pull request to the merge queue Jul 17, 2024
Merged via the queue into develop with commit 5a6edf2 Jul 17, 2024
28 checks passed
@Yash-Singh1 Yash-Singh1 deleted the fix/wrap-double-space branch July 17, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
1 participant