-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix: Common handling of strings in Architecture chart #6489
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
base: develop
Are you sure you want to change the base?
Fix: Common handling of strings in Architecture chart #6489
Conversation
๐ฆ Changeset detectedLatest commit: 230ba86 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
โ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
mermaid
@mermaid-js/layout-elk
@mermaid-js/mermaid-zenuml
@mermaid-js/tiny
@mermaid-js/parser
commit: |
The latest updates on your projects. Learn more about Argos notifications โ๏ธ
|
55bb874
to
06c01a1
Compare
There was a problem hiding this 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 but I have one concern from a UX perspective:
I'm a little hesitant with making the colon optional. You're right that it's not needed from a grammar standpoint, but I'd personally prefer to go one way or the other.
Leaving it optional has the potential to add confusion by letting users write the markdown for Architecture diagrams in different flavors. I personally don't like allowing that kind of ambiguity.
I can't remember why the colon was added but if I recall it was suggested in the original PR that added this diagram to make the syntax more intuitive.
I'm not particularly attached to one way or the other but I do think we need to settle on just one.
@sidharthv96 You're thoughts on making the colon optional would be appreciated. |
packages/mermaid/src/diagrams/architecture/architecture.spec.ts
Outdated
Show resolved
Hide resolved
3715f07
to
64861ac
Compare
Hi @sidharthv96 i've fixed the issues and used inline snaphot for testing |
de315a3
to
30c73ed
Compare
Hi there, I've added a commit to simplify the common valueConverter, as the previous implementation was a bit weird and not so maintainable. |
30c73ed
to
6bd644c
Compare
Co-authored-by: Sidharth Vinod <[email protected]>
6bd644c
to
230ba86
Compare
๐ Summary
Resolves issue #5928
Also resolves issue #6056
Also Resolves #6322 as the architecture diagram was already implementing Edge labels, now it works for literal strings and markdown strings too
๐ Design Decisions
'Literal String' or "Literal String"
'`Markdown **String**`' or "`Markdown _string_`"
`Markdown String`
['My Label']
as it is the way it works in many other charts in mermaid('my-icon')
:
optional in edge definition ad it is not formally needed by the grammarlabelType
createText
function to display Markdown stringscreateNonFormattedText
to display literal strings๐ Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.