Skip to content

Release Candidate 11.17.0 - #8071

Merged
aloisklink merged 294 commits into
masterfrom
release/11.17.0
Aug 18, 2026
Merged

aloisklink merged 294 commits into
masterfrom
release/11.17.0

Conversation

@pbrolin47

@pbrolin47 pbrolin47 commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

📑 Summary

This pull request introduces several new features, improvements, and fixes across the Mermaid ecosystem, focusing on enhanced diagram rendering, configurability, and user experience. Major highlights include new shapes and rendering options, collapsible subgraphs, improved layout handling, and a TypeScript migration for the C4 diagram implementation. Additionally, there are numerous bug fixes and quality-of-life improvements for both users and developers.

New Features and Enhancements

  • Unified Rendering and New Shapes

    • The classDiagram now uses the unified (v2) renderer by default, with improved self-loop rendering. You can revert to the legacy renderer via config if needed.
    • C4 elements are now rendered through the unified shape system, including a new person shape. [1] [2]
    • Added new shapes for flowcharts: folder, bucket, console (terminal window), and browser.
  • Diagram Interactivity and Examples

    • Flowchart subgraphs can now be collapsed using the @{ view: collapsed } annotation, rendering them as single nodes with redirected edges.
    • ER diagrams now support subgraphs.
    • Added relatable, real-world examples for every diagram type, all parse-validated and tested.
  • Layout Improvements

    • ELK layout is now integrated into the shared rendering pipeline, ensuring consistent rendering and exposing elk.nodePlacementAlignment for custom alignment strategies.
    • Added elk.keepEntryNodeOnTop config option to ensure entry nodes remain at the top in recursive flows.
    • The unified dagre layout now correctly prioritizes diagram-specific node/rank spacing over flowchart defaults.

Bug Fixes and Maintenance

  • Rendering and Parsing Fixes

    • Fixed overlapping sibling blocks in block diagrams when labels are wider than 200px.
    • Prevented RangeError: Invalid array length crashes for certain edges by clamping dash-gap pair counts.
    • Fixed C4 named attributes ($tags, $link, $sprite) from being overwritten by positional arguments.
    • Allowed non-ASCII characters and punctuation in unquoted architecture bracket titles.
    • Fixed treeView icons disappearing after strict security sanitization.
    • Block diagrams now allow classdefs to update text color.
    • Stopped dagre layout from emitting excessive warn-level logs, improving performance for large diagrams.
    • Reverted a previous change (fix(flowchart): respect per-subgraph direction keyword in Dagre layout #7672) that broke arrows between subgraphs.
  • Codebase Maintenance

    • Migrated the C4 diagram implementation to TypeScript and introduced shared helpers, with no behavior changes.
    • Pinned langium to version 4.2.1 to maintain compatibility with chevrotain v11 and Node 20.

Other Notable Changes

  • Improved support for Unicode and punctuation in architecture diagram titles.

These changes collectively enhance the flexibility, reliability, and maintainability of Mermaid diagrams and their underlying codebase.

Resolves #

📏 Design Decisions

Describe the way your implementation works or what design decisions you made if applicable.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

knsv and others added 30 commits June 5, 2026 15:19
Addresses feedback from the review:
- add Cypress snapshot tests for subgraphs.
- add unit tests for getData() cluster output.
- clarify documentation for quoted identifiers in relationships.
- address minor nits and code cleanup.

Closes #7417

Co-authored-by: Beatriz Braga <beatrizagbraga@tecnico.ulisboa.pt>
fix: preserve run script argument boundaries
…/common-render-pipeline-4-dagre-layoutdata
…odex/common-render-pipeline-5-dagre-shared-paint
… codex/common-render-pipeline-6-dagre-shared-nodes
… codex/common-render-pipeline-6-dagre-shared-nodes
… codex/common-render-pipeline-6-dagre-shared-nodes
…agre-shared-nodes' into codex/common-render-pipeline-6-dagre-shared-nodes
…/common-render-pipeline-4-dagre-layoutdata
…odex/common-render-pipeline-5-dagre-shared-paint
… codex/common-render-pipeline-6-dagre-shared-nodes
…ntry node on top

When a flow loops back on itself (a back-edge to an earlier node), elk.layered's
degree-based cycle-breaking has no notion of an entry point and can rank the
first-declared node mid-layout, scrambling the reading order.

The new opt-in elk.keepEntryNodeOnTop option (default false) detects the entry
node of each recursive flow - grouped per parentId, ignoring self-loops, by
finding weakly-connected components with no natural source - and pins it to the
first layer via elk.layered.layering.layerConstraint = FIRST. Detection is scoped
per container, so cycles inside subgraphs are handled independently. Acyclic flows
have a natural source, so nothing is nominated and their layout is unchanged.

Resolves #7827
… codex/common-render-pipeline-6-dagre-shared-nodes
ashishjain0512 and others added 10 commits August 5, 2026 12:31
…support

langium 4.2.2+ switched to chevrotain v12, which declares engines
node >=22 and calls Object.groupBy (a Node 21+ API) during grammar
validation. Since chevrotain is bundled into the published
@mermaid-js/parser, this shipped Node 22-only code to consumers and
broke `langium generate` for contributors on Node 20.

- Pin langium to 4.2.1 (last release on chevrotain ~11.1.1) in the
  parser package and via a pnpm override, so langium-cli's internal
  langium (range ~4.2.0) can't resolve to 4.2.4 either
- Pin langium-cli to ~4.2.1
- Disable renovate updates for langium/langium-cli/chevrotain/
  @chevrotain/types so the pin isn't silently re-broken (this drift
  was introduced by a renovate patch-bump of langium ^4.0.3 -> ^4.2.4)

Verified on Node 20.12.0: pnpm install + full build, langium:generate,
parser unit tests (691/691), and parsing via the built
mermaid-parser.core.mjs bundle (zero Object.groupBy in dist).

Resolves #8027

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The v11.16.1 hotfixes skipped the `develop` branch, so we should merge
these in now to avoid merge conflicts in the future.
Co-authored-by: Alois Klink <alois@aloisklink.com>
chore: merge v11.16.1 back to the `develop` branch
…flows

perf: use the `fastdom` library to avoid unnecessary reflows
…ain-node20

fix(parser): pin langium to 4.2.1 to keep chevrotain v11 and Node 20 support
…er-bucket-console-browser

feat(shapes): add folder, bucket, console and browser shapes
@changeset-bot

changeset-bot Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4150c73

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@mermaid-js/parser Patch
mermaid Minor
@mermaid-js/layout-elk Minor
@mermaid-js/examples Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cd393df2-9a7b-4fe8-9d29-f6d5838139f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pbrolin47 pbrolin47 changed the title Release Candidate 11.176.0 Release Candidate 11.17.0 Aug 18, 2026
@codecov

codecov Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.08894% with 122 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.54%. Comparing base (eba7287) to head (8628ef1).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
packages/mermaid-layout-elk/src/render.ts 86.08% 122 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #8071       +/-   ##
===========================================
+ Coverage   64.30%   77.54%   +13.23%     
===========================================
  Files         670      572       -98     
  Lines       75072    75279      +207     
  Branches    11171    14686     +3515     
===========================================
+ Hits        48273    58373    +10100     
+ Misses      26799    15901    -10898     
- Partials        0     1005     +1005     
Flag Coverage Δ
e2e 71.42% <ø> (?)
unit 74.80% <86.08%> (+10.50%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/mermaid/src/defaultConfig.ts 51.82% <ø> (-3.10%) ⬇️
packages/mermaid/src/diagram-api/requiredConfig.ts 100.00% <ø> (ø)
...ckages/mermaid/src/diagrams/block/blockRenderer.ts 91.93% <ø> (-0.93%) ⬇️
...ckages/mermaid/src/diagrams/block/renderHelpers.ts 69.91% <ø> (+11.39%) ⬆️
packages/mermaid/src/diagrams/block/styles.ts 100.00% <ø> (ø)
packages/mermaid/src/diagrams/c4/c4Db.ts 63.29% <ø> (ø)
packages/mermaid/src/diagrams/c4/c4Renderer.ts 82.07% <ø> (ø)
packages/mermaid/src/diagrams/c4/c4ShapeAdapter.ts 93.84% <ø> (ø)
packages/mermaid/src/diagrams/c4/styles.js 100.00% <ø> (ø)
packages/mermaid/src/diagrams/c4/svgDraw.ts 63.81% <ø> (ø)
... and 68 more

... and 272 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@argos-ci

argos-ci Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 281 added Aug 18, 2026, 1:35 PM

pbrolin47 and others added 4 commits August 18, 2026 14:29
Pinning langium is only a devDependency change, and doesn't cause any
observable difference compared to the previous `@mermaid-js/parser`
release.
As a refactoring only change, this doesn't need to go in our public
changelog.
@pbrolin47
pbrolin47 marked this pull request as ready for review August 18, 2026 13:01
@aloisklink
aloisklink merged commit 1127c5f into master Aug 18, 2026
40 of 42 checks passed
@aloisklink
aloisklink deleted the release/11.17.0 branch August 18, 2026 13:38
@github-actions github-actions Bot mentioned this pull request Aug 18, 2026
ark-65 added a commit to zhongmiao-org/mermaid-markdown-bridge that referenced this pull request Aug 21, 2026
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.17.0

Release notes:
### Minor Changes

-   [#7842](mermaid-js/mermaid#7842) [`3670b4e`](mermaid-js/mermaid@3670b4e) Thanks [@filipsajdak](https://github.com/filipsajdak)! - feat(c4): render C4 elements through the unified shape system, using the new person shape

-   [#7812](mermaid-js/mermaid#7812) [`cdfc0ea`](mermaid-js/mermaid@cdfc0ea) Thanks [@knsv-bot](https://github.com/knsv-bot)! - feat(class): route `classDiagram` to the unified (v2) renderer by default

    Set `class: { defaultRenderer: 'dagre-d3' }` in the config to restore the legacy renderer.

-   [#7785](mermaid-js/mermaid#7785) [`c45cde9`](mermaid-js/mermaid@c45cde9) Thanks [@knsv-bot](https://github.com/knsv-bot)! - feat(flowchart): add collapsible flowchart subgraphs via `subgraphId@{ view: collapsed }`

-   [#7828](mermaid-js/mermaid#7828) [`8eb3afc`](mermaid-js/mermaid@8eb3afc) Thanks [@knsv-bot](https://github.com/knsv-bot)! - feat(elk): add `elk.keepEntryNodeOnTop` config option to keep a recursive flow's entry node on top

-   [#7803](mermaid-js/mermaid#7803) [`74e44eb`](mermaid-js/mermaid@74e44eb) Thanks [@knsv-bot](https://github.com/knsv-bot)! - feat(elk): add `elk.nodePlacementAlignment` config option

-   [#7792](mermaid-js/mermaid#7792) [`ea55b31`](mermaid-js/mermaid@ea55b31) Thanks [@RodrigojndSantos](https://github.com/RodrigojndSantos)! - feat(er): add subgraph support to ER diagrams.

-   [#7970](mermaid-js/mermaid#7970) [`a2c0fb6`](mermaid-js/mermaid@a2c0fb6) Thanks [@filipsajdak](https://github.com/filipsajdak)! - feat(flowchart): add `folder`, `bucket`, `console` (terminal window) and `browser` shapes

-   [#7842](mermaid-js/mermaid#7842) [`ae3e115`](mermaid-js/mermaid@ae3e115) Thanks [@filipsajdak](https://github.com/filipsajdak)! - feat(flowchart): add `person` shape (circular head above a rounded body), usable in flowcharts via `A@{ shape: person }`

-   [#7724](mermaid-js/mermaid#7724) [`0fd7a9f`](mermaid-js/mermaid@0fd7a9f) Thanks [@xdumaine](https://github.com/xdumaine)! - feat(xyChart): add legends for named line and bar series

### Patch Changes

-   [#7847](mermaid-js/mermaid#7847) [`215fe89`](mermaid-js/mermaid@215fe89) Thanks [@filipsajdak](https://github.com/filipsajdak)! - fix(c4): named attributes such as `$tags`, `$link` and `$sprite` are no longer clobbered to undefined when they arrive in an earlier positional slot of Person/System/Container/Component/Boundary/Rel statements.

-   [#7871](mermaid-js/mermaid#7871) [`8d874c4`](mermaid-js/mermaid@8d874c4) Thanks [@knsv-bot](https://github.com/knsv-bot)! - fix(flowchart): stop dagre layout from spamming `warn`-level logs on every node/edge/cluster

-   [#8071](mermaid-js/mermaid#8071) [`b3d1f63`](mermaid-js/mermaid@b3d1f63) Thanks [@pbrolin47](https://github.com/pbrolin47)! - fix(block): sibling blocks overlapping in block diagrams when one has a label wider than 200px

-   [#7870](mermaid-js/mermaid#7870) [`71b8843`](mermaid-js/mermaid@71b8843) Thanks [@knsv-bot](https://github.com/knsv-bot)! - fix: a `RangeError: Invalid array length` crash when rendering certain edges.

-   [#7924](mermaid-js/mermaid#7924) [`9cbef5d`](mermaid-js/mermaid@9cbef5d) Thanks [@nightt5879](https://github.com/nightt5879)! - fix(treeView): icons disappearing after strict security sanitization.

-   [#7850](mermaid-js/mermaid#7850) [`a34cbf0`](mermaid-js/mermaid@a34cbf0) Thanks [@aloisklink](https://github.com/aloisklink)! - fix(block): allow classdefs to update text color

-   [#7937](mermaid-js/mermaid#7937) [`f9cbe1e`](mermaid-js/mermaid@f9cbe1e) Thanks [@filipsajdak](https://github.com/filipsajdak)! - fix(dagre): let a diagram's own nodeSpacing/rankSpacing take effect in the unified dagre layout

-   [#8005](mermaid-js/mermaid#8005) [`90eeece`](mermaid-js/mermaid@90eeece) Thanks [@pbrolin47](https://github.com/pbrolin47)! - fix(flowchart): reverts the behavior change from #7672 (fix/4648-directions), since arrows between subgraphs are broken

-   [#7951](mermaid-js/mermaid#7951) [`afa2f80`](mermaid-js/mermaid@afa2f80) Thanks [@aloisklink](https://github.com/aloisklink)! - perf: use `fastdom` to batch DOM measurements (up to 25% speedup)

-   Updated dependencies \[[`e848423`](mermaid-js/mermaid@e848423)]:
    -   @mermaid-js/parser@1.2.1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
@pbrolin47 pbrolin47 self-assigned this Aug 31, 2026
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.