feat: Replace x/Actions in Mermaid and HighlightCode component
🤔 This is a ...
- [x] 🆕 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 https://github.com/ant-design/x/issues/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中的功能按钮 |
[!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.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein 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.
Comment @coderabbitai help to get the list of available commands and usage tips.
Summary of Changes
Hello @Rain120, I'm Gemini Code Assist[^1]! 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/Actionscomponent from@ant-design/x. -
Code Simplification: Individual
Button,Space, andTooltipcomponents fromantdhave been replaced by a single, unifiedActionscomponent, streamlining the UI code. -
New Icon: The
UndoOutlinedicon 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 :thumbsup: and :thumbsdown: 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.
[^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.
Bundle Report
Changes will increase total bundle size by 3.98MB (2248.57%) :arrow_up::warning:, exceeding the configured threshold of 5%.
| Bundle name | Size | Change |
|---|---|---|
| x-markdown-array-push | 4.15MB | 3.98MB (2248.57%) :arrow_up::warning: |
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 (New) |
4.15MB | 4.15MB | 100.0% :rocket: |
~~x-markdown.min.js~~ (Deleted) |
-174.15kB | 0 bytes | -100.0% :wastebasket: |
~~x-markdown.min.css~~ (Deleted) |
-2.75kB | 0 bytes | -100.0% :wastebasket: |
标题需要遵守规范同时需要 关联issue gemini-code-assist 提的问题需要看下
标题需要遵守规范同时需要 关联issue gemini-code-assist 提的问题需要看下
- [ ] 标题规范在哪里看呀
- [x] related issue了
- [x] assist的评论是因为翻译错误导致误导我的问题
标题需要遵守规范同时需要 关联issue gemini-code-assist 提的问题需要看下
- [ ] 标题规范在哪里看呀
- [x] related issue了
- [x] assist的评论是因为翻译错误导致误导我的问题
![]()
更新日志 需要补齐中英文 列表上可以看其他的pr参照命名
需要确保 checks 全部通过
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 94.21%. Comparing base (7010ca4) to head (0275fb9).
Additional details and impacted files
@@ Coverage Diff @@
## next #1291 +/- ##
==========================================
+ Coverage 94.06% 94.21% +0.14%
==========================================
Files 144 144
Lines 3708 3731 +23
Branches 1023 1048 +25
==========================================
+ Hits 3488 3515 +27
+ Misses 218 214 -4
Partials 2 2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
需要合并下最新的next分支,并且代码高亮插件(HighlightCode)也需要替换哈
@Div627 done

