Conversation
|
|
👁 Visual Regression Report for PR #55554 Passed ✅
🎊 Congrats! No visual-regression diff found.
|
Summary of ChangesHello @thinkasany, 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 a potential issue in 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
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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.
Code Review
This pull request aims to fix missing dependencies in a useMemo hook within the Progress component. While the added dependencies are mostly correct, a key dependency, props.success, was overlooked. I've provided a review comment to address this omission and suggested some cleanups to the dependency array for better maintainability. Applying this change will ensure the component behaves correctly and avoids rendering stale UI.
| }, [ | ||
| showInfo, | ||
| percent, | ||
| percentNumber, | ||
| progressStatus, | ||
| type, | ||
| prefixCls, | ||
| format, | ||
| isLineType, | ||
| strokeColorIsBright, | ||
| infoPosition, | ||
| infoAlign, | ||
| isPureLineType, | ||
| mergedClassNames.indicator, | ||
| mergedStyles.indicator, | ||
| ]); |
There was a problem hiding this comment.
The dependency array for useMemo is missing props.success. The memoized value progressInfo calls getSuccessPercent(props), which directly depends on props.success. This can lead to stale UI when props.success changes.
Additionally, for cleanup, you could remove percentNumber and type from the dependency array as they are redundant:
percentNumberis not directly used inside thisuseMemo. Its effects are captured throughprogressStatus, which is already a dependency.typeis redundant becauseisLineTypeis already a dependency, andisLineTypeis derived fromtype.
}, [
showInfo,
percent,
progressStatus,
prefixCls,
format,
props.success,
isLineType,
strokeColorIsBright,
infoPosition,
infoAlign,
isPureLineType,
mergedClassNames.indicator,
mergedStyles.indicator,
]);
size-limit report 📦
|
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 252 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
Deploying ant-design with
|
| Latest commit: |
38022e7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b28b7a79.ant-design.pages.dev |
| Branch Preview URL: | https://progress-deps-memo.ant-design.pages.dev |
Deploying ant-design-next with
|
| Latest commit: |
38022e7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2890c402.ant-design-next.pages.dev |
| Branch Preview URL: | https://progress-deps-memo.ant-design-next.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #55554 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 796 796
Lines 14690 14690
Branches 3899 3899
=========================================
Hits 14690 14690 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: 刘欢 <lh01217311@antgroup.com> Co-authored-by: lijianan <574980606@qq.com> Co-authored-by: 遇见同学 <1875694521@qq.com> Co-authored-by: thinkasany <480968828@qq.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: heming <984507092@qq.com> Co-authored-by: 海绵 <hai.mian@yingdao.com> Co-authored-by: 二货机器人 <smith3816@gmail.com> Co-authored-by: binghui.dbh <binghui.dbh@antgroup.com> Co-authored-by: thinkasany <117748716+thinkasany@users.noreply.github.com> Co-authored-by: afc163 <507615+afc163@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ice <1597834867@qq.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: 叶文俊 <yewenjun@mistong.com> Co-authored-by: 二货爱吃白萝卜 <smith3816@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com> Co-authored-by: zjr222 <67370334+zjr222@users.noreply.github.com> Co-authored-by: sheng zhang <79007994+Arktomson@users.noreply.github.com> Co-authored-by: MadCcc <madccc@foxmail.com> Co-authored-by: keda <53565274+Linkodt@users.noreply.github.com> Co-authored-by: divyeshagrawal <138372682+divyeshagrawal@users.noreply.github.com> Co-authored-by: xkhanhan <61129468+xkhanhan@users.noreply.github.com> Co-authored-by: tanjiahao24 <90695367+tanjiahao24@users.noreply.github.com> Co-authored-by: Susuper <susuperli@163.com> Co-authored-by: ccc1018 <82812268+ccc1018@users.noreply.github.com> Co-authored-by: GinWU <ginwu05@gmail.com> Co-authored-by: lts <lts.lyc@qq.com> Co-authored-by: nmsn <136696700@qq.com> Co-authored-by: elrrrrrrr <elrrrrrrr@gmail.com> Co-authored-by: 叶枫 <7971419+crazyair@users.noreply.github.com> Co-authored-by: Wanpan <wanpan96@163.com> Co-authored-by: 沐白 <13588781920@163.com> Co-authored-by: heming <74885943+984507092@users.noreply.github.com> Co-authored-by: afc163 <afc163@gmail.com> Co-authored-by: Guo Yunhe <i@guoyunhe.me> fix popconfirm style (#55173) fix typo of pannel to panel (#55178) fix: leavedClassName classname when hidden (#55309) fix(timeline): add missing orientation memo deps (#55449) fix(collapse): add missing deps (#55452) fix(menu): add missing contextValue memo deps (#55459) fix: add splitter missing memo deps (#55486) resolve console.error (#55488) fix script (#55496) fix: semantic of collapse (#55499) fix: add divider missing memo deps (#55514) fix: add progress missing memo deps (#55554) fix: add tag useColor hooks missing memo deps (#55555) fix: add PromptDrawer missing memo deps (#55556) fix: add missing childrenColumnName dependency (#55559) fix: Optimize the definition of the duration type (#55580) fix(textarea): resize is invalid in styles.textarea (#55579) fix Dynamic demo key calculte error (#55624) fix: static css extract should order of Button (#55619) fix missing addon (#55784) fix: add missing dependency (#55782) fix: update innerLoading to loading (#55789)


🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log