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

chore: move @internal tokens into component token #47912

Closed
wants to merge 1 commit into from

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Mar 16, 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

#47909 (comment)

💡 Background and solution

下面的 XxxxToken 就是用来放暂时不对外暴露的 token 的,没必要使用 @internal 在 ComponentToken 里。

📝 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 Mar 16, 2024

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

Copy link
Contributor

github-actions bot commented Mar 16, 2024

👁 Visual Regression Report for PR #47912 Passed ✅

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

🎊 Congrats! No visual-regression diff found.

Copy link
Contributor

github-actions bot commented Mar 16, 2024

Preview is ready

Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 334.67 KB
./dist/antd-with-locales.min.js 380.49 KB

@@ -72,19 +84,6 @@ export interface ComponentToken {
confirmBtnsMarginTop: string | number;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

图片

这段逻辑很奇怪,为了 wireframe 的逻辑在这里加了一些额外的 token 定义。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不如单独搞一个 wireframe 的算法。

@afc163 afc163 marked this pull request as draft March 16, 2024 13:38
@afc163 afc163 closed this Mar 16, 2024
@afc163 afc163 deleted the style/clean-internal-token branch March 16, 2024 14:03
@MadCcc
Copy link
Member

MadCcc commented Mar 17, 2024

boolean 没有办法给 css var 运算,只能全部放进 component token 里,用 js 逻辑算出结果

@afc163
Copy link
Member Author

afc163 commented Mar 18, 2024

@MadCcc 现在这个逻辑太脏了,还污染了 ComponentToken,后续代码很难维护。

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