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

feat(state): add from, to ids for edge #6039

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

Conversation

igorwessel
Copy link
Contributor

📑 Summary

This PR reintroduces FROM-TO id in Edges.

#5503

Captura de Tela 2024-11-08 às 11 15 48

📏 Design Decisions

I am currently working on converting state diagram to Excalidraw, and I felt the need to have an easier way to find the edges.

I tried some alternative paths but without success, for example:

  1. Manually tracking each edge, and using it as an index to search in .edgePaths, however, the index does not always reflect how we iterate through the parser.doc.
  2. Using the respective graphCount id to get the edge, but in cases where we have multiple relationships for the same state, it may not find the correct edge because we do not have access to the graphCount in the parser.doc, only to the node id.

📋 Tasks

Make sure you

Copy link

changeset-bot bot commented Nov 8, 2024

⚠️ No Changeset found

Latest commit: 6f01969

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: Enhancement New feature or request label Nov 8, 2024
Copy link

netlify bot commented Nov 8, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 6f01969
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/672e1e18368241000822d775
😎 Deploy Preview https://deploy-preview-6039--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

pkg-pr-new bot commented Nov 8, 2024

Open in Stackblitz

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

commit: 6f01969

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

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

Project coverage is 4.49%. Comparing base (c8ce416) to head (6f01969).

Files with missing lines Patch % Lines
...rc/rendering-util/layout-algorithms/dagre/index.js 0.00% 10 Missing ⚠️
packages/mermaid/src/diagrams/state/dataFetcher.js 0.00% 6 Missing ⚠️
packages/mermaid/src/utils.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6039   +/-   ##
=======================================
  Coverage     4.49%   4.49%           
=======================================
  Files          383     382    -1     
  Lines        53925   53925           
  Branches       596     621   +25     
=======================================
  Hits          2425    2425           
  Misses       51500   51500           
Flag Coverage Δ
unit 4.49% <0.00%> (ø)

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

Files with missing lines Coverage Δ
packages/mermaid/src/utils.ts 41.98% <0.00%> (ø)
packages/mermaid/src/diagrams/state/dataFetcher.js 0.00% <0.00%> (ø)
...rc/rendering-util/layout-algorithms/dagre/index.js 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

Copy link

argos-ci bot commented Nov 8, 2024

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

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Nov 8, 2024, 2:29 PM

@igorwessel igorwessel marked this pull request as ready for review November 8, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant