Skip to content

Conversation

shikaan
Copy link

@shikaan shikaan commented Jun 9, 2025

📑 Summary

On Safari, subpixel gets rounded differently than in Chromium-based browsers, leading to issues like #6640 This change, rounds up the size of the labels and its containers to prevent the issue.

Resolves #6640

📏 Design Decisions

This just rounds up the size of the label. As far as I can tell, everything renders correctly - however I am not sure about downstream effects of this change and a thorough review would be appreciated.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

On Safari, subpixel gets rounded differently than in Chromium-based browsers, leading to issues like mermaid-js#6640
This change, rounds up the size of the labels and its containers to prevent the issue.
Copy link

changeset-bot bot commented Jun 9, 2025

⚠️ No Changeset found

Latest commit: 04b2d03

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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

netlify bot commented Jun 9, 2025

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit ac902ce
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/68471802c86745000718b8f8
😎 Deploy Preview https://deploy-preview-6641--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 project configuration.

Copy link

pkg-pr-new bot commented Jun 9, 2025

Open in StackBlitz

mermaid

npm i https://pkg.pr.new/mermaid-js/mermaid@6641

@mermaid-js/layout-elk

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-elk@6641

@mermaid-js/mermaid-zenuml

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/mermaid-zenuml@6641

@mermaid-js/parser

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/parser@6641

@mermaid-js/tiny

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/tiny@6641

commit: ac902ce

Copy link

codecov bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 3.87%. Comparing base (8a703bd) to head (ac902ce).

Files with missing lines Patch % Lines
...ndering-util/rendering-elements/shapes/drawRect.ts 0.00% 3 Missing ⚠️
...c/rendering-util/rendering-elements/shapes/util.ts 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #6641      +/-   ##
==========================================
- Coverage     3.87%   3.87%   -0.01%     
==========================================
  Files          413     414       +1     
  Lines        43292   43304      +12     
  Branches       666     666              
==========================================
  Hits          1679    1679              
- Misses       41613   41625      +12     
Flag Coverage Δ
unit 3.87% <0.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
...c/rendering-util/rendering-elements/shapes/util.ts 0.00% <0.00%> (ø)
...ndering-util/rendering-elements/shapes/drawRect.ts 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

argos-ci bot commented Jun 9, 2025

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

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 947 changed Jun 9, 2025, 5:38 PM

@shikaan
Copy link
Author

shikaan commented Aug 10, 2025

@ashishjain0512 @shubhamparikh2704 👋 Did you get a chance to review this change?
I can close/rework this PR if it's not going in the right direction.

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
Development

Successfully merging this pull request may close these issues.

Parts of words disappearing under Safar in ER diagram
3 participants