-
Notifications
You must be signed in to change notification settings - Fork 255
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
feat(uploader): add onOverLimit props & fix incorrect updating files when type = multiple #2566
base: next
Are you sure you want to change the base?
Conversation
Walkthrough此次更改引入了一个新的可选回调函数 Changes
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (3)
Files skipped from review as they are similar to previous changes (2)
Additional comments not posted (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #2566 +/- ##
==========================================
- Coverage 83.21% 83.19% -0.02%
==========================================
Files 217 217
Lines 17804 17809 +5
Branches 2574 2574
==========================================
+ Hits 14815 14816 +1
- Misses 2984 2988 +4
Partials 5 5 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 2
Outside diff range, codebase verification and nitpick comments (1)
src/packages/uploader/uploader.tsx (1)
Line range hint
290-317
: 使用临时数组_files
来累积文件项,提高了代码的清晰度。这是一个很好的改进,确保了无论文件是否为图像,状态都能够一致地更新。
提醒:为未覆盖的代码行添加测试。
静态分析工具指出,此代码段中的一些新增行没有被测试覆盖:
- 第290行
- 第308-309行
- 第313-314行
为了确保代码的可靠性,请为这些行添加测试。
如果需要帮助编写测试,请告诉我,我很乐意提供帮助。
Tools
GitHub Check: codecov/patch
[warning] 308-309: src/packages/uploader/uploader.tsx#L308-L309
Added lines #L308 - L309 were not covered by tests
[warning] 313-314: src/packages/uploader/uploader.tsx#L313-L314
Added lines #L313 - L314 were not covered by tests
新增onOverLimit回调
修复多个文件上传的所选文件的错误
新特性提交
日常 bug 修复
站点、文档改进
TypeScript 定义更新
Summary by CodeRabbit
新功能
onOverLimit
回调函数,用于处理超过文件上传限制的情况,提供用户反馈。文档更新
onOverLimit
的使用和功能说明。