Skip to content

Conversation

@seomsoo
Copy link

@seomsoo seomsoo commented Jan 16, 2026

Overview

Fix Mermaid diagrams disappearing when attributes/classes change by re-rendering only on actual theme changes.

Closes #1884

Files changed

  • patches/@theguild__remark-mermaid.patch
  • pnpm-lock.yaml
  • pnpm-workspace.yaml

What changed

  • Patch @theguild/remark-mermaid Mermaid renderer:
    • Track current theme state (isDark)
    • Re-render Mermaid only when the theme state changes

How to reproduce

  1. Open a page with Mermaid diagrams (e.g. Introduction)
  2. Click the language/version dropdown OR toggle the mobile hamburger menu
  3. Before: diagrams disappear
  4. After: diagrams stay visible

Testing

  • Verified locally on desktop and mobile viewport
  • Confirmed Mermaid diagrams remain stable across dropdown/menu toggles
  • Confirmed diagrams still update correctly when switching dark/light theme
dark white

PR Checklist

  • I did below actions if need
  1. I read the Contributing Guide
  2. I added documents and tests.

@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2026

⚠️ No Changeset found

Latest commit: fbccebb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link
Contributor

vercel bot commented Jan 16, 2026

@seomsoo is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.81%. Comparing base (83e64e7) to head (fbccebb).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1885   +/-   ##
=======================================
  Coverage   93.81%   93.81%           
=======================================
  Files          40       40           
  Lines         631      631           
  Branches      156      157    +1     
=======================================
  Hits          592      592           
  Misses         36       36           
  Partials        3        3           
Components Coverage Δ
@suspensive/react 100.00% <ø> (ø)
@suspensive/react-query 100.00% <ø> (ø)
@suspensive/react-query-4 100.00% <ø> (ø)
@suspensive/react-query-5 100.00% <ø> (ø)
@suspensive/jotai 100.00% <ø> (ø)
@suspensive/codemods 81.60% <ø> (ø)
🚀 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.

@coauthors
Copy link

coauthors bot commented Jan 16, 2026

People can be co-author:

Candidate Reasons Count Add this as commit message
@seomsoo #1885 1 Co-authored-by: seomsoo <[email protected]>
@codecov-commenter #1885 (comment) 1 Co-authored-by: codecov-commenter <[email protected]>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Flowchart SVGs disappear when opening language dropdown

2 participants