Skip to content
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

fix(tree-select): use token in tree-select custom render Empty #48585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GeorgeHcc
Copy link
Contributor

@GeorgeHcc GeorgeHcc commented Apr 22, 2024

中文版模板 / Chinese template

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

TreeSelect在自定义empty时token失效,添加 color: token.colorTextDisabled,
image

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Copy link

stackblitz bot commented Apr 22, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Apr 22, 2024

Preview is ready

Copy link
Contributor

  • 🚨 Please fill changelog in the PR

    • Write with a developer-oriented perspective and narrative method, without describing the details of the repair
    • Describing the problem and the impact on the developer
    • describing the user-first site problem, not your solution
    • Refer: https://ant.design/changelog#501
  • 🚨 请填写 PR 中的 changelog

    • 请用面向开发者的角度叙述方式撰写,不描述修复细节
    • 描述问题和对开发者的影响
    • 描述用户第一现场的问题,而非你的解决方式
    • 参考:https://ant.design/changelog-cn#501

Copy link
Contributor

github-actions bot commented Apr 22, 2024

👁 Visual Regression Report for PR #48585 Passed ✅

🎯 Target branch: master (09cb3f4)
📖 View Full Report ↗︎

🎊 Congrats! No visual-regression diff found.

Copy link

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.

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (09cb3f4) to head (d385ec9).

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #48585   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          745       745           
  Lines        12947     12947           
  Branches      3383      3383           
=========================================
  Hits         12947     12947           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@afc163
Copy link
Member

afc163 commented Apr 23, 2024

自定义 empty 的话,组件就更不应该预设字色了,你不知道用户希望展现什么样的内容。

@GeorgeHcc
Copy link
Contributor Author

GeorgeHcc commented Apr 23, 2024

自定义 empty 的话,组件就更不应该预设字色了,你不知道用户希望展现什么样的内容。

我理解这个不算自定义场景,应该算是设计语言。select、cascader等组件是有这个预设字体色的,应该保持统一

// select/style/dropdown.ts

'&-empty': {
            ...genItemStyle(token),
            color: token.colorTextDisabled,
          },

@afc163
Copy link
Member

afc163 commented Apr 24, 2024

Select 是加在 empty 的 className 上的,如果要对齐,也要按类似方案处理。直接加在 dropdown 上会影响非 empty 的场景。

图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants