-
-
Notifications
You must be signed in to change notification settings - Fork 161
refactor: all use rail #305
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough本次变更统一将进度条相关属性中的“trail”重命名为“rail”,涉及属性名、描述、CSS 类名、变量名及相关文档。具体包括组件 Changes
Poem
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
🪧 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #305 +/- ##
=======================================
Coverage 99.38% 99.38%
=======================================
Files 7 7
Lines 162 162
Branches 51 50 -1
=======================================
Hits 161 161
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
README.md
Outdated
@@ -83,16 +83,16 @@ export default () => ( | |||
<td>Stroke color.</td> | |||
</tr> | |||
<tr> | |||
<td>trailWidth</td> | |||
<td>rrailWidth</td> |
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.
<td>rrailWidth</td> | |
<td>railWidth</td> |
README.md
Outdated
<td>Number</td> | ||
<td>1</td> | ||
<td>Width of the trail stroke. Unit is percentage of SVG canvas size. Trail is always centered relative to actual progress path. If trailWidth is not defined, it is the same as strokeWidth.</td> | ||
<td>Width of the rrail stroke. Unit is percentage of SVG canvas size. Rail is always centered relative to actual progress path. If railWidth is not defined, it is the same as strokeWidth.</td> |
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.
<td>Width of the rrail stroke. Unit is percentage of SVG canvas size. Rail is always centered relative to actual progress path. If railWidth is not defined, it is the same as strokeWidth.</td> | |
<td>Width of the rail stroke. Unit is percentage of SVG canvas size. Rail is always centered relative to actual progress path. If railWidth is not defined, it is the same as strokeWidth.</td> |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
tests/__snapshots__/conic.spec.tsx.snap
is excluded by!**/*.snap
tests/__snapshots__/index.spec.js.snap
is excluded by!**/*.snap
📒 Files selected for processing (8)
README.md
(1 hunks)docs/examples/gap.tsx
(1 hunks)src/Circle/index.tsx
(4 hunks)src/Line.tsx
(2 hunks)src/common.ts
(1 hunks)src/interface.ts
(1 hunks)tests/index.spec.js
(3 hunks)tests/semantic.spec.tsx
(1 hunks)
🔇 Additional comments (16)
docs/examples/gap.tsx (1)
82-82
: 属性名称更新符合项目重构目标将
trailWidth
修改为railWidth
与当前 PR 的重构目标一致,统一了 Circle 组件中与进度条相关属性的命名约定。tests/semantic.spec.tsx (1)
29-29
: CSS 选择器更新正确将测试中的 CSS 选择器从
.rc-progress-circle-trail
更新为.rc-progress-circle-rail
,与组件类名的重命名保持一致。tests/index.spec.js (3)
182-182
: 属性名称统一更新将
trailColor
更新为railColor
,符合当前重构中的命名规范统一。
202-202
: 属性名称统一更新将
trailColor
更新为railColor
,符合当前重构中的命名规范统一。
218-218
: 属性名称统一更新将
trailColor
更新为railColor
,符合当前重构中的命名规范统一。src/interface.ts (2)
6-6
: 接口属性名称更新将
ProgressProps
接口中的trailWidth
属性重命名为railWidth
,保持了命名的一致性。
12-12
: 接口属性名称更新将
ProgressProps
接口中的trailColor
属性重命名为railColor
,保持了命名的一致性。src/common.ts (1)
10-11
: 变量命名更新符合设计意图将
trailColor
和trailWidth
重命名为railColor
和railWidth
的修改统一了进度条背景部分的命名规范,使术语更加一致,有助于提高代码可读性。src/Line.tsx (3)
18-19
: props 解构中的命名更改将
trailColor
和trailWidth
重命名为railColor
和railWidth
,与整体重命名策略保持一致。
60-60
: CSS 类名一致性更新将类名从
${prefixCls}-line-trail
更改为${prefixCls}-line-rail
,确保了 CSS 类名与属性命名保持一致。
63-64
: 更新 SVG 属性使用新命名将 SVG 路径属性中的
stroke={trailColor}
和strokeWidth={trailWidth || strokeWidth}
更新为stroke={railColor}
和strokeWidth={railWidth || strokeWidth}
,确保了整个组件中命名的一致性。README.md (1)
92-95
: 属性名和描述更新将
trailColor
更新为railColor
并相应地更新了描述文本,保持了文档与代码的一致性。src/Circle/index.tsx (4)
23-26
: 组件 props 解构中的命名更改将
trailWidth
和trailColor
重命名为railWidth
和railColor
,与整体重命名策略保持一致。
71-71
: 更新函数参数使用新命名将
getCircleStyle
函数调用中的参数trailColor
更新为railColor
,确保了函数调用与函数定义的一致性。
132-132
: 更新条件表达式使用新命名在条件表达式中将
trailColor
更新为railColor
,保持代码一致性。
184-190
: 更新 SVG 圆形元素的类名和属性这段代码完成了三处更改:
- 将类名从
${prefixCls}-circle-trail
更新为${prefixCls}-circle-rail
- 将
stroke={trailColor}
更新为stroke={railColor}
- 将
strokeWidth={trailWidth || strokeWidth}
更新为strokeWidth={railWidth || strokeWidth}
所有更改都保持了命名的一致性。
Summary by CodeRabbit
文档
新特性
测试