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: less to component token for Typography #42044

Closed
wants to merge 16 commits into from

Conversation

jrr997
Copy link
Contributor

@jrr997 jrr997 commented Apr 27, 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

ref #41884

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English less to component token for Typography
🇨🇳 Chinese 排版组件less变量迁移

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

This pull request updates the documentation for the Modal component to show how to migrate from less variables to component tokens for typography. It covers both the English and Chinese versions of docs/react/migrate-less-variables.md.

🔍 Walkthrough

🤖 Generated by Copilot at 4c574de

  • Add tables of less variables and component tokens for typography of Modal component in English and Chinese documentation (link, link)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 27, 2023

@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (4efa0b6) 100.00% compared to head (46d99d7) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #42044   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          640       640           
  Lines        10830     10831    +1     
  Branches      2943      2943           
=========================================
+ Hits         10830     10831    +1     
Impacted Files Coverage Δ
components/typography/style/index.ts 100.00% <100.00%> (ø)
components/typography/style/mixins.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yoyo837 yoyo837 mentioned this pull request Apr 27, 2023
51 tasks
Comment on lines 46 to 47
| `@typography-title-margin-top` | `sizeMarginHeadingVerticalStart` | - |
| `@typography-title-margin-bottom` | `sizeMarginHeadingVerticalEnd` | - |
Copy link
Member

Choose a reason for hiding this comment

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

这个 token 加到 Component Token 里,然后用后面的 token 初始化即可。margin 这类 token 很容易对其他地方的样式产生影响,所以不推荐直接用 global token

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sizeMarginHeadingVerticalStartsizeMarginHeadingVerticalEnd 是写在 Typography 组件的 component token 里面的,不是 global token。搜了一下全局只有 Typography 有这个 token。大佬确认一下。

Copy link
Member

Choose a reason for hiding this comment

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

那应该改名叫 titleMarginToptitleMarginBottom

<!-- prettier-ignore -->
| less 变量 | Component Token | 备注 |
| --- | --- | --- |
| `@typography-title-font-weight` | - | 由于样式变化已废弃 |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| `@typography-title-font-weight` | - | 由于样式变化已废弃 |
| `@typography-title-font-weight` | `fontWeightStrong` | - |

@jrr997 jrr997 changed the title feat: less to component token for Typography [WIP] feat: less to component token for Typography Apr 28, 2023
@jrr997 jrr997 changed the title [WIP] feat: less to component token for Typography feat: less to component token for Typography May 6, 2023
li-jia-nan and others added 12 commits May 17, 2023 09:57
)

* feat: close panel when click clear button

* feat: optimize code

* feat: optimize code

* feat: optimize code
* chore: update miss ChangeLog

* Update CHANGELOG.en-US.md

Co-authored-by: MadCcc <1075746765@qq.com>

* Update CHANGELOG.zh-CN.md

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

* Update CHANGELOG.en-US.md

* Update CHANGELOG.en-US.md

Co-authored-by: afc163 <afc163@gmail.com>

* Update CHANGELOG.en-US.md

Co-authored-by: afc163 <afc163@gmail.com>

* Update CHANGELOG.en-US.md

* Update CHANGELOG.zh-CN.md

---------

Co-authored-by: MadCcc <1075746765@qq.com>
Co-authored-by: afc163 <afc163@gmail.com>
* demo: update popconfirm demo

* demo: update snapshot
* fix: Popconfirm margin issue when icon is null

* test: update snapshot

* demo: update snapshot

* chore: improve code

* demo: update snapshot

* refactor: remove used css

* demo: update snapshot
@github-actions
Copy link
Contributor

Hi @jrr997. Thanks for your contribution. The path .github/ or scripts/ and CHANGELOG is only maintained by team members. This current PR will be closed and team members will help on this.

@MadCcc
Copy link
Member

MadCcc commented May 17, 2023

应该 merge feature 的

@MadCcc
Copy link
Member

MadCcc commented May 17, 2023

这个 PR 好像 reopen 不了了,重开一个吧

@jrr997
Copy link
Contributor Author

jrr997 commented May 17, 2023

手欠点了同步master,我重开一个。

@yoyo837
Copy link
Contributor

yoyo837 commented May 17, 2023

手欠点了同步master,我重开一个。

这可能就是当初禁用那个功能的原因了 @afc163

@MadCcc
Copy link
Member

MadCcc commented May 17, 2023

上游分支是 feature,应该不会同步 master 才对吧

@jrr997
Copy link
Contributor Author

jrr997 commented May 17, 2023

重开了 #42442

@jrr997
Copy link
Contributor Author

jrr997 commented May 17, 2023

上游分支是 feature,应该不会同步 master 才对吧

我在自己fork的antd仓库点了 Sync Fork。

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

9 participants