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 Affix updatePosition logic. #15150

Merged
merged 4 commits into from Mar 7, 2019

Conversation

Projects
None yet
4 participants
@zombieJ
Copy link
Member

commented Mar 3, 2019

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch.
Pull request will be merged after one of collaborators approve.
Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

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

What's the background?

fix #15112

What's the effect? (Optional if not new feature)

Since use React life cycle for measuring, it will delay one Frame since React Fiber.

Changelog description (Optional if not new feature)

  1. Fix Affix updatePosition logic.
  2. 修复 Affix 中更新坐标偶尔错误的问题。

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

zombieJ added some commits Mar 3, 2019

@zombieJ zombieJ requested review from afc163 and ztplz Mar 3, 2019

@zombieJ

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2019

重构了逻辑,帮忙验证一下 @afc163 @ztplz

@codecov

This comment has been minimized.

Copy link

commented Mar 3, 2019

Codecov Report

Merging #15150 into master will decrease coverage by 0.28%.
The diff coverage is 86.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15150      +/-   ##
==========================================
- Coverage   93.11%   92.83%   -0.29%     
==========================================
  Files         237      238       +1     
  Lines        6261     6239      -22     
  Branches     1870     1862       -8     
==========================================
- Hits         5830     5792      -38     
- Misses        430      446      +16     
  Partials        1        1
Impacted Files Coverage Δ
components/affix/utils.ts 79.31% <79.31%> (ø)
components/affix/index.tsx 88.73% <90.32%> (+2.66%) ⬆️
components/grid/row.tsx 65.3% <0%> (-26.54%) ⬇️
components/input/TextArea.tsx 79.1% <0%> (-8.96%) ⬇️

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 e392605...fd0bea7. Read the comment docs.

@netlify

This comment has been minimized.

Copy link

commented Mar 3, 2019

Deploy preview for ant-design ready!

Built with commit fd0bea7

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

@hfuuss

This comment has been minimized.

Copy link

commented Mar 4, 2019

thanks

@zombieJ zombieJ referenced this pull request Mar 7, 2019

Merged

refactor: migrate lifecycle method #15254

1 of 9 tasks complete

@afc163 afc163 merged commit 93820ba into master Mar 7, 2019

25 of 31 checks passed

CodeFactor 1 issue found.
Details
codecov/patch 86.81% of diff hit (target 93.11%)
Details
codecov/project 92.83% (-0.29%) compared to e392605
Details
codebeat 0 issues resolved and 4 introduced
Details
Header rules No header rules processed
Details
Pages changed 14 new files uploaded
Details
AccessLint Review complete
Auto Assign Auto Assign
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
License Compliance All checks passed.
Details
Mixed content No mixed content detected
Details
Redirect rules 18 redirect rules processed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
deploy/netlify Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

@delete-merged-branch delete-merged-branch bot deleted the affox branch Mar 7, 2019

@ystarlongzi

This comment has been minimized.

Copy link
Contributor

commented on components/affix/utils.ts in 2eb4ecf May 30, 2019

In some case, such as scroll or resize event, it doesn't make sense to use RAF to implement throttle. See the demo

This comment has been minimized.

Copy link
Member Author

replied May 31, 2019

Could you help to create a issue to describe what behavior not correct by RAF with scroll or resize?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.