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

fix: mermaid rendering in documenter-dark mode #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Fe-r-oz
Copy link

@Fe-r-oz Fe-r-oz commented Dec 10, 2024

This PR aims to provide the fix to mermaid charts in register_interface.md being unreadable in documenter-dark mode.

For instance,

Screenshot_select-area_20241210163346

I think this is due to the usage of <code></code> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code HTML tags that are used for in-line styling. But this causes rendering issues in the dark mode based on the observed evidence. The <code> tags are used to style text as inline code in HTML, and they are not required for mermaid diagrams to work.

flowchart TB
  A["uptotime!(ref::RegRef, now)"]
  B["uptotime!(refs::AbstractVecOrTuple{RegRef}, now)"]
  A --> B
Loading

Mermaid can automatically adjust to different themes, such as dark mode and light mode, by default color palette. For example, the diagram above appears as expected in dark mode.

Screenshot_select-area_20241210164111

  • The code is properly formatted and commented.
  • Substantial new functionality is documented within the docs.
  • All new functionality is tested.
  • All of the automated tests on github pass.
  • We recently started enforcing formatting checks. If formatting issues are reported in the new code you have written, please correct them.

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.87%. Comparing base (11b2e76) to head (c778703).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #174   +/-   ##
=======================================
  Coverage   67.87%   67.87%           
=======================================
  Files          41       41           
  Lines        1706     1706           
=======================================
  Hits         1158     1158           
  Misses        548      548           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Fe-r-oz Fe-r-oz marked this pull request as ready for review December 10, 2024 12:05
@Fe-r-oz
Copy link
Author

Fe-r-oz commented Dec 10, 2024

In the how to guide for first gen repeater experiments, <code> tags are not used and the mermaids chart are displayed correctly. Therefore, in register_inferace.md, we also replace the <code></code> tags which is the purpose of this PR.

Please help review this PR, thank you!

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.

1 participant