Weekly GitHub Report for Mermaid: April 07, 2025 - April 14, 2025 (12:00:14)
Weekly GitHub Report for Mermaid
Thank you for subscribing to our weekly newsletter! Each week, we deliver a comprehensive summary of your GitHub project's latest activity right to your inbox, including an overview of your project's issues, pull requests, contributors, and commit activity.
Table of Contents
I. News
1.1 Recent Version Releases:
The current version of this repository is @mermaid-js/parser@0.4.0
1.2 Version Information:
On March 25, 2025, a minor update was released for the Mermaid library, introducing a new feature that adds support for Radar Charts, thanks to the contribution from @thomascizeron.
II. Issues
2.1 Top 5 Active Issues:
We consider active issues to be issues that that have been commented on most frequently within the last week. Bot comments are omitted.
-
mermaid.render renders classDiagrams with viewBox="-820 -820 3116 2828" style="max-width: 3116px;" irrespective of config: This issue is about a problem with the
mermaid.render
function, which is rendering class diagrams with a specificviewBox
andmax-width
style that causes inconsistencies, such as diagrams being shifted outside the SVG bounds and having tiny fonts. The user is seeking a solution to render these diagrams consistently when converting markdown to docx, as some diagrams are not displaying correctly.- The comment provides an image showing how the diagram renders in the playground and states that this is the expected SVG output from
mermaid.render()
. - Number of comments this week: 1
- The comment provides an image showing how the diagram renders in the playground and states that this is the expected SVG output from
-
Unnecessary crossing of edges between nodes: This issue highlights a problem with the Mermaid engine, where diagrams are generated with unnecessary line crossings between nodes, specifically below the boxes labeled "Four" and "Five." The issue can be reproduced by using a provided code sample in mermaid.live, and it is suggested that the crossings could be eliminated by simply swapping the endpoints of certain lines.
- A comment suggests that the problem is not unique and may be related to the layout engine, indicating a broader issue with how the engine handles node connections.
- Number of comments this week: 1
Since there were fewer than 5 open issues, all of the open issues have been listed above.
2.2 Top 5 Stale Issues:
We consider stale issues to be issues that has had no activity within the last 30 days. The team should work together to get these issues resolved and closed as soon as possible.
- Tooltips for emoji in Diagram Syntax doc tree: This issue addresses the lack of clarity in the "Diagram Syntax" section of the documentation tree, where emojis are used next to diagram type names without any explanation of their meanings. The proposal suggests adding tooltips to these emojis to help users understand the information they are intended to convey, enhancing the usability and comprehension of the documentation.
- log scale for
xychart-beta
: This issue proposes the addition of a string field namedscale
to thexychart-beta
feature, which would default tolinear
but also acceptlog
as an option, allowing for future extensions to other scales. The implementation of this feature would enable users to maintain version control of graph descriptions with true values while plotting the logged values, enhancing the flexibility and accuracy of data visualization. - Unable to Style Sequence Diagram Title: This issue pertains to the inability to modify the font size of the title in a sequence diagram created using Mermaid, a popular diagramming tool. The user has noted that while other graph types in Mermaid have configurable title attributes, such as those in QuadrantChartConfig, this feature is not available for sequence diagrams, leading to difficulties when the title becomes too small to read.
- SVG rendering formatting issues with markdown input: This issue involves formatting problems with SVG rendering when markdown is used within nodes in a diagram. Specifically, it describes how additional height is added to nodes when opening the SVG in a new tab, and how text is cut off when downloading the SVG, despite the height remaining unchanged.
- Vite build error with mermaid version 10.9.0: This issue involves a build error encountered when using Vite with Mermaid version 10.9.0 in a Vue 3 application, where the developer successfully views graphs during development but encounters a "TypeError: Cannot set properties of undefined" upon building the project. The error seems to occur during the application startup, specifically when attempting to set properties on an undefined object, and the developer is seeking support to resolve this problem.
2.3 Open Issues
This section lists, groups, and then summarizes issues that were created within the last week in the repository.
Issues Opened This Week: 7
Summarized Issues:
- Rendering Issues in Mermaid Diagrams: The
mermaid.render
function is causing class diagrams to have a fixedviewBox
andmax-width
style, resulting in diagrams being shifted outside the SVG bounds and having very tiny fonts. Additionally, the Mermaid engine is generating diagrams with unnecessary line crossings between nodes, which could be resolved by swapping the endpoints of certain lines.
- Feature Requests for Mermaid Diagrams: There is a proposal to add an optional feature for tick labels on radar charts, allowing users to specify labels for ticks on all axes or a specific one. Another request is for the addition of a Chevron shape to Flowchart or Block Diagrams, highlighting its widespread use in process diagrams.
- Bug in Block Diagram Rendering: A bug in the block diagram rendering within the Mermaid tool is causing the WSL node to not display at the intended width of twice its current size. This issue is specified in the provided code sample and affects the visual representation of the diagram.
- HTML Document Type Change with mkdocs-mermaid2-plugin: The mkdocs-mermaid2-plugin is altering the document type declaration from
<!DOCTYPE html>
to<!DOCTYPE doctype>
, leading to rendering issues with KaTeX formulas. This change affects the execution of JavaScript code necessary for proper rendering.
- Support for Markdown Codespan in Mermaid: There is a proposal to enhance the Mermaid project by supporting
codespan
elements to render in a monospace font. This feature is detailed in the GitHub issue titled "Support markdown codespan."
2.4 Closed Issues
This section lists, groups, and then summarizes issues that were closed within the last week in the repository. This section also links the associated pull requests if applicable.
Issues Closed This Week: 3
Summarized Issues:
- Grammar Revision in Langium: The need for a revision in the
common.langium
grammar is highlighted to eliminate the requirement for a custom ValueConverter. This issue complicates the process by capturing initial literals in the common attributestitle
,accTitle
, andaccDescr
, leading to discrepancies between Langium's playground and the expected output in Mermaid.
- Flowchart Documentation Rendering Errors: Some previews fail to render correctly on the Flowchart documentation page of the Mermaid library due to syntax errors in version 11.6.0. Incorrect text such as
e1@->
instead ofe1@-->
results in parsing errors and console errors, which have been addressed with a submitted pull request for correction.
- Sequence Diagram Participant Alias Issue: A user is unable to add a participant with an alias into a box in a sequence diagram using Mermaid. Despite not finding any documentation indicating this should be impossible, the user seeks clarification or a solution for this behavior.
2.5 Issue Discussion Insights
This section will analyze the tone and sentiment of discussions within this project's open and closed issues that occurred within the past week. It aims to identify potentially heated exchanges and to maintain a constructive project environment.
Based on our analysis, there are no instances of toxic discussions in the project's open or closed issues from the past week.
III. Pull Requests
3.1 Open Pull Requests
This section provides a summary of pull requests that were opened in the repository over the past week. The top three pull requests with the highest number of commits are highlighted as 'key' pull requests. Other pull requests are grouped based on similar characteristics for easier analysis. Up to 25 pull requests are displayed in this section, while any remaining pull requests beyond this limit are omitted for brevity.
Pull Requests Opened This Week: 5
Key Open Pull Requests
1. feat: Add vertical line to gantt plot at specified time: This pull request introduces a new feature to the Mermaid project by adding a "vert" tag that allows users to display a vertical line marker on Gantt charts at specified dates, similar to the "milestone" tag, to highlight significant points in time, with the line and its label rendered in a fixed navy color for distinction.
- URL: pull/6479
- Merged: No
- Associated Commits: 1125f, 2bc3a, a401a, e8986, 35054, 4fff6, c1db4, 8627f, c8e87, c28c0, d0ee6, ec2c7, 7e1ce, 8eb20, a4396, 5bbc9, 22037, 81fa2, 20091, 296cb, 167a6, 59a9e, 24470, f5c99
2. feat: Dynamically Render Data Labels Within Bar Charts: This pull request introduces a new feature to the xyChart component, allowing for the dynamic rendering of data labels within bar charts by implementing a configurable option called showDataLabel, which ensures labels are clearly visible by automatically adjusting their font size and positioning to fit within bars of varying sizes and orientations, while also filtering out zero-sized bars and maintaining uniform font size for visual consistency.
- URL: pull/6475
- Merged: No
- Associated Commits: 34e75, 99a2d, 17fcf, f2f2a, ad6f8, 6a538, f4c08, 2798e, 8bdd7, 73f8d, 8b7a4, a2bf5, dff00, b00be, 6957f, f69cc
3. feat(flowchart): add inheritDir option for subgraph direction: This pull request introduces a new configuration option called inheritDir
for flowcharts, allowing subgraphs to optionally inherit the global direction of the parent flowchart, thereby enabling a uniform direction across all levels when set to true, while maintaining the existing alternating direction behavior by default for optimal layout efficiency.
- URL: pull/6470
- Merged: No
Other Open Pull Requests
- Browser Compatibility Enhancements: This pull request focuses on making the project's configuration compatible with older browser versions. It ensures adherence to contribution guidelines, includes necessary tests and documentation, and considers changeset generation for changelog updates.
- Pie Chart Title Adjustment: This pull request addresses the issue of pie chart titles being cropped by implementing a dynamic font size reduction mechanism. It uses getBBox() to measure the title's width, ensuring it fits within the available space, and includes necessary tests, documentation, and a changeset for the fix.
3.2 Closed Pull Requests
This section provides a summary of pull requests that were closed in the repository over the past week. The top three pull requests with the highest number of commits are highlighted as 'key' pull requests. Other pull requests are grouped based on similar characteristics for easier analysis. Up to 25 pull requests are displayed in this section, while any remaining pull requests beyond this limit are omitted for brevity.
Pull Requests Closed This Week: 7
Key Closed Pull Requests
1. Fix: greedy regex in common langium: This pull request refactors the common Langium grammar by reorganizing terminal definitions to separate greedy terminals into distinct files, ensuring the correct order from lazy to greedy, and includes tests to prevent architecture diagram issues, thereby resolving issue #6162.
- URL: pull/6407
- Merged: 2025-04-08T11:46:22Z
2. fix(docs): fix edge ID example: This pull request addresses a documentation issue in the Flowchart section of the Mermaid project by correcting a rendering error caused by the use of a Unicode en dash instead of a valid ASCII dash in the edge syntax, ensuring that the example aligns with the supported syntax for assigning IDs to edges as introduced in Mermaid v11.6.0, without altering any functionality or implementation.
- URL: pull/6456
- Merged: 2025-04-10T07:23:06Z
3. build: fix mermaid-zenuml
IIFE build and add changesets: This pull request addresses the issue of a broken mermaid-zenuml
IIFE build due to the migration from Vite to ESBuild by updating the ESBuild scripts to support multiple IIFE bundles, renaming variables to avoid conflicts, and adding changeset entries to prepare for the v0.2.1 release, while also ensuring that necessary documentation and tests are updated.
- URL: pull/6465
- Merged: 2025-04-09T08:42:37Z
Other Closed Pull Requests
- Removal of Duplicate Entries in Documentation: This pull request focuses on cleaning up the
integrations-community.md
file by removing duplicate entries. The changes were successfully merged, ensuring the documentation is more concise and accurate.
- Bug Fix in SVG Output for Diagrams: A bug in the Mermaid project was causing some diagrams to generate SVG output with
style="undefined;"
in certain elements. This pull request includes a fix to prevent this issue, improving the rendering of diagrams like entity-relationship diagrams.
- Script for E2E Test Timing Comparison: This pull request introduces a script to compare new end-to-end test timings with previous ones. It ensures that timing updates are made only when there are significant changes, thus maintaining efficient test performance tracking.
- Syntax Error Fix in ELK Example Code: The pull request addresses a syntax error in the ELK example code within a Mermaid diagram's YAML frontmatter. It corrects the formatting, adds a sample implementation, and links to existing documentation, ensuring compliance with guidelines and updating tests and documentation.