Weekly GitHub Report for Mermaid: February 24, 2025 - March 03, 2025
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/layout-elk@0.1.7
1.2 Version Information:
On November 27, 2024, a patch update was released for Mermaid, addressing a fix in the offset calculations for diamond shapes during intersection handling, as contributed by @knsv.
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.
-
Self-edges/loops look very awkward in state diagrams: This issue highlights the awkward appearance of self-edges or loops in state diagrams created using Mermaid, where the edges appear to double back on themselves rather than forming a smooth loop. The problem is contrasted with Graphviz digraphs, which handle self-loops more naturally by positioning the edge to the side of the node without any kinks.
- Commenters agree that self-loops in Mermaid diagrams are not rendered as cleanly as in Graphviz, with issues stemming from a lack of explicit self-loop handling and layout constraints. Suggestions include introducing explicit self-loop detection, adding loop curvature controls, and implementing edge anchor customization. The issue affects multiple diagram types, with sequence diagrams rendering self-loops correctly, unlike state diagrams and flowcharts.
- Number of comments this week: 3
-
Block diagram: Converting circular structure to JSON: This issue involves a problem with rendering a specific "block-beta" diagram using the
mermaid
library in a Next.js project, where an error occurs due to a circular structure being converted to JSON. The user is unable to reproduce the issue in other projects and suspects it to be project-specific, with a temporary workaround found by removing a logger line in the node modules.- The comments discuss a temporary solution of removing a logger line to render the block successfully, with another user inquiring about the method used to find the log connection and whether all console logs need removal. The original poster suggests creating a fork to remove log statements as a potential solution, as they do not have a definitive fix.
- Number of comments this week: 2
-
Unable to render an Ampersand (&) on a MindMap: This issue involves a problem with rendering the ampersand character (
&
) in MindMap diagrams using MermaidJS, where it is incorrectly displayed as&
due to double encoding. The problem is confirmed to affect only MindMaps and not other diagram types, and it appears to be related to the text encoding process during storage, parsing, or rendering.- The comments confirm the issue with ampersand rendering due to double encoding and discuss tests conducted to verify the problem. A fix has been implemented to correct the rendering logic, and a pull request has been submitted. The original poster expresses appreciation for the quick resolution and looks forward to the release of the fix.
- Number of comments this week: 2
-
Feature Request: Add Support for Clickable Links in State Diagram Nodes: This issue is a feature request to add support for clickable links in state diagram nodes within the Mermaid.js library, similar to the existing functionality in flowcharts. The proposal suggests implementing a
click
directive for state diagrams to enhance interactivity by allowing nodes to link to external URLs or trigger JavaScript functions, which would be beneficial for documentation, tutorials, and applications.- The comments discuss the feasibility of extending the
click
directive from flowcharts to state diagrams, with one commenter supporting the idea and outlining the current implementation in flowcharts. They propose modifications to the state diagram codebase to achieve similar functionality, and the original poster expresses gratitude and readiness to begin working on the implementation. - Number of comments this week: 2
- The comments discuss the feasibility of extending the
-
Screen reader / accessibility technology support for diagrams: This issue addresses the challenge of enhancing screen reader and accessibility technology support for Mermaid diagrams, which are currently not accessible to non-sighted users. The discussion focuses on potential solutions to make diagram content understandable for screen readers, considering the inherent visual nature of diagrams and exploring options like alternative text, HTML markup, and accessible SVG markup.
- The comments reflect a collaborative effort to improve accessibility, with contributors expressing interest in the issue and suggesting that a non-navigable description could be useful for exported diagrams. They emphasize the importance of making the system user-friendly for adding new diagrams and discuss the control over SVG outputs, while also sharing resources on making SVGs accessible.
- Number of comments this week: 1
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.
- vite build failure for 10.9.0: This issue involves a build failure in version 10.9.0 of a project using Vite with vite-react-swc, where running the build and preview commands results in a TypeError in the browser. The error occurs because the code attempts to set properties on an undefined object, and it is noted that version 9.4 does not exhibit this problem, although there are slight API differences.
- Control brackets around loopText and friends: This issue proposes that the Mermaid project should provide an option to control the addition of brackets around elements like loopText in sequence diagrams, allowing users to customize the appearance according to their style preferences, such as hiding brackets when they are not desired. The proposal includes an example of a sequence diagram and a CSS snippet demonstrating how users can apply custom styles, including the ability to hide brackets, to achieve a cleaner and more personalized visual representation.
- Lots of whitespace around C4 graph.: This issue pertains to the excessive whitespace generated around C4 context diagrams when exported using the Mermaid tool, which is not observed with other types of diagrams. The problem has been open for 355 days and involves a specific setup using Mermaid version 10.8.0, with no suggested solutions or additional context provided by the user.
- Mermaid versions after v9.2.2 cannot be injected into Firefox addons: This issue involves a problem with injecting the
mermaid.min.js
script into Firefox browser extensions, where versions after v9.2.2 fail to load due to a Content Security Policy (CSP) restriction that blocks a call toFunction()
. The problem does not occur in Chromium-based browsers, and the issue has persisted since the release of Mermaid v9.3.0, which introduced changes that might have affected the script's compatibility with Firefox's security policies. - support for Block diagrams to merge row blocks: This issue is a feature request for the Mermaid project, specifically seeking support for merging row blocks within Block diagrams to enhance their visual representation. The user has provided a code sample and screenshots to illustrate the desired outcome, highlighting the current limitations and expressing the need for this enhancement to achieve a more cohesive diagram layout.
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: 13
Summarized Issues:
- Feature Enhancements in Mermaid.js: Several issues propose enhancements to Mermaid.js, such as adding clickable links in state diagram nodes and integrating SysML v2 support. These improvements aim to increase interactivity and expand the utility of Mermaid.js in various sectors, including documentation and Model-Based Systems Engineering.
- Diagram Layout and Rendering Issues: Issues have been raised regarding layout and rendering in Mermaid.js, such as nodes not spanning multiple columns as intended and awkward self-loop rendering in state diagrams. These issues suggest a need for better layout logic and rendering improvements to enhance visual appeal and functionality.
- Text and Character Support in Diagrams: There are proposals to improve text handling in Mermaid.js diagrams, including enabling multi-line titles and supporting non-English characters in
erDiagram
. These enhancements aim to improve readability and accommodate a wider range of languages and character sets.
- Security and Dependency Management: A security vulnerability in Mermaid.js due to a dependency on a vulnerable version of dompurify has been identified, requiring a patch for version 10.9.x. This issue highlights the importance of maintaining secure dependencies to protect users from potential exploits.
- Parsing and Direction Handling Errors: Parsing errors have been reported in Mermaid.js, such as failures when using specific state names or setting certain directions in subgraphs. These issues indicate inconsistencies in the parser that need to be addressed to ensure reliable diagram rendering.
- Diagram Information and Clarity Improvements: Suggestions have been made to enhance the clarity of diagrams in Mermaid.js, such as attaching text snippets to edges and using horizontal lines to separate attributes and methods in class diagrams. These changes aim to reduce confusion and improve the conveyance of information within diagrams.
- Community and Integration Requests: A request has been made to include Tiki, a content management system, in the list of integrations on the Mermaid website. This highlights the ongoing efforts to expand Mermaid.js's integration with various platforms and communities.
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: 1
Summarized Issues:
- Mermaid Graph Rendering Bug: The Mermaid graph rendering tool has a bug where using the single letter "o" as a node ID results in incorrect connections between nodes. This issue arises because the tool misinterprets "o" as a special edge type rather than a node identifier, leading to an incorrect graph structure.
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. All other pull requests are grouped based on similar characteristics for easier analysis.
Pull Requests Opened This Week: 4
Key Open Pull Requests
1. fix(mindmap): correctly render ampersand (&): This pull request addresses an issue in the Mermaid project where ampersands (&) were not rendering correctly in Mindmap nodes by updating the code to use .html(description)
instead of .text(description)
, ensuring that special HTML characters are displayed properly without affecting existing functionality, and includes necessary tests and documentation updates.
- URL: pull/6315
- Merged: No
2. docs(integrations): add tiki to community list cms/ecm: This pull request aims to enhance the documentation by adding Tiki to the community list of CMS/ECM integrations in the Mermaid project, as part of resolving issue #6339, and includes tasks such as reading contribution guidelines, adding necessary tests, updating documentation with the correct release version, and generating a changeset for any notable changes.
- URL: pull/6340
- Merged: No
3. Update requirementDiagram.md: This pull request involves updating the requirementDiagram.md
file in the Mermaid project, with a focus on ensuring compliance with contribution guidelines, adding necessary tests and documentation, and potentially generating a changeset for changelog updates, as indicated by the linked commit and the tasks outlined in the pull request description.
- URL: pull/6323
- Merged: No
- Associated Commits: d897f
Other Open Pull Requests
- Regex Error in Sequence Diagrams: This pull request addresses a regex error that unintentionally disallowed the equal sign in sequence diagram participants. The issue is resolved by correcting the character class to allow the equal sign, ensuring proper functionality as detailed in the commit.
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. All other pull requests are grouped based on similar characteristics for easier analysis.
Pull Requests Closed This Week: 4
Key Closed Pull Requests
1. Update Requirement diagram to unified renderer: This pull request updates the Requirement diagram in the Mermaid project to utilize a new unified rendering approach, introducing features such as a new requirementBox shape, support for styling and classes, the ability to change diagram direction, and a hand-drawn appearance, while also ensuring the diagram's behavior aligns with typical requirement diagrams by dynamically sizing based on text content and omitting undefined information.
- URL: pull/6219
- Merged: 2025-02-26T11:52:25Z
- Associated Commits: adec6, d9060, f0e47, 54ee6, 809f4, fe833, f7648, 08168, 41d7a, 9ab27, 13063, 02f66, 38ca1, fa48f, 22bc2, cc237, 42dfa, 23bc2, 22091, 74edf, 47d4d, 97788, 9609a, c296f, 52328, a3f35, b53cf, f0050, d0768, baf3a, 3004d
2. Added Outline (getoutline.com) to community integrations: This pull request adds Outline (getoutline.com) to the community integrations of the Mermaid project, highlighting its full support for Mermaid diagrams with features like collaborative real-time editing and inline previews, as documented in the provided link.
- URL: pull/6333
- Merged: 2025-02-28T11:35:57Z
3. Fix: Could not find a suitable point for the given distance: This pull request addresses a bug in the Mermaid Chart library by fixing a division by zero error that occurs when calculating points for an edge with zero vector distance, which results in a NaN value, and implements a solution to return the previous point when the vector distance is zero to prevent this error.
- URL: pull/6329
- Merged: 2025-02-26T11:57:49Z
Other Closed Pull Requests
-
Promo Bar Updates in Mermaid Project: The pull request focuses on updates to the promo bar within the Mermaid project. It involves design decisions made by the Mermaid Chart team and includes commits aimed at fixing the promo bar and updating its styling.
3.3 Pull Request Discussion Insights
This section will analyze the tone and sentiment of discussions within this project's open and closed pull requests 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 pull requests from the past week.
IV. Contributors
4.1 Contributors
Active Contributors:
We consider an active contributor in this project to be any contributor who has made at least 1 commit, opened at least 1 issue, created at least 1 pull request, or made more than 2 comments in the last month.
If there are more than 10 active contributors, the list is truncated to the top 10 based on contribution metrics for better clarity.
Contributor | Commits | Pull Requests | Issues | Comments |
---|---|---|---|---|
sidharthv96 | 38 | 5 | 0 | 34 |
saurabhg772244 | 33 | 5 | 0 | 15 |
yari-dewalt | 37 | 2 | 0 | 2 |
Shahir-47 | 24 | 1 | 0 | 0 |
udvale | 21 | 0 | 0 | 1 |
aloisklink | 1 | 0 | 0 | 20 |
nour0205 | 4 | 5 | 1 | 9 |
pranavm2109 | 13 | 0 | 0 | 1 |
monicanguyen25 | 12 | 1 | 0 | 0 |
No author found | 12 | 0 | 0 | 0 |