Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(animations): update copy #2379

Merged
merged 3 commits into from
Sep 20, 2016
Merged

Conversation

kapunahelewong
Copy link
Contributor

Copy edits for the Animations page.


For other browsers, a polyfill is required. Grab
[`web-animations.min.js` from here](https://github.com/web-animations/web-animations-js) and
[`web-animations.min.js` from Github](https://github.com/web-animations/web-animations-js) and
Copy link
Contributor

Choose a reason for hiding this comment

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

Github -> GitHub
(global)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

* [Animation callbacks](#animation-callbacks)
# Contents

* [Quickstart example: Transitioning between two states](#example-transitioning-between-states).
Copy link
Contributor

@kwalrath kwalrath Sep 19, 2016

Choose a reason for hiding this comment

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

Let's not call it "quickstart", since I think of that as the example in the QuickStart section. Maybe just "Simple"? Or drop the word entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped "quickstart" in keeping with the other items in the list. Done.

figure
img(src="/resources/images/devguide/animations/animation_basic_click.gif" alt="A simple transition animation" align="right" style="width:220px;margin-left:20px" )
:marked
Let's build a simple animation that transitions an element between two states
Build a simple animation that transitions an element between two states
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not crazy about phrasing this as a command, since they don't know how to do this. I'd prefer "Let's build", but maybe you can think of something better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at your changes, I don't see this comment addressed yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. Missed it! Changed it to "You can build..."

We now have an animation defined but it is not yet used anywhere. We can change that by
attaching it to one or more elements in the component's template using the "`[@triggerName]`"
syntax:
Now, using the "`[@triggerName]`" syntax, attach the animation that you just defined to
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's drop the " around [@triggerName].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

or `active`, since that's what we have defined animation states for.
Here, the animation trigger applies to every element repeated by an `ngFor`. Each of
the repeated elements animates independently. The value of the
attribute is bound to the expression `hero.state`. It is always either `inactive`
Copy link
Contributor

Choose a reason for hiding this comment

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

. It is -> and is

(to improve flow, reduce choppiness)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

and decelerates during its runtime. For example, using an `ease-in` function means
the animation begins relatively slowly but then picks up speed as it progresses. We
and decelerates during its runtime. For example, an `ease-in` function causes
the animation to begin relatively slowly and picks up speed as it progresses. You
Copy link
Contributor

Choose a reason for hiding this comment

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

and picks -> but pick

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

For each keyframe, we can specify an *offset* that defines at which point
in the animation that keyframe applies. The offset is a number between zero,
For each keyframe, you specify an *offset* that defines at which point
in the animation keyframe applies. The offset is a number between zero,
Copy link
Contributor

Choose a reason for hiding this comment

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

keyframe -> that keyframe
(or "the keyframe")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

figure
img(src="/resources/images/devguide/animations/animation_groups.gif" alt="Parallel animations with different timings, implemented with groups" align="right" style="width:220px;margin-left:20px" )
:marked
We've already seen how we can animate multiple style properties at the same time:
Just put all of them into the same `style()` definition!
You've seen how you to animate multiple style properties at the same time:
Copy link
Contributor

Choose a reason for hiding this comment

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

you to -> to

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

For this we can use animation *groups*. In this example we use groups both on
enter and leave so that we can use two different timing configurations. Both
For this you can use animation *groups*. In this example, using groups both on
enter and leave allow for two different timing configurations. Both
Copy link
Contributor

Choose a reason for hiding this comment

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

allow -> allows
(since it's "using", not "groups", that's the subject of this verb)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're good! Done. :)

For this we can use animation *groups*. In this example we use groups both on
enter and leave so that we can use two different timing configurations. Both
For this you can use animation *groups*. In this example, using groups both on
enter and leave allow for two different timing configurations. Both
are applied to the same element in parallel, but run independent of each other:
Copy link
Contributor

Choose a reason for hiding this comment

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

independent -> independently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@kwalrath
Copy link
Contributor

I was probably too picky, but in general this looks good.

one or more elements in the component's template.

+makeExample('animations/ts/app/hero-list-basic.component.ts', 'template')(format=".")

:marked
Here, the animation trigger applies to every element repeated by an `ngFor`. Each of
the repeated elements animates independently. The value of the
attribute is bound to the expression `hero.state`. It is always either `inactive`
or `active`.
attribute is bound to the expression `hero.state` and is always either `active`/`inactive`.
Copy link
Contributor

@kwalrath kwalrath Sep 20, 2016

Choose a reason for hiding this comment

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

/ -> or

(/ can mean too many things, including division, and-or, ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

figure
img(src="/resources/images/devguide/animations/animation_basic_click.gif" alt="A simple transition animation" align="right" style="width:220px;margin-left:20px" )
:marked
Let's build a simple animation that transitions an element between two states
Build a simple animation that transitions an element between two states
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at your changes, I don't see this comment addressed yet.

Copy link
Contributor

@kwalrath kwalrath left a comment

Choose a reason for hiding this comment

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

2 tiny comments, but this looks great. If you can fix these now before I commit, that'd be great. Otherwise, I'll commit and make the couple of changes myself.

the value as a string with the appropriate suffix:

* `'50px'`
* `'3em'`
* `'100%'`

Define most dimensional properties as a number in pixels:
If you don't provide a unit when specifying dimension, Angular will assume the default of `px`:
Copy link
Contributor

@kwalrath kwalrath Sep 20, 2016

Choose a reason for hiding this comment

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

Much better wording! Nit:

will assume -> assumes

@kwalrath kwalrath merged commit 7252bd1 into angular:master Sep 20, 2016
@kwalrath kwalrath deleted the kwong-animations branch September 20, 2016 21:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants