-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(form): export SubmitterProps type #9302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @leshalv, 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 introduces a minor but important fix by exporting a key type definition. The change ensures that developers using the form library have full access to the Highlights
Using Gemini Code AssistThe 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
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 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
|
📝 Walkthrough高层概述在 变更清单
代码审查工作量评估🎯 1 (轻微) | ⏱️ ~3 分钟 关注要点:
庆祝诗句
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{tsx,jsx}📄 CodeRabbit inference engine (.cursor/rules/react.mdc)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (1)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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 |
There was a problem hiding this 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 correctly exports the SubmitterProps type. My review includes one suggestion for improving maintainability by using the existing barrel file pattern for BaseForm components. This would make the module's export structure more consistent and easier to manage.
| export { LightWrapper } from './BaseForm'; | ||
| export type { LightWrapperProps, ProFormInstance } from './BaseForm'; | ||
|
|
||
| export type { SubmitterProps } from './BaseForm/Submitter'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency and better maintainability, it would be preferable to export SubmitterProps through the BaseForm's barrel file (src/form/BaseForm/index.ts), similar to how other BaseForm-related types are handled.
This would involve two steps:
- Add
export * from './Submitter';tosrc/form/BaseForm/index.ts. - Then, in this file (
src/form/index.tsx), you could modify the existingexport typefor./BaseFormto includeSubmitterPropsand remove the newly added line. The modified line would look like this:export type { LightWrapperProps, ProFormInstance, SubmitterProps } from './BaseForm';
This approach keeps the module's public API consolidated and easier to manage by avoiding direct dependencies on nested files from the top-level index file.
Summary by CodeRabbit
发布说明
SubmitterProps类型导出,完善表单组件的公开接口,增强 API 可访问性。✏️ Tip: You can customize this high-level summary in your review settings.