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

feat: add mermaid docs and sensible defaults #314

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

calebdw
Copy link
Contributor

@calebdw calebdw commented Jul 29, 2024

Hello!

Changes:

  • add mermaid theme docs
  • change default mermaid bg to transparent (this seems to be how Github renders mermaid charts)
  • add sensible mermaid default based on theme

I noticed that the mermaid theme parameters didn't make it into the documentation so I decided to add it.

I also tried to add sensible mermaid theme defaults to better match the supported themes instead of always having to override the theme. For instance, on the dark theme the original mermaid defaults (bg: white, theme: default) are quite jarring:

image

But updating to (bg: transparent, theme: dark) looks much nicer:

image

Thanks!

@calebdw calebdw changed the title docs: add mermaid theme documentation; feat: add sensible mermaid defaults feat: add mermaid docs and sensible defaults Jul 29, 2024
Copy link
Owner

@mfontanini mfontanini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just a couple of changes on some darker themes that need dark. Feel free to double check them.

I actually tested this while adding mermaid support but somehow it looked like crap for me. I definitely was using the wrong parameter combo because it looks so much better this way. Thanks!

themes/catppuccin-frappe.yaml Outdated Show resolved Hide resolved
themes/catppuccin-macchiato.yaml Outdated Show resolved Hide resolved
themes/catppuccin-mocha.yaml Outdated Show resolved Hide resolved
themes/tokyonight-storm.yaml Outdated Show resolved Hide resolved
@calebdw
Copy link
Contributor Author

calebdw commented Jul 30, 2024

@mfontanini, I used neutral on the lighter "dark" themes because they seemed to not cause as much contrast:

Here is neutral:

image

And here is dark
image

But I can update all of them

@mfontanini
Copy link
Owner

Hmm can you try a sequenceDiagram? The text in between the participants was showing up too light for me

@calebdw
Copy link
Contributor Author

calebdw commented Jul 30, 2024

Sure!

Here's the neutral:

image

and here's the dark:

image

Thanks for mentioning, dark does seem to better choice here 👍

@mfontanini
Copy link
Owner

Hmm now that I remember... When I was testing this I was trying it with pie charts. It's possible those look like crap in dark mode, I'm not sure. I'm away from computer now so I can't test those.

@calebdw
Copy link
Contributor Author

calebdw commented Jul 30, 2024

So here's neutral:

image

and here's dark:

image

I think dark is the best sensible default here, note that it's always possible to customize individual charts if desired/necessary:

```mermaid +render
%%{init: {'theme':'forest'}}%%
  graph TD
    a --> b
```

@mfontanini
Copy link
Owner

So weird, I wonder what exact combo I tried. Maybe I missed dark and only tried neutral. Anyhow, this looks great. Thanks!

@mfontanini mfontanini merged commit fd2a9d9 into mfontanini:master Jul 30, 2024
6 checks passed
@calebdw calebdw deleted the mermaid_theme branch July 30, 2024 04:42
@calebdw
Copy link
Contributor Author

calebdw commented Jul 30, 2024

Thank you sir!

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

Successfully merging this pull request may close these issues.

2 participants