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
Merged

Fix Affix updatePosition logic. #15150

merged 4 commits into from Mar 7, 2019

Conversation

@zombieJ
Copy link
Member

@zombieJ zombieJ 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 zombieJ requested review from afc163 and ztplz Mar 3, 2019
@zombieJ
Copy link
Member Author

@zombieJ zombieJ commented Mar 3, 2019

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

@codecov
Copy link

@codecov codecov bot 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
Copy link

@netlify netlify bot commented Mar 3, 2019

Deploy preview for ant-design ready!

Built with commit fd0bea7

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

@hfuuss
Copy link

@hfuuss hfuuss commented Mar 4, 2019

thanks

@zombieJ zombieJ mentioned this pull request Mar 7, 2019
9 tasks
@afc163 afc163 merged commit 93820ba into master Mar 7, 2019
27 of 31 checks passed
27 of 31 checks passed
CodeFactor 1 issue found.
Details
@codecov[bot]
codecov/patch 86.81% of diff hit (target 93.11%)
Details
@codecov[bot]
codecov/project 92.83% (-0.29%) compared to e392605
Details
codebeat 0 issues resolved and 4 introduced
Details
@netlify[bot]
Header rules No header rules processed
Details
@netlify[bot]
Pages changed 14 new files uploaded
Details
@accesslint[bot]
AccessLint Review complete
@github-actions[bot]
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
@netlify[bot]
Mixed content No mixed content detected
Details
@netlify[bot]
Redirect rules 18 redirect rules processed
Details
@wip[bot]
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
@netlify[bot]
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
Copy link
Contributor

ystarlongzi commented on 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

zombieJ
Copy link
Member

zombieJ commented on 2eb4ecf 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants