-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Various Mermaid improvements #18776
Various Mermaid improvements #18776
Conversation
- Render into iframe for improved security - Use built-in dark theme instead of color inversion - Remove flexbox attributes, resulting in more consistent size rendering - Update API usage and update to latest version
Labeling for backport because of the security aspect and it's a nice improvement in the rendering as well. |
fdbed05
to
f501325
Compare
There is one more improvement to do: |
Would it be possible to create the |
Exactly my thoughts, fixed it. With the new method, I needed to parse the height from the SVG string, which is a bit clumsy, but should be faster than parsing the whole thing again using a Of note there is one tidbit to |
make L-G-T-M work. |
Please send backport |
* Various Mermaid improvments - Render into iframe for improved security - Use built-in dark theme instead of color inversion - Remove flexbox attributes, resulting in more consistent size rendering - Update API usage and update to latest version * restart ci * misc tweaks * remove unneccesary declaration * make it work without allow-same-origin, add loading=lazy * remove loading attribute, does not seem to work * rename variable * skip roundtrip to DOM for rendering * don't guess chart height * update comment to make it clear it's intentional * tweak * replace deprecated 'scrolling' property * remove unused css file Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* giteaofficial/main: Various Mermaid improvements (go-gitea#18776) [skip ci] Updated translations via Crowdin Fix display time of milestones (go-gitea#18753)
* Various Mermaid improvments - Render into iframe for improved security - Use built-in dark theme instead of color inversion - Remove flexbox attributes, resulting in more consistent size rendering - Update API usage and update to latest version * restart ci * misc tweaks * remove unneccesary declaration * make it work without allow-same-origin, add loading=lazy * remove loading attribute, does not seem to work * rename variable * skip roundtrip to DOM for rendering * don't guess chart height * update comment to make it clear it's intentional * tweak * replace deprecated 'scrolling' property * remove unused css file Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* 'main' of https://github.com/go-gitea/gitea: (87 commits) Fix template bug of LFS lock (go-gitea#18784) Various Mermaid improvements (go-gitea#18776) [skip ci] Updated translations via Crowdin Fix display time of milestones (go-gitea#18753) [skip ci] Updated translations via Crowdin Prevent dangling GetAttribute calls (go-gitea#18754) Add example to render html files (go-gitea#18736) Fix a broken link in `commits_list_small.tmpl` (go-gitea#18763) Fix broken cancel button link on patch page (go-gitea#18718) Ignore the migrate if u2f_registration is not exist (go-gitea#18760) [skip ci] Updated translations via Crowdin Increase the size of the webauthn_credential credential_id field (go-gitea#18739) Fix isempty detection of git repository (go-gitea#18746) [skip ci] Updated translations via Crowdin Send mail to issue/pr assignee/reviewer also when OnMention is set (go-gitea#18707) Reduce CI go module downloads, add make targets (go-gitea#18708) Add number in queue status to monitor page (go-gitea#18712) Fix source code line highlighting (go-gitea#18729) Fix forked repositories missed tags (go-gitea#18719) [skip ci] Updated translations via Crowdin ...
* Various Mermaid improvments - Render into iframe for improved security - Use built-in dark theme instead of color inversion - Remove flexbox attributes, resulting in more consistent size rendering - Update API usage and update to latest version * restart ci * misc tweaks * remove unneccesary declaration * make it work without allow-same-origin, add loading=lazy * remove loading attribute, does not seem to work * rename variable * skip roundtrip to DOM for rendering * don't guess chart height * update comment to make it clear it's intentional * tweak * replace deprecated 'scrolling' property * remove unused css file Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Before:
After: