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: cascader token #44261

Merged
merged 2 commits into from Aug 17, 2023
Merged

feat: cascader token #44261

merged 2 commits into from Aug 17, 2023

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

📝 Changelog

Language Changelog
🇺🇸 English Migrate Cascader less variables to Component Token
🇨🇳 Chinese 迁移 Cascader 组件 less 变量到组件 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 863a573

This pull request adds new component tokens for the Cascader component, to enable more style customization and align with the design system. It also updates the documentation to reflect the new tokens and the deprecated less variables.

🔍 Walkthrough

🤖 Generated by Copilot at 863a573

  • Import CSSProperties type from react to use for component tokens (link)
  • Add four new component tokens to ComponentToken interface: optionSelectedBg, optionSelectedFontWeight, optionPadding, and menuPadding (link)
  • Use optionPadding token to set the padding of the options, and remove the calculation of itemPaddingVertical (link, link)
  • Use menuPadding token to set the padding of the menu items, and replace paddingXXS token (link)
  • Use optionSelectedFontWeight and optionSelectedBg tokens to set the font weight and background color of the selected options, and replace fontWeightStrong and controlItemBgActive tokens (link)
  • Modify the default export of genComponentStyleHook function to pass a function that returns the default values of the new component tokens (link)
  • Document the mapping and deprecation of less variables and component tokens for Cascader component in docs/react/migrate-less-variables.en-US.md and docs/react/migrate-less-variables.zh-CN.md files (link, 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

@MadCcc MadCcc mentioned this pull request Aug 17, 2023
51 tasks
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 388.99 KB (+49 B 🔺)
./dist/antd-with-locales.min.js 447.92 KB (+35 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, 6:41 AM

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (27e54c9) 100.00% compared to head (863a573) 100.00%.

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

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

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