-
-
Notifications
You must be signed in to change notification settings - Fork 48.9k
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: picker full token #35615
refactor: picker full token #35615
Conversation
Size Change: +294 B (0%) Total Size: 888 kB
ℹ️ View Unchanged
|
Codecov Report
@@ Coverage Diff @@
## next #35615 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 465 465
Lines 8470 8470
Branches 2401 2401
=========================================
Hits 8470 8470
Continue to review full report at Codecov.
|
components/_util/theme/util/alias.ts
Outdated
@@ -92,6 +92,7 @@ export default function formatToken(derivativeToken: RawMergedToken): AliasToken | |||
colorSplit: 'rgba(0, 0, 0, 0.06)', | |||
controlItemBgActive: primaryColors[0], | |||
fontWeightStrong: 600, | |||
fontWeight: 400, |
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.
components/calendar/style/index.tsx
Outdated
yearSelectWidth: number; | ||
monthSelectWidth: number; | ||
miniContentHeight: number; | ||
thHeight: number; |
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.
不够语义化,这个和 dom 强耦合了
components/calendar/style/index.tsx
Outdated
calendarFullPanelBg: string; | ||
calendarItemActiveBg: string; | ||
export interface ComponentToken { | ||
yearSelectWidth: number; |
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.
这应该是 yearPanelWidth,下同
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.
这个还真是 select 的宽度。。
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.
2333,好吧~
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.
controlXXXWidth
export interface ComponentToken { | ||
yearSelectWidth: number; | ||
monthSelectWidth: number; | ||
miniContentHeight: number; |
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.
直接 panelHeight
components/calendar/style/index.tsx
Outdated
monthSelectWidth: number; | ||
miniContentHeight: number; | ||
thHeight: number; | ||
dateValueHeight: number; |
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.
做成 PickerToken 然后用 controlHeightSM
components/calendar/style/index.tsx
Outdated
calendarItemActiveBg: token.controlItemBgActive, | ||
dateValueHeight: token.controlHeightSM, | ||
weekHeight: token.controlHeightSM * 0.75, | ||
dateContentHeight: (token.fontSizeSM * token.lineHeights[0] + token.marginXS) * 3 + 2, |
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.
这个 lineHeight 可以抽一个 lineHeightSM 和 fontSizeSM 对应了。我们应该不能直接访问 lineHeights
才对
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.
+2 这个改成 border * 2
borderBlockEnd: 0, | ||
borderInlineStart: 1.5, // FIXME: v4 magic | ||
borderInlineEnd: 0, | ||
borderBlockStartWidth: 1.5, // FIXME: v4 magic |
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.
1.5 太多了,抽到 PickerToken 里
color: token.colorText, | ||
lineHeight: '30px', // FIXME: v4 magic string | ||
lineHeight: `${token.pickerPanelCellHeight + token.pickerCellPaddingVertical * 2}px`, |
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.
话说 th 是不是直接可以 vertical align 了?
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge