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: responsiveObserve init miss sizing #20400

Merged
merged 2 commits into from
Dec 23, 2019
Merged

fix: responsiveObserve init miss sizing #20400

merged 2 commits into from
Dec 23, 2019

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Dec 23, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

ref #20356

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix responsive related component (like Grid) missing sizing when init.
🇨🇳 Chinese

☑️ Self Check before Merge

  • 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

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

Could you please add tests to make sure this change works as expected?

@netlify
Copy link

netlify bot commented Dec 23, 2019

Deploy preview for ant-design ready!

Built with commit 2ee7ebf

https://deploy-preview-20400--ant-design.netlify.com

@zombieJ
Copy link
Member Author

zombieJ commented Dec 23, 2019

Hmmm...... CI failed...

@@ -77,6 +77,8 @@ const responsiveObserve = {
mql,
listener,
};

listener(mql);
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.

嗯,初始化的时候就有一个默认值。之后 add 就是新的。 test case 里要调整一下。

Copy link
Member

Choose a reason for hiding this comment

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

给力,测试代码也清晰多了。

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 23, 2019

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 2ee7ebf:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Dec 23, 2019

Codecov Report

Merging #20400 into 4.0-prepare will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           4.0-prepare   #20400      +/-   ##
===============================================
+ Coverage        97.57%   97.57%   +<.01%     
===============================================
  Files              295      295              
  Lines             6754     6755       +1     
  Branches          1861     1822      -39     
===============================================
+ Hits              6590     6591       +1     
  Misses             164      164
Impacted Files Coverage Δ
components/_util/responsiveObserve.ts 92.3% <100%> (+0.2%) ⬆️

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 8501b70...2ee7ebf. Read the comment docs.

@zombieJ zombieJ merged commit 4047e26 into 4.0-prepare Dec 23, 2019
@zombieJ zombieJ deleted the patch-responsive branch December 23, 2019 15:24
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.

2 participants