-
-
Notifications
You must be signed in to change notification settings - Fork 50.6k
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
refactor(progress): progress size #40903
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #40903 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 608 608
Lines 10340 10389 +49
Branches 2803 2829 +26
=========================================
+ Hits 10340 10389 +49
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Co-authored-by: lijianan <[email protected]>
Co-authored-by: lijianan <[email protected]>
Co-authored-by: MadCcc <[email protected]>
Co-authored-by: MadCcc <[email protected]>
let { strokeWidth } = props; | ||
if (strokeWidth === undefined) { | ||
strokeWidth = Math.max(getMinPercent(width), 6); | ||
} |
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.
这里还是放到默认值里面去吧
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.
计算默认的strokeWidth
依赖于getSize
返回的最终宽度,所以不好放在默认值
components/progress/Line.tsx
Outdated
return ( | ||
<> | ||
<div className={`${prefixCls}-outer`}> | ||
<div className={`${prefixCls}-outer`} style={outterStyle}> |
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.
这里有必要添加 style 吗,原本没有 style 是不是也 work
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.
这个是为了设置进度条的宽度用的,目前我们的进度条只能铺盘父级容器,但既然只吃了[number,number]
,感觉也可以支持一下设置宽度
理论上重构应该不影响 snapshot? |
主要是在条形进度条外层增加了style用于设置宽高 |
@@ -2908,7 +2908,7 @@ Array [ | |||
class="ant-steps-progress-icon" | |||
> | |||
<div | |||
class="ant-progress ant-progress-circle ant-progress-status-normal ant-progress-show-info ant-progress-default" |
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.
这个 class 去掉了是预期的么
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.
* feat: progress size * feat: update snapshots * feat: update demo * feat: update demo * docs: fix lint * feat: update demo * feat: update demo * docs: update doc * feat: update snapshots * docs: update doc * docs: update doc * docs: update doc * Update components/progress/index.en-US.md Co-authored-by: lijianan <[email protected]> * Update components/progress/index.zh-CN.md Co-authored-by: lijianan <[email protected]> * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * Update components/progress/utils.ts Co-authored-by: MadCcc <[email protected]> * feat: optimize code * feat: optimize code * feat: optimize code * Update components/progress/Circle.tsx Co-authored-by: MadCcc <[email protected]> * feat: optimize code * feat: optimize code * docs: update doc --------- Co-authored-by: 二货机器人 <[email protected]> Co-authored-by: lijianan <[email protected]> Co-authored-by: MadCcc <[email protected]>
* feat: progress size * feat: update snapshots * feat: update demo * feat: update demo * docs: fix lint * feat: update demo * feat: update demo * docs: update doc * feat: update snapshots * docs: update doc * docs: update doc * docs: update doc * Update components/progress/index.en-US.md Co-authored-by: lijianan <[email protected]> * Update components/progress/index.zh-CN.md Co-authored-by: lijianan <[email protected]> * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * Update components/progress/utils.ts Co-authored-by: MadCcc <[email protected]> * feat: optimize code * feat: optimize code * feat: optimize code * Update components/progress/Circle.tsx Co-authored-by: MadCcc <[email protected]> * feat: optimize code * feat: optimize code * docs: update doc --------- Co-authored-by: 二货机器人 <[email protected]> Co-authored-by: lijianan <[email protected]> Co-authored-by: MadCcc <[email protected]>
* feat: progress size * feat: update snapshots * feat: update demo * feat: update demo * docs: fix lint * feat: update demo * feat: update demo * docs: update doc * feat: update snapshots * docs: update doc * docs: update doc * docs: update doc * Update components/progress/index.en-US.md Co-authored-by: lijianan <[email protected]> * Update components/progress/index.zh-CN.md Co-authored-by: lijianan <[email protected]> * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * Update components/progress/utils.ts Co-authored-by: MadCcc <[email protected]> * feat: optimize code * feat: optimize code * feat: optimize code * Update components/progress/Circle.tsx Co-authored-by: MadCcc <[email protected]> * feat: optimize code * feat: optimize code * docs: update doc --------- Co-authored-by: 二货机器人 <[email protected]> Co-authored-by: lijianan <[email protected]> Co-authored-by: MadCcc <[email protected]>
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge