Skip to content

Conversation

kimteayon
Copy link
Collaborator

中文版模板 / 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

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English
🇨🇳 Chinese

Copy link
Contributor

coderabbitai bot commented Sep 8, 2025

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.

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.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch markdown-theme

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.

Copy link
Contributor

github-actions bot commented Sep 8, 2025

Preview is ready

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.

Summary of Changes

Hello @kimteayon, 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 addresses and fixes several styling inconsistencies within the Markdown components, specifically focusing on code highlighting and Mermaid diagrams. The changes aim to improve the visual presentation and ensure a more cohesive look by adjusting border properties, background colors, and inner element styling for these components.

Highlights

  • HighlightCode Styling Refinement: The styling for HighlightCode blocks has been updated to refine borders and background. Specifically, the border was changed from a generic 1px solid to a more specific 1px solid using token.colorBgTitle for the bottom, left, and right, while the top border was removed. The background is now set to token.colorBgContainer instead of transparent. Additionally, nested code elements within HighlightCode blocks now have their border-radius set to 0 and borders removed.
  • Mermaid Diagram and Code Block Styling: Similar to HighlightCode, the styling for Mermaid diagrams and their associated code blocks has been adjusted. Borders for the diagram container and code blocks now use token.colorBgTitle for bottom, left, and right, with the top border removed. The background for both is set to token.colorBgContainer. Inner code elements within Mermaid blocks also received borderRadius: 0 and border: 'none'.
  • Mermaid Demo Display Adjustment: The Mermaid/basic.tsx demo file was updated to ensure proper display of Mermaid content with the new styles. This includes reordering imports and adding a styles prop to the Bubble component to explicitly set the content width to 700, which helps accommodate the visual changes.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 bug Something isn't working label Sep 8, 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 adjusts the styling for Markdown components, specifically for HighlightCode and Mermaid plugins. The changes primarily focus on refining the border styles of code blocks and diagrams to ensure a consistent look and feel. My review focuses on improving the maintainability of these new styles by suggesting more concise CSS-in-JS property declarations. The changes are otherwise correct and improve the visual presentation.

Copy link

codecov bot commented Sep 8, 2025

Bundle Report

Changes will increase total bundle size by 25.91kB (0.63%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
x-markdown-array-push 3.93MB 25.91kB (0.66%) ⬆️

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 25.91kB 3.93MB 0.66%

Copy link

cloudflare-workers-and-pages bot commented Sep 8, 2025

Deploying ant-design-x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 42f40fc
Status: ✅  Deploy successful!
Preview URL: https://f909daf6.ant-design-x.pages.dev
Branch Preview URL: https://markdown-theme.ant-design-x.pages.dev

View logs

Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.56%. Comparing base (7f62e8d) to head (42f40fc).
⚠️ Report is 85 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1161      +/-   ##
==========================================
- Coverage   94.57%   94.56%   -0.01%     
==========================================
  Files         131      131              
  Lines        3389     3388       -1     
  Branches      944      940       -4     
==========================================
- Hits         3205     3204       -1     
  Misses        182      182              
  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.

Copy link
Contributor

github-actions bot commented Sep 8, 2025

size-limit report 📦

Path Size
packages/x/dist/antdx.min.js 65.4 KB (+56 B 🔺)
packages/x-sdk/dist/x-sdk.min.js 7.1 KB
packages/x-markdown/dist/x-markdown.min.js 50.09 KB
packages/x-markdown/dist/plugins/code-high-light.min.js 275.78 KB (-7 B 🔽)
packages/x-markdown/dist/plugins/latex.min.js 61.97 KB
packages/x-markdown/dist/plugins/mermaid.min.js 847.33 KB (-93 B 🔽)

@kimteayon kimteayon changed the title fix: Markdown style fix: resolve the conflict coverage issue between Dumi style and xmarkdown Sep 8, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 8, 2025
@kimteayon kimteayon merged commit 7a7ffb9 into next Sep 8, 2025
13 checks passed
@kimteayon kimteayon deleted the markdown-theme branch September 8, 2025 15:17
@dosubot dosubot bot mentioned this pull request Sep 10, 2025
@kimteayon kimteayon added the 2.x Ant Design X 2.x label Sep 19, 2025
@kimteayon kimteayon added this to the Ant Design X v2 milestone Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Ant Design X 2.x bug Something isn't working lgtm This PR has been approved by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants