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

fix: Grid flexGap lazy check #29202

Merged
merged 4 commits into from Feb 3, 2021
Merged

fix: Grid flexGap lazy check #29202

merged 4 commits into from Feb 3, 2021

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Feb 3, 2021

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

🔗 Related issue link

fix #29200
fix #29201

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix antd crash when load before page ready.
🇨🇳 Chinese 修复 antd 在页面加载之前载入导致的页面崩溃问题。

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

@codecov
Copy link

codecov bot commented Feb 3, 2021

Codecov Report

Merging #29202 (30e8e0a) into master (b69c335) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master    #29202   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          394       394           
  Lines         7482      7483    +1     
  Branches      2140      2141    +1     
=========================================
+ Hits          7482      7483    +1     
Impacted Files Coverage Δ
components/_util/styleChecker.tsx 100.00% <100.00%> (ø)
components/grid/col.tsx 100.00% <100.00%> (ø)
components/grid/row.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 b69c335...30e8e0a. Read the comment docs.

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Feb 3, 2021

if (!canUseDocElement()) {
return false;
}

if (flexGapSupported !== undefined) {
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.

放下面是为了减少 canUseDocElement 分支还得写一个赋值,节省一行代码。

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 3, 2021

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.

Latest deployment of this branch, based on commit 30e8e0a:

Sandbox Source
antd reproduction template Configuration

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2021

Size Change: -40 B (0%)

Total Size: 836 kB

Filename Size Change
./dist/antd-with-locales.min.js 336 kB -15 B (0%)
./dist/antd.min.js 296 kB -25 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/antd.compact.min.css 67.3 kB 0 B
./dist/antd.dark.min.css 68.6 kB 0 B
./dist/antd.min.css 67.3 kB 0 B

compressed-size-action

@afc163
Copy link
Member

afc163 commented Feb 3, 2021

修复 antd 在页面加载之前载入使用 Grid 导致的页面崩溃问题。

不必使用,umd 包引入即报错。

@zombieJ
Copy link
Member Author

zombieJ commented Feb 3, 2021

rename 一下测试挂了,一脸懵逼……

@zombieJ zombieJ merged commit 9914ceb into master Feb 3, 2021
@zombieJ zombieJ deleted the fix-grid branch February 3, 2021 07:39
@zombieJ zombieJ mentioned this pull request Feb 3, 2021
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants