Skip to content

Conversation

@alanlgardner
Copy link
Contributor

Just an implementation of what this already claims to do.

@Hixie
Copy link
Contributor

Hixie commented Jun 19, 2017

This is fantastic.

Any chance you could add a test? Just verifying that this works roughly as we'd expect is sufficient. Something like the last test in https://github.com/flutter/flutter/blob/master/packages/flutter/test/animation/tween_test.dart would be fine.

@alanlgardner
Copy link
Contributor Author

Will do.

@alanlgardner
Copy link
Contributor Author

I noticed my dart formatter changed the formatting of the test file, what style guide do you use?

@alanlgardner
Copy link
Contributor Author

Also, I attempted to do a slerp implementation so we would have constant speed rotation, and the results were always off from my expectations by a couple percent. After trying for a bit yesterday I just gave up and went back to direct linear interpolation and left a TODO. I have a CL if you want to take a look.

@Hixie
Copy link
Contributor

Hixie commented Jun 20, 2017

Style guide: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo

Prefer longer lines over line breaks after operators, but in general it's a judgement call. Optimize for readability.

I'll trust your judgement on what the best algorithm is here; it looks like what you have is better than what we had before, so it's an improvement either way!

It's not ideal that the test is in the animation/ directory but the code in widgets/ but don't worry about it, we have more work to clean up there already anyway.

@alanlgardner
Copy link
Contributor Author

Sounds good. Let me know if there is anything else I should change.

Copy link
Contributor

Choose a reason for hiding this comment

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

please don't wrap these

Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor

Choose a reason for hiding this comment

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

flutter style is that if you have a newline after the (, you should have one before the matching ), and the contents should be indented by 2.

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@Hixie
Copy link
Contributor

Hixie commented Jun 20, 2017

Just some stylistics nits.

@alanlgardner
Copy link
Contributor Author

How do we get this check to re-run when the build is not broken anymore?

@Hixie
Copy link
Contributor

Hixie commented Jun 21, 2017

It does so automatically.

@Hixie
Copy link
Contributor

Hixie commented Jun 21, 2017

Thanks for the contribution! I will land your patch!

@Hixie Hixie merged commit 95f5d8d into flutter:master Jun 21, 2017
@alanlgardner
Copy link
Contributor Author

Awesome, thanks for the help!

gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jul 1, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants