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

add page route animation article to cookbook #2812

Merged
merged 10 commits into from
Jul 9, 2019
Merged

add page route animation article to cookbook #2812

merged 10 commits into from
Jul 9, 2019

Conversation

johnpryan
Copy link
Contributor

This adds the animation article to the cookbook.

@sfshaza2 the cookbook index lists articles alphabetically, but concept-wise I think this should be the third article. Let me know what you think and I can revert 7310a27

FYI @RedBrogdon

@googlebot googlebot added the cla: yes Contributor has signed the Contributor License Agreement label Jul 8, 2019
@johnpryan johnpryan requested a review from sfshaza2 July 8, 2019 20:51
Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

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

A few conventions that you didn’t know but, once those are fixed, it looks great!! Go ahead and submit those fixes and then merge. I’m fine with your reordering of the pages.

LGTM (with some small changes requested.)

A design language, such as Material, defines standard behaviors when
transitioning between routes (or screens). Sometimes, though, a custom
transition between screens can make an app more unique. To help,
[PageRouteBuilder](https://api.flutter.dev/flutter/widgets/PageRouteBuilder-class.html)
Copy link
Contributor

Choose a reason for hiding this comment

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

Generally, we use the following format for links. (We didn’t always do that, but it’s now part of our recommended guidelines.) Also, we use macros for the common websites. So:

To help, PageRouteBuilder provides an Animation

It makes the text more readable and it makes things a lot easier if we change the URLs for our API website, for example. (Which we did last year.)
https://github.com/dart-lang/site-shared/wiki/Writing-for-Dart-and-Flutter-websites

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 fixed


{{site.alert.note}}

Note: The `child` parameter in transitionsBuilder is the widget returned from
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete the empty line above and below the note text. We indent notes by two chars, so:

{{site.alert.note}}
The child parameter …
{{site.alert.end}}

Also, the site.alert macro inserts the “Note:” text, so you can delete that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 fixed

constructor). In this case, the Offset is a 2D vector for the
[FractionalTranslation](https://api.flutter.dev/flutter/widgets/FractionalTranslation-class.html)
widget. Setting the `dy` argument to 1 represents a vertical translation one
full height of the page.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice addition!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks!

@johnpryan
Copy link
Contributor Author

@sfshaza2 thanks for the review - this is ready for another look.

@sfshaza2 sfshaza2 merged commit 65b0efa into flutter:master Jul 9, 2019
matthew-carroll pushed a commit to matthew-carroll/website that referenced this pull request Jul 11, 2019
* add page route animation article

* add links to page route article

* remove google drive link

will re-add after updating flutter/assets-for-api-docs

* add metadata

* reword first paragraph

* add page-route-animation GIF

* specify dart as the language in code blocks

* make prev and next fields match alphabetical order

* use {{site.api}} for API links

* fix note formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Contributor has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants