Skip to content

Conversation

@Rain120
Copy link
Contributor

@Rain120 Rain120 commented Oct 31, 2025

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

close #1283

💡 Background and Solution

Use x/Actions instead of the direct button component with mermaid operate component

📝 Change Log

Language Changelog
🇺🇸 English Replaced x/Actions within the Mermaid component. 
🇨🇳 Chinese 使用 x/Actions 替换 mermaid中的功能按钮

@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2025

Preview is ready

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2025

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.

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

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @Rain120, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request standardizes the interactive controls within the Mermaid component by migrating from a collection of individual Ant Design Button components to the custom x/Actions component. This change enhances code consistency, simplifies the management of UI actions such as copy, zoom, reset, and download, and aligns the component with the project's internal component library.

Highlights

  • Component Refactoring: The action buttons within the Mermaid component have been refactored to utilize the x/Actions component from @ant-design/x.
  • Code Simplification: Individual Button, Space, and Tooltip components from antd have been replaced by a single, unified Actions component, streamlining the UI code.
  • New Icon: The UndoOutlined icon has been introduced and integrated for the zoom reset functionality.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dosubot dosubot bot added the enhancement New feature or request label Oct 31, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Mermaid component to use the x/Actions component for its controls, which is a great step towards consistency and better code organization. The implementation is mostly correct, but I've found a significant issue with the zoom actions where the icons, labels, and keys are mismatched, leading to incorrect behavior. I've provided a code suggestion to resolve this. Once that's addressed, the changes look good.

@codecov
Copy link

codecov bot commented Oct 31, 2025

Bundle Report

Changes will increase total bundle size by 236.26kB (6.01%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
antdx-array-push* 226.4kB 226.4kB (100%) ⬆️⚠️
x-markdown-array-push 3.94MB 9.86kB (0.25%) ⬆️

ℹ️ *Bundle size includes cached data from a previous commit

Affected Assets, Files, and Routes:

view changes for bundle: x-markdown-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
mermaid.min.js 9.86kB 3.94MB 0.25%

@kimteayon
Copy link
Collaborator

标题需要遵守规范同时需要 关联issue
gemini-code-assist 提的问题需要看下

@Rain120
Copy link
Contributor Author

Rain120 commented Oct 31, 2025

标题需要遵守规范同时需要 关联issue gemini-code-assist 提的问题需要看下

  • 标题规范在哪里看呀
  • related issue了
  • assist的评论是因为翻译错误导致误导我的问题
image image

@Rain120 Rain120 changed the title Replace x/Actions in mermaid component Feat: Replace x/Actions in mermaid component Oct 31, 2025
@kimteayon kimteayon changed the title Feat: Replace x/Actions in mermaid component feat: Replace x/Actions in mermaid component Oct 31, 2025
@kimteayon
Copy link
Collaborator

标题需要遵守规范同时需要 关联issue gemini-code-assist 提的问题需要看下

  • 标题规范在哪里看呀
  • related issue了
  • assist的评论是因为翻译错误导致误导我的问题

image image

@kimteayon
Copy link
Collaborator

更新日志 需要补齐中英文
列表上可以看其他的pr参照命名

@Div627
Copy link

Div627 commented Nov 2, 2025

需要确保 checks 全部通过

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.18%. Comparing base (e8e3c4b) to head (5b195d6).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1291      +/-   ##
==========================================
+ Coverage   94.15%   94.18%   +0.02%     
==========================================
  Files         140      140              
  Lines        3662     3679      +17     
  Branches     1014     1032      +18     
==========================================
+ Hits         3448     3465      +17     
  Misses        212      212              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants