Skip to content

Conversation

@Samoy
Copy link

@Samoy Samoy commented Nov 11, 2025

🤔 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

fix #1283

💡 Background and Solution

Resolve the issue where the toolbar icons of HighlightCode and Mermaid do not comply with ant-design/x standards

📝 Change Log

Language Changelog
🇺🇸 English Resolve the issue where the toolbar icons of HighlightCode and Mermaid do not comply with ant-design/x standards
🇨🇳 Chinese 解决HighlightCode和Mermaid的操作栏图标不符合ant-design/x规范的问题

- 在 HighlightCode 和 Mermaid 插件中用 Actions.Copy 替换复制按钮
- 在 Mermaid 插件中用 Actions 组件重构缩放和下载操作
@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

Preview is ready

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 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 @Samoy, 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!

此拉取请求旨在通过将 x-markdown 库中 HighlightCodeMermaid 插件的工具栏操作按钮替换为 Actions 组件,来重构和标准化用户界面。这一更改确保了这些组件的图标和交互符合 ant-design/x 的设计规范,从而提升了整体的用户体验和代码一致性。

Highlights

  • 组件替换: 将 HighlightCodeMermaid 插件中的按钮组替换为统一的 Actions 组件。
  • 符合规范: 解决 HighlightCodeMermaid 工具栏图标不符合 ant-design/x 规范的问题。
  • 代码优化: 简化了相关代码,提高了组件的一致性和可维护性。
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.

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

本次 PR 将按钮组重构为使用新的 Actions 组件,这对于保持一致性是很好的。然而,实现上存在一些问题。在 HighlightCodeMermaid 组件中,专用的 Actions.Copy 组件被错误地使用,导致其复制空字符串并产生令人困惑的 UI 行为。在 Mermaid 组件中,操作被分散在一个独立的 Actions.Copy 和一个 Actions 组中,这不一致。此外,其中一个操作(zoomReset)使用 actionRender 回退到旧的实现方式,这可能会破坏视觉一致性。我已经提供了修复这些问题的建议。

- 使用 `Actions.Copy` 组件直接处理复制功能
- 移除 `message` 和 `useLocale` 相关代码
@codecov
Copy link

codecov bot commented Nov 11, 2025

Bundle Report

Changes will increase total bundle size by 5.18MB (131.1%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
x-markdown-array-push 9.14MB 5.18MB (131.1%) ⬆️⚠️

Affected Assets, Files, and Routes:

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

Assets Changed:

Asset Name Size Change Total Size Change (%)
mermaid.js (New) 9.14MB 9.14MB 100.0% 🚀
mermaid.min.js (Deleted) -3.95MB 0 bytes -100.0% 🗑️

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.

1 participant