fix(ui): make mermaid diagrams readable in dark mode - #772
fix(ui): make mermaid diagrams readable in dark mode#772Anshumancanrock wants to merge 4 commits into
Conversation
Signed-off-by: anshumancanrock <anshu.1239.as@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Anshumancanrock The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for project-hami ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reached
Next review available in: 31 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR configures Mermaid light and dark themes, replaces inline diagram styles with reusable classes, adds theme-aware Mermaid CSS, and preserves Mermaid container classes when rendering SVGs in the lightbox. ChangesMermaid theme rendering
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR updates Mermaid theming and diagram colors for dark mode across English and Chinese content. No actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@CodeRabbit review |
|
|
The problem now is that after clicking to zoom in on the Mermaid image, the Mermaid color settings disappear in the lightbox. |
|
Yes, the same issue applies to the other Mermaid images on the page as well. |
Signed-off-by: anshumancanrock <anshu.1239.as@gmail.com>
|
@rootsongjc fixed the zoom issue. Please take a look now. Thanks!
|
|
It looks better now |
Signed-off-by: anshumancanrock <anshu.1239.as@gmail.com>
Signed-off-by: anshumancanrock <anshu.1239.as@gmail.com>



What type of PR is this?
/kind bug
What this PR does / why we need it:
Site defaults to dark mode but Mermaid diagrams were still stuck on the light theme, which made them pretty hard to read. A couple of the blog posts also had light node colors hardcoded.
Now it just sets the mermaid light/dark themes in
docusaurus.config.jsand moves those node colors into CSS so they actually respect the color mode. Also updated the ZH copies of the blogs.Tested locally with
npm run lint,npm run format:check, andnpm run buildfor both en and zh. Checked the isolation blog post and the architecture docs in both light and dark mode.Which issue(s) this PR fixes:
Fixes #769
Checklist:
npm run lintandnpm run format:checkpassnpm run buildsucceeds for bothenandzhgit commit -s)Summary by CodeRabbit