Skip to content

Conversation

@kimteayon
Copy link
Collaborator

@kimteayon kimteayon commented Dec 1, 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

  • 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 Suggestion 新增语义化实现,移除重复的 Enter 触发事件,修复 onSubmit 方法多次执行的问题, onSelect 方法新增 selectedOptions 完整数据返回,同时对选项的实现使用 useMergedState 进行了重构

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Prepare preview

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 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.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-suggestion

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.

@dosubot dosubot bot added the javascript Pull requests that update Javascript code label Dec 1, 2025
@gemini-code-assist
Copy link
Contributor

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 focuses on enhancing the user experience and developer flexibility across several core UI components. It introduces more granular control over file uploads and image previews, refines keyboard interaction handling in text input areas, and significantly upgrades the suggestion component with semantic styling and improved event callbacks. These changes aim to make the components more robust, customizable, and easier to integrate, while also ensuring documentation is up-to-date with the latest features and usage patterns.

Highlights

  • FileList Component Enhancements: Improved the logic for displaying the upload button in the FileList component, making it dependent on the disabled state and maxCount property. The Progress component also saw a minor prop name correction.
  • FileCard Image Preview Refinement: Streamlined the image preview functionality in the FileCard component by removing a redundant preview prop and clarifying that image preview configurations should now be managed directly via imageProps.
  • Sender Keyboard Event Handling: Enhanced the SlotTextArea and TextArea components within Sender to allow external onKeyDown handlers to prevent default actions, providing more control over keyboard interactions. The onKeyDown prop type was updated to reflect this.
  • Suggestion Component Overhaul: The Suggestion component received significant updates, including a refactor for semantic styling, an enriched onSelect callback that now provides selected item details, and improved keyboard navigation. Test suites and documentation were updated accordingly, and a new semantic demo was added.
  • Documentation Updates: Comprehensive updates to both English and Chinese documentation for FileList, FileCard, and Suggestion components, detailing new props, clarified behaviors, and semantic DOM structures.
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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 1, 2025

Deploying ant-design-x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1a5f4e8
Status:⚡️  Build in progress...

View logs

Copy link
Contributor

@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 introduces several enhancements and refactorings across the attachments, file-card, sender, and suggestion components. Key improvements include better handling of onKeyDown events in Sender components, allowing callbacks to prevent default behavior, and enriching the onSelect callback for Suggestion with more detailed information. Documentation for Attachments and Suggestion has been updated to reflect new props and clarified existing ones. Additionally, the FileCard component's image preview logic has been streamlined, and a new semantic demo for Suggestion has been added. Overall, these changes improve the flexibility, type safety, and clarity of the components.

@kimteayon kimteayon changed the title feat: Feat suggestion feat: add semantic for suggestion & remove Enter & Dec 1, 2025
@kimteayon kimteayon changed the title feat: add semantic for suggestion & remove Enter & feat: add semantic for suggestion & remove redundant 'Enter' to trigger the submit logic & onSelect add Dec 1, 2025
@kimteayon kimteayon changed the title feat: add semantic for suggestion & remove redundant 'Enter' to trigger the submit logic & onSelect add feat: add semantic for suggestion & remove redundant 'Enter' to trigger the submit logic & onSelect add selectedOptions params Dec 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

size-limit report 📦

Path Size
packages/x/dist/antdx.min.js 56.39 KB (-40 B 🔽)
packages/x-sdk/dist/x-sdk.min.js 7.29 KB
packages/x-markdown/dist/x-markdown.min.js 50.64 KB
packages/x-markdown/dist/plugins/code-high-light.min.js 317.77 KB
packages/x-markdown/dist/plugins/latex.min.js 61.95 KB
packages/x-markdown/dist/plugins/mermaid.min.js 885.67 KB

@kimteayon kimteayon linked an issue Dec 1, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Dec 1, 2025

Bundle Report

Changes will decrease total bundle size by 1.23MB (-29.54%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antdx-array-push* 136.24kB 136.24kB (100%) ⬆️
x-markdown-array-push 2.79MB -1.36MB (-32.82%) ⬇️

ℹ️ *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 (%)
code-high-light.js (New) 2.79MB 2.79MB 100.0% 🚀
mermaid.min.js (Deleted) -4.15MB 0 bytes -100.0% 🗑️

@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.03%. Comparing base (433672d) to head (ee6e462).
⚠️ Report is 1 commits behind head on feature.

Files with missing lines Patch % Lines
packages/x/components/suggestion/useActive.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           feature    #1406      +/-   ##
===========================================
- Coverage    94.10%   94.03%   -0.07%     
===========================================
  Files          140      140              
  Lines         3869     3859      -10     
  Branches      1092     1085       -7     
===========================================
- Hits          3641     3629      -12     
- Misses         225      227       +2     
  Partials         3        3              

☔ 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

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion antd 用法升级到v6

2 participants