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: Optimize CascaderProps #48420

Merged
merged 1 commit into from Apr 12, 2024
Merged

feat: Optimize CascaderProps #48420

merged 1 commit into from Apr 12, 2024

Conversation

crazyair
Copy link
Member

[中文版模板 / 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 optimize CascaderProps type
🇨🇳 Chinese 优化 CascaderProps 类型

☑️ 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 Apr 12, 2024

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

@crazyair crazyair changed the base branch from master to feature April 12, 2024 08:15
Copy link
Contributor

github-actions bot commented Apr 12, 2024

Visual Regression Build for PR #48420 Failed ❌

Potential causes:

  • upstream workflow status: failure upstream job link
  • download report artifact status: failure
  • report upload status: skipped

Copy link
Contributor

github-actions bot commented Apr 12, 2024

Preview is ready

Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 337.05 KB (+396 B 🔺)
./dist/antd-with-locales.min.js 383.84 KB (+343 B 🔺)

@crazyair crazyair changed the title feat: Optimize CascaderCrops feat: Optimize CascaderProps Apr 12, 2024
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@afc163
Copy link
Member

afc163 commented Apr 12, 2024

怎么会大这么多

@crazyair
Copy link
Member Author

怎么会大这么多

都是改的 ts,一行 js 代码也没改,最后的产物也没 ts

@yoyo837
Copy link
Contributor

yoyo837 commented Apr 12, 2024

怎么会大这么多

感觉需要同步一下

@crazyair
Copy link
Member Author

怎么会大这么多

感觉需要同步一下

feature 没有需要同步的

@zombieJ
Copy link
Member

zombieJ commented Apr 12, 2024

feature 没有需要同步的

那没道理。。。js 没变化不应有尺寸变化的

@crazyair
Copy link
Member Author

feature 没有需要同步的

那没道理。。。js 没变化不应有尺寸变化的

可能是 rc-cascader 开启了 strict,代码加上了 .? 导致编译的产物增加

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d34ab00) to head (b661d63).

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #48420   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          744       744           
  Lines        12887     12887           
  Branches      3381      3382    +1     
=========================================
  Hits         12887     12887           

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

@zombieJ
Copy link
Member

zombieJ commented Apr 12, 2024

可能是 rc-cascader 开启了 strict,代码加上了 .? 导致编译的产物增加

有可能,得回去看看。理论上以前没有 .? 其实都不应该加。

@crazyair
Copy link
Member Author

Visual Regression Build for PR #48420 Failed ❌

Potential causes:

  • upstream workflow status: failure upstream job link
  • download report artifact status: failure
  • report upload status: skipped

这个又挂了?

@crazyair
Copy link
Member Author

crazyair commented Apr 12, 2024

趁现在还没正式对外,CascaderProps<Option, 'value', true> 这个按照使用频率,想把 multiple 改前面,改成 CascaderProps<Option, true, 'value'>,这样大部分场景只需要设置 CascaderProps or CascaderProps<Option, true>

主要看 fieldNames 和 multiple 哪个使用频率高

@crazyair crazyair merged commit 1092660 into feature Apr 12, 2024
114 of 115 checks passed
@crazyair crazyair deleted the optimize-cascader-props branch April 12, 2024 09:30
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

5 participants