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

Upgrade to V10 #4

Open
SonephetR2 opened this issue Feb 23, 2023 · 18 comments
Open

Upgrade to V10 #4

SonephetR2 opened this issue Feb 23, 2023 · 18 comments

Comments

@SonephetR2
Copy link

Chanced upon this bit on Hacker News today : V10 was just released and is now "70% smaller (<100 kB gzipped), with lazy loaded diagrams, fully async rendering and parsing, cleaner internals" (quoting the maintainer here). I thought I'd drop you a line. Thanks for the very useful plugin :)

@buschhardt
Copy link

That would be very nice, because Mermaid added "Timeline".
Thanks also from me

@Drevarr
Copy link

Drevarr commented Mar 30, 2023

If upgrading to v10 gets "Timeline" added that would be wonderful.

@efurlanm
Copy link
Owner

Thanks for the comments. The new version 10 of Mermaid has a significant change (ESM), and the min.js file is no longer available. As a consequence the existing code no longer works with the new version, and needs to be re-written. Since I didn't make the plugin, I have no idea how to do this. It's a shame, but apparently it's the end of the line for Mermaid-TW5 in this repo. Maybe someone with more experience can change it in the future. For now we can consider this repo as dead.

Some references:

@Drevarr
Copy link

Drevarr commented Apr 6, 2023

Will mermaid-js/mermaid#4281 solve the issue?

@efurlanm
Copy link
Owner

Thanks for the comment. Yes, #4281 will likely resolve the issue. As a curiosity, version 10.0.3-alpha.1 (https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js) was the last one containing min.js .

@efurlanm
Copy link
Owner

Good news. There is now the 10.2.0-rc.2 UMD package. I tested it on TW 5.2.7 and unfortunately it didn't work, nor did 10.0.3-alpha.1. The last one that works is 9.4.3.

Another point that was not mentioned before is that until 9.3.0 the size of mermaid.min.js is 0.9 MB, and from 9.4.0 to 10.2 the size jumped to 2.7 MB (3 times increase) . The size of empty vanilla TW 5.2.7 (empty.html) is 2.3 MB, ie mermaid.min.js is bigger than TW itself, making it a huge orverhead. For the newer versions of mermaid I have my doubts whether another workflow wouldn't be better, such as not using the plugin and keeping only the mermaid source code in TW, using https://mermaid.live to generate the figures and save them, for example in svg, and then use svg in TW.

@Drevarr
Copy link

Drevarr commented Apr 30, 2023

That is a massive size increase, I think you are correct if the size stays it is time to look for an alternative.

@Kochise
Copy link

Kochise commented Sep 8, 2023

mermaid 10 is incompatible : fralau/mkdocs-mermaid2-plugin#70 ("you can use the .min.js file from jsdelivr")

-> https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js

C4 diagrams, mindmap, ...

@Kochise
Copy link

Kochise commented Sep 8, 2023

v11.0.0 Breaking changes | WIP : https://github.com/orgs/mermaid-js/discussions/4710

@Kochise
Copy link

Kochise commented Sep 8, 2023

@Kochise
Copy link

Kochise commented Oct 25, 2023

@Kochise
Copy link

Kochise commented Jan 20, 2024

@Kochise
Copy link

Kochise commented Jan 22, 2024

@efurlanm I'm using Bob for advanced Tiddly so the size is not a problem anymore. I provided you with the links to the latest Min.js, could you try to make them work ?

@Kochise
Copy link

Kochise commented Feb 2, 2024

@Kochise
Copy link

Kochise commented Mar 6, 2024

@efurlanm
Copy link
Owner

Unfortunately I haven't been able to get the new versions to work yet. It will probably be necessary to change the code and I don't have the necessary skills.

@Kochise
Copy link

Kochise commented Mar 20, 2024

Seems like there is a bug in the 10.9.0 :

mermaid-js/mermaid#5383
mermaid-js/mermaid#5362

Try with the 10.8.0 version.

I don't care about the "overhead", I'm using Bob anyway :

https://github.com/OokTech/TW5-BobEXE/releases/1.7.6

Regards.

@Kochise
Copy link

Kochise commented May 14, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants