rstackjs / rstackjs/rspress-plugins
Optimize Mermaid chart rendering style, propose adopting beautiful-mermaid to replace the existing plugin
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 6
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 4
Description
Problem Description
The Mermaid chart rendering plugin currently integrated into the project yields charts with subpar visual presentation—including monotonous color palettes, messy font typography, rough line styles, and cramped, unaesthetic layouts. This not only conflicts with the project’s overall UI design language but also diminishes the readability and professionalism of the charts.
Scope of Impact
- Degraded reading experience for all Mermaid-based charts (flowcharts, sequence diagrams, architecture diagrams, etc.) embedded in documents/pages;
- Reduced visual polish of externally facing documents/product pages, harming the project’s brand professionalism;
- Increased cognitive load for team collaboration due to the inefficient visual presentation of chart content.
Proposed Solution
Replace the existing Mermaid rendering plugin with beautiful-mermaid, which offers the following core advantages:
- Pre-built aesthetic color schemes and typography templates tailored to different use cases;
- Full compatibility with native Mermaid syntax (no need to modify existing chart code);
- Support for custom style extensions to align with the project’s unique UI style;
- Lightweight integration with zero additional performance overhead.
Expected Outcomes
- Significant improvement in the visual quality of Mermaid charts, aligning with the project’s overall design system;
- Enhanced chart readability, lowering the cognitive cost for both internal team collaboration and end-user reading;
- Low-cost integration with no need to refactor existing code logic.
Additional References
- beautiful-mermaid Repository: https://github.com/lukilabs/beautiful-mermaid
- Style Comparison Examples:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing Mermaid rendering plugin and its integration points, then review beautiful-mermaid's compatibility and styling options. Done means Mermaid charts render through the proposed replacement, preserve existing Mermaid syntax, and match the project's visual style without breaking document pages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100