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

added onComplete callback to animation config #8494

Closed

Conversation

vaukalak
Copy link

This fix provides possibility to subscribe to a child animation lifecycle. You'll be able to observe every single animation:

Animated.sequence([
            Animated.timing(
                this.state.scale,
                {
                    toValue: 0,
                    duration: 300,
                    onComplete: () => this.setState({someProp: 'new value'})
                }
            ),
            Animated.timing(
                this.state.scale,
                {
                    toValue: 1,
                    duration: 300
                }
            ),
        ]).start();

state.someProp, will updated with 'new value' when the first animation will be completed.

@ghost
Copy link

ghost commented Jun 29, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@@ -1566,6 +1567,16 @@ var modulo = function(
return new AnimatedModulo(a, modulus);
};

const enhanceCallback = (callback: ?EndCallback, config : AnimationConfig) => {

Choose a reason for hiding this comment

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

keyword-spacing: Expected space(s) after "if".

@ghost
Copy link

ghost commented Jun 29, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 29, 2016
@vaukalak
Copy link
Author

vaukalak commented Jul 1, 2016

I'm sorry, that's my first PR to react-native, and I'm a bit confused.. I've committed changes required by @eslint-bot . If I understand correctly a new build was not triggered, So I don't have an idea what to do now, to make that proceed.

@vaukalak vaukalak force-pushed the feature/animations-config-callbacks branch 3 times, most recently from b7aa78c to d729473 Compare July 4, 2016 18:32
@vadzim
Copy link

vadzim commented Jul 8, 2016

+1

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 12, 2016
@vaukalak vaukalak force-pushed the feature/animations-config-callbacks branch from d729473 to c00b229 Compare July 13, 2016 09:35
@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 13, 2016
@vaukalak vaukalak force-pushed the feature/animations-config-callbacks branch from 05cf796 to 46edeb0 Compare July 17, 2016 07:00
@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 17, 2016
@vaukalak vaukalak force-pushed the feature/animations-config-callbacks branch from 46edeb0 to 5f0194a Compare July 17, 2016 21:04
@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 17, 2016
@ghost
Copy link

ghost commented Aug 17, 2016

@vaukalak I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 17, 2016
@vaukalak vaukalak force-pushed the feature/animations-config-callbacks branch from 5f0194a to 3e515b4 Compare August 17, 2016 17:28
@ghost
Copy link

ghost commented Aug 17, 2016

@vaukalak updated the pull request - view changes

1 similar comment
@ghost
Copy link

ghost commented Aug 17, 2016

@vaukalak updated the pull request - view changes

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 17, 2016
@vaukalak
Copy link
Author

@foghina in base on history, I can find, that you did a lot of contributions in this file. Could you please review this?

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 17, 2016
@foghina
Copy link
Contributor

foghina commented Aug 18, 2016

LGTM, will fix a couple of nits before landing.

@facebook-github-bot import

@ghost
Copy link

ghost commented Aug 18, 2016

Thanks for importing.If you are an FB employee go to Phabricator to review internal test results.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 18, 2016
@vaukalak
Copy link
Author

@foghina I'm sorry, couldn't understand your comment. Could you please tell me what to do, to make that proceed?

@foghina
Copy link
Contributor

foghina commented Aug 18, 2016

@vaukalak I just wanted to make a tiny fix (rename enhanceCallback to _combineCallbacks), didn't want to waste a round trip (have you update the PR), so I used import instead of shipit so I could make the change internally.

Your PR is landing as we speak, no need to do anything :)

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 18, 2016
@ghost ghost closed this in 26e8ae7 Aug 18, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants