-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Mermaid Master Ticket (Improvements and Issues) #7629
Comments
After looking into theming something came up that could make the dark theme support a bit more complicated: When you look at Mermaid's dark theme, it turns out that the background is still white. Here is an example in the Live Editor. On the other side I haven't changed the Joplin code yet to test it within Joplin. Maybe the background will adjust. The background attribute in Mermaid states it is used to calculate color for items that should either be background colored or contrasting to the background. IMO someone would have to create a palette themselves that we can then use for dark theme. Wrt images in flowcharts: I was also looking into this and I can't even make it work in the live editor. So I am not sure how I came up with that problem in the first place. It might have worked with earlier versions of Mermaid, but either way, I haven taken this item off the list. |
Thanks for editing this issue @tessus
It doesn't look white to me from that link: The window on the left is Joplin. I'm sure its possible for us to create a custom theme anyway right? It may take some time to put together the right colours but I don't think this should be an issue. If you can locate me where in this codebase this is set I'm happy to look into creating a custom palette. |
You can refer sample mindmap integration https://github.com/mermaid-js/mermaid-live-editor/blob/fcf53c98c25604c90a218104268c339be53035a6/src/lib/util/mermaid.ts |
Also, from our exchange, @sidharthv96 added : "mindmap is async, and requires a separate package (for now). Would that be the issue?" |
And from Alios from Mermaid :
|
Mermaid 10 has just come out https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md#1000 |
This is a good question. Unfortunately I am currently a bit busy with other things. |
Looking at The only issue would be how the assets are injected. |
@sidharthv96 Electron does not support ESM. |
Taking a quick look at the mermaid exported code I don't see it working at all in Electron. Whilst I do support the migration to ESM, being "esm only" may be a bit too soon when environments like Electron don't support it yet. Id still personally be rolling out a hybrid approach. But that's just me. Also, @sidharthv96, there seem to be a lot of files in the mermaid package. Are you outputting a single minified version of the mermaid package? Or am i just seeing hashes of previous versions in there? There's a runtime performance penalty of Node needing to load many files (I briefly talk about it here: https://jason-williams.co.uk/posts/speeding-up-vscode-extensions-in-2022/) So it looks like the move to 10.0.0 will be blocked for quite a while |
see also https://github.com/orgs/mermaid-js/discussions/4148 Unfortunately I haven't received an answer from the devs yet. |
@tessus Hi. Is this helpful for Joplin?
|
I am sorry, but I'm currently unable to look into any of this. Maybe Laurent or somebody else can find some time. |
If there's no issue for these please add one, so that we can keep track of it (and have more details on how to replicate it) |
Yes, this was my plan, but then got side-tracked with other stuff. I will open them on the weekend. |
Hey I guess we can keep using the |
A few assets are missing. The usual process for updating Mermaid is as follows:
I haven't had a chance to test the PR yet, because I am on the road until Tuesday night and my mind is all over the place. I will have a look at it Wednesday afternoon unless somwbody else beats me to it. |
- timeline chart - quadrant charts - Sankey diagram Note: completely new commit on most recent upstream dev, just reran all steps outline by tessus's in laurent22#7629
@laurent22 rather than me create a new issue for dark mode, could you re-open #3201 and I can link it from here? Thanks |
Ok status update
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Issue #9588 should be added into this master ticket as well |
Just a heads up that Mermaid 10.9.0 has been out. Joplin is on 10.6.1 and since this a lot of stuff has been added, including more graph types that would be nice to have. Cheers. |
This ticket is a master ticket to keep track of the most important Mermaid issues.
It also continues the discussion made in #7330 which goes through outstanding issues with Mermaid integration.
CC @tessus @AelithBlanchett
The text was updated successfully, but these errors were encountered: