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: color-picker panel dom logic #46327
refactor: color-picker panel dom logic #46327
Conversation
Run & review this pull request in StackBlitz Codeflow. |
有 BreakChange 风险 🤔 |
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.
LGTM
# Conflicts: # components/color-picker/__tests__/__snapshots__/index.test.tsx.snap # components/color-picker/demo/panel-render.tsx # components/form/__tests__/__snapshots__/demo-extend.test.ts.snap # components/table/InternalTable.tsx
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 097d170:
|
Visual Regression Report for PR #46327
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature #46327 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 709 709
Lines 12148 12148
Branches 3225 3225
=========================================
Hits 12148 12148 ☔ View full report in Codecov by Sentry. |
compact 主题下有 diff |
This comment was marked as outdated.
This comment was marked as outdated.
# Conflicts: # components/color-picker/__tests__/__snapshots__/demo-extend.test.ts.snap
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
ref: #45527 (comment)
💡 Background and solution
将原来
.ant-color-picker-inner-content
类名 拆为 2 个,分别.ant-color-picker-inner
和.ant-color-picker-inner-content
.ant-color-picker-inner: 表示这个面板容器,与面板有关的样式写这个类名下。
.ant-color-picker-inner-content: 默认为 antd 颜色选择器面板容器。该类名只存在覆写 antd 内部样式。
如果开发者通过
panelRender
完全自定义内容时,默认插入到.ant-color-picker-inner
容器下,而不是.ant-color-picker-inner-content
.(这样就可以避免样式冲突。📝 Changelog
ColorPicker
popup panel dom tree logicColorPicker
弹出面板 dom tree 逻辑☑️ Self-Check before Merge