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: edge case causing extreme height in Architecture Diagrams #6064

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

NicolasNewman
Copy link
Collaborator

📑 Summary

Fix for edge cases in Architecture diagrams where the height would grow to extreme lengths

Resolves #5952

📏 Design Decisions

  • getAlignments() now handles cases where nodes within two different groups connected along the x/y access cannot be aligned on the y/x axis.

Before:
image

After:
image

📋 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:.

Copy link

changeset-bot bot commented Nov 16, 2024

🦋 Changeset detected

Latest commit: 2a91849

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mermaid Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

netlify bot commented Nov 16, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 2a91849
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/6738c30e9b5fa70008bf0753
😎 Deploy Preview https://deploy-preview-6064--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.

@NicolasNewman NicolasNewman changed the title 5952/architecture extreme height Fix: edge case causing extreme height in Architecture Diagrams Nov 16, 2024
Copy link

pkg-pr-new bot commented Nov 16, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/mermaid-js/mermaid@6064
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/mermaid-zenuml@6064
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/parser@6064
pnpm add https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-elk@6064

commit: 2a91849

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

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

Project coverage is 4.48%. Comparing base (8328f74) to head (2a91849).

Files with missing lines Patch % Lines
.../src/diagrams/architecture/architectureRenderer.ts 0.00% 85 Missing ⚠️
...aid/src/diagrams/architecture/architectureTypes.ts 0.00% 32 Missing ⚠️
...ermaid/src/diagrams/architecture/architectureDb.ts 0.00% 24 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #6064      +/-   ##
==========================================
- Coverage     4.49%   4.48%   -0.02%     
==========================================
  Files          382     383       +1     
  Lines        53914   54048     +134     
  Branches       621     596      -25     
==========================================
  Hits          2425    2425              
- Misses       51489   51623     +134     
Flag Coverage Δ
unit 4.48% <0.00%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
...ermaid/src/diagrams/architecture/architectureDb.ts 0.00% <0.00%> (ø)
...aid/src/diagrams/architecture/architectureTypes.ts 0.00% <0.00%> (ø)
.../src/diagrams/architecture/architectureRenderer.ts 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

Copy link

argos-ci bot commented Nov 16, 2024

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

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Nov 16, 2024, 4:15 PM

@NicolasNewman NicolasNewman added the Type: Bug / Error Something isn't working or is incorrect label Nov 18, 2024
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.

Architecture Diagram grows very tall
1 participant