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

refactor: Dropdown cssinjs support #35214

Merged
merged 23 commits into from
Apr 25, 2022
Merged

refactor: Dropdown cssinjs support #35214

merged 23 commits into from
Apr 25, 2022

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Apr 24, 2022

[中文版模板 / 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
  • Other (about what?)

🔗 Preview

https://preview-35214-ant-design.surge.sh/components/dropdown-cn/

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Refactor Dropdown with CSS-in-JS.
🇨🇳 Chinese 重构 Dropdown 为 CSS-in-JS 版本。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • 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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 24, 2022

@zombieJ zombieJ mentioned this pull request Apr 24, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 24, 2022

Size Change: -2.38 kB (0%)

Total Size: 895 kB

Filename Size Change
./dist/antd-with-locales.min.js 443 kB +1.94 kB (0%)
./dist/antd.compact.min.css 14.8 kB -1.6 kB (-10%) 👏
./dist/antd.dark.min.css 15.4 kB -1.58 kB (-9%)
./dist/antd.min.css 14.8 kB -1.58 kB (-10%) 👏
./dist/antd.min.js 391 kB +2.03 kB (+1%)
./dist/antd.variable.min.css 15.2 kB -1.59 kB (-9%)

compressed-size-action

@zombieJ
Copy link
Member Author

zombieJ commented Apr 24, 2022

enzyme 的 selector 看来有点问题,master 里替换一下 test case

@codecov
Copy link

codecov bot commented Apr 24, 2022

Codecov Report

Merging #35214 (2e6b766) into next (690608d) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              next    #35214   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          452       454    +2     
  Lines         8263      8275   +12     
  Branches      2319      2319           
=========================================
+ Hits          8263      8275   +12     
Impacted Files Coverage Δ
components/_util/theme/themes/default.ts 100.00% <ø> (ø)
components/_util/theme/util/alias.ts 100.00% <ø> (ø)
...mponents/_util/theme/util/genComponentStyleHook.ts 100.00% <ø> (ø)
components/button/style/group.tsx 100.00% <100.00%> (ø)
components/dropdown/dropdown-button.tsx 100.00% <100.00%> (ø)
components/dropdown/dropdown.tsx 100.00% <100.00%> (ø)
components/dropdown/style/button.tsx 100.00% <100.00%> (ø)
components/dropdown/style/status.tsx 100.00% <100.00%> (ø)
components/menu/index.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 690608d...2e6b766. Read the comment docs.

components/dropdown/style/index.tsx Outdated Show resolved Hide resolved

const dropdownToken = mergeToken<DropdownToken>(token, {
menuCls: `${componentCls}-menu`,
rootPrefixCls,
Copy link
Member

Choose a reason for hiding this comment

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

感觉可以优化掉

Copy link
Member Author

Choose a reason for hiding this comment

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

dropdown only 的临时变量

components/_util/theme/util/genComponentStyleHook.ts Outdated Show resolved Hide resolved
zombieJ and others added 2 commits April 25, 2022 10:08
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