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

Allow registered diagrams to be overridden. #5050

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

sidharthv96
Copy link
Member

@sidharthv96 sidharthv96 commented Nov 20, 2023

📑 Summary

Instead of throwing an error when an existing diagram is found with same ID, we log a warning and replace it with new one.

This is basically to allow the external flowchart-elk to override the internal fallback to dagre.

Closes #5051 (different approach for same feature)

📏 Design Decisions

This is simpler than the other implementation with priority based overriding.

📋 Tasks

Make sure you

Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Merging #5050 (38b3a20) into sidv/splitELK (0fec0ef) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           sidv/splitELK    #5050   +/-   ##
==============================================
  Coverage          44.36%   44.37%           
==============================================
  Files                 25       25           
  Lines               5218     5217    -1     
  Branches              25       25           
==============================================
  Hits                2315     2315           
+ Misses              2902     2901    -1     
  Partials               1        1           
Flag Coverage Δ
unit 44.37% <0.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
packages/mermaid/src/diagram-api/diagramAPI.ts 58.82% <0.00%> (ø)
packages/mermaid/src/diagram-api/detectType.ts 67.07% <0.00%> (+0.80%) ⬆️

@sidharthv96 sidharthv96 mentioned this pull request Nov 20, 2023
2 tasks
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.

Looks good to me!

I think this approach is simpler than #5051, so it's probably better until more people are making their own custom diagrams.

@aloisklink aloisklink added the Type: Enhancement New feature or request label Nov 20, 2023
@sidharthv96 sidharthv96 merged commit 1be09df into sidv/splitELK Nov 23, 2023
19 of 20 checks passed
@sidharthv96 sidharthv96 deleted the sidv/splitELK2 branch November 23, 2023 16:41
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.

2 participants