Skip to content

refactor: Use pure react new life cycle method #144

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

Merged
merged 46 commits into from
Oct 10, 2019
Merged

refactor: Use pure react new life cycle method #144

merged 46 commits into from
Oct 10, 2019

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Oct 9, 2019

Refactor the steps in each frame instead of mix up:

  • measure - check for the current stretch size
  • align - let component align the position
  • afterAlign - choice next step is trigger motion or finished
  • beforeMotion - should reset motion to invisible so that CSSMotion can do normal motion
  • motion - play the motion
  • stable - everything is done

Each visible reset will start from the top.

TODO

  • Test Case

@zombieJ zombieJ changed the title refactor: Use pure react new life cycle method [WIP] refactor: Use pure react new life cycle method Oct 9, 2019
@vercel
Copy link

vercel bot commented Oct 9, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://trigger-git-animation.react-component.now.sh

@zombieJ zombieJ requested a review from afc163 October 9, 2019 10:15
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 9, 2019

This pull request introduces 2 alerts when merging 5929934 into cc3104a - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

@codecov
Copy link

codecov bot commented Oct 10, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@cc3104a). Click here to learn what that means.
The diff coverage is 83.62%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #144   +/-   ##
=========================================
  Coverage          ?   83.62%           
=========================================
  Files             ?        7           
  Lines             ?      452           
  Branches          ?      120           
=========================================
  Hits              ?      378           
  Misses            ?       74           
  Partials          ?        0
Impacted Files Coverage Δ
src/utils/legacyUtil.ts 100% <100%> (ø)
src/context.ts 100% <100%> (ø)
src/mock.tsx 100% <100%> (ø)
src/utils/alignUtil.ts 100% <100%> (ø)
src/index.tsx 79.53% <79.53%> (ø)
src/PopupInner.tsx 88.88% <88.88%> (ø)
src/Popup.tsx 89.74% <89.74%> (ø)

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 cc3104a...9cddc01. Read the comment docs.

@zombieJ zombieJ changed the title [WIP] refactor: Use pure react new life cycle method refactor: Use pure react new life cycle method Oct 10, 2019
@zombieJ
Copy link
Member Author

zombieJ commented Oct 10, 2019

加了一些改动地方的测试

@zombieJ zombieJ merged commit 5615e69 into master Oct 10, 2019
@delete-merged-branch delete-merged-branch bot deleted the animation branch October 10, 2019 10:46
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.

1 participant