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: add name attribute and class "actor-line" to line #5338

Merged
merged 8 commits into from
Mar 8, 2024

Conversation

ad1992
Copy link
Contributor

@ad1992 ad1992 commented Feb 27, 2024

📑 Summary

  • The actors have unique names so adding a name field to the line connecting the actors for easier identification in SVG nodes.
  • Additionally fixes a bug - actor-line class was never added to the line as it was getting overridden so now that's fixed as well

cc @sidharthv96

<line id="actor11" x1="714" y1="5" x2="714" y2="621" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="4"></line>

📏 Design Decisions

similar to #5284, this is adding a unique identifier for line nodes connecting the actors

📋 Tasks

Make sure you

Copy link

netlify bot commented Feb 27, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 233944b
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/65eaa73b2a1d280008835b99
😎 Deploy Preview https://deploy-preview-5338--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.

@ad1992 ad1992 changed the title feat: add name attribute to line feat: add name attribute and class "actor-line" to line Feb 27, 2024
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 44.67%. Comparing base (4884b01) to head (233944b).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5338   +/-   ##
========================================
  Coverage    44.67%   44.67%           
========================================
  Files           25       25           
  Lines         5339     5341    +2     
  Branches        27       27           
========================================
+ Hits          2385     2386    +1     
- Misses        2953     2954    +1     
  Partials         1        1           
Flag Coverage Δ
unit 44.67% <25.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
packages/mermaid/src/themes/theme-default.js 94.37% <100.00%> (+0.01%) ⬆️
packages/mermaid/src/themes/theme-base.js 3.81% <0.00%> (ø)
packages/mermaid/src/themes/theme-dark.js 2.74% <0.00%> (ø)
packages/mermaid/src/themes/theme-forest.js 3.80% <0.00%> (-0.02%) ⬇️
packages/mermaid/src/themes/theme-neutral.js 4.55% <0.00%> (ø)

@ad1992
Copy link
Contributor Author

ad1992 commented Feb 28, 2024

@sidharthv96 how can I update the failing snapshots ?

@sidharthv96
Copy link
Member

@ad1992 you can't fix snapshots in CI, as they are regenerated from the base branch. But we'll review and merge it, no issues.

@mermaid-js/atlantians this an example of the change. All the failing tests contain this exact change in line color.
Sequence-diagram-should-handle-empty-lines diff

@ad1992
Copy link
Contributor Author

ad1992 commented Feb 29, 2024

@ad1992 you can't fix snapshots in CI, as they are regenerated from the base branch. But we'll review and merge it, no issues.

@mermaid-js/atlantians this an example of the change. All the failing tests contain this exact change in line color. Sequence-diagram-should-handle-empty-lines diff

Awesome, thanks @sidharthv96 , let me know if there is anything needed from my side to merge this

Copy link
Member

@aloisklink aloisklink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good to me! Thanks for catching this.

The visual changes are okay to me, but I'd very slightly prefer if we keep existing sequence diagrams looking the same (it would also mean the E2E snapshots won't change!), by changing the default actorLineColor var to match what it was for the last few years (e.g. the same colour as the actorBorder). But I'm happy to be convinced otherwise.

@sidharthv96, @ad1992, any thoughts on what looks nicer?

@ad1992
Copy link
Contributor Author

ad1992 commented Mar 6, 2024

I have made the changes, however I am getting "Resource not accessible by integration" due to which E2E is failing,
any idea @aloisklink ?

Copy link
Member

@aloisklink aloisklink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ad1992, don't worry, I don't think it's your fault! It looks like #5235 added a new feature to the E2E CI tests that doesn't work for PRs from forks.

I've made a PR that should fix this in #5365.

All of your changes look great to me, but I'll have to wait until #5365 is merged before I can merge this.

@sidharthv96
Copy link
Member

Pie-Chart-neutral-should-render-a-sequence-diagram diff

Single failure

@ad1992
Copy link
Contributor Author

ad1992 commented Mar 8, 2024

Alright lets merge this @aloisklink @sidharthv96 😊

@sidharthv96 sidharthv96 added this pull request to the merge queue Mar 8, 2024
Merged via the queue into mermaid-js:develop with commit 648f779 Mar 8, 2024
19 checks passed
@ad1992 ad1992 deleted the aakansha/line-name branch July 8, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants