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

feat: Button support contentFontSize token #44257

Merged
merged 2 commits into from Aug 17, 2023
Merged

Conversation

MadCcc
Copy link
Member

@MadCcc MadCcc commented Aug 17, 2023

[中文版模板 / 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

解决 #44217

原 PR 直接覆盖了 Button 内 fontSizeSM 的值,会影响 Button 内全局 token 的使用。
添加一套 contentFontSize 的组件 Token 用于定制 Button 各个尺寸的文字大小

📝 Changelog

Language Changelog
🇺🇸 English Button support contentFontSize contentFontSizeSM contentFontSizeLG component token for customizing fontSize of each size.
🇨🇳 Chinese Button 组件新增 contentFontSize contentFontSizeSM contentFontSizeLG 三个组件 token ,用于定制各个尺寸下的字体大小。

☑️ 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

🚀 Summary

🤖 Generated by Copilot at adc9f4f

This pull request improves the button style code by using new font size properties and fixing a bug. It also cleans up the button token interface by removing an unused property.

🔍 Walkthrough

🤖 Generated by Copilot at adc9f4f

  • Add new properties to ComponentToken interface and remove unused property from ButtonToken interface (link)
  • Use contentFontSize property from token for base button style and add fontSize property to small button style (link, link)
  • Fix large button font size bug by using contentFontSizeLG property from token (link)
  • Add default values for new properties to defaultButtonToken object and align fontSizeSM with fontSize (link)

@stackblitz
Copy link

stackblitz bot commented Aug 17, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 388.95 KB (+32 B 🔺)
./dist/antd-with-locales.min.js 447.88 KB (+22 B 🔺)

@argos-ci
Copy link

argos-ci bot commented Aug 17, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 🧿 Changes detected (Review) 11 changes Aug 17, 2023, 3:28 AM

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (947ea38) 100.00% compared to head (51d4da3) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #44257   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          663       663           
  Lines        11270     11271    +1     
  Branches      3047      3047           
=========================================
+ Hits         11270     11271    +1     
Files Changed Coverage Δ
components/button/style/index.ts 100.00% <100.00%> (ø)

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

@MadCcc MadCcc merged commit 27e54c9 into feature Aug 17, 2023
86 of 87 checks passed
@MadCcc MadCcc deleted the feat/btn-font-size-token branch August 17, 2023 05:51
@Simoon-F
Copy link

是计划在 5.8.5 发布吗?

@yoyo837
Copy link
Contributor

yoyo837 commented Aug 24, 2023

是计划在 5.8.5 发布吗?

下个minor, 5.9.0

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

3 participants