Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Refactor animation and transition event docs #1056

Closed
8 tasks
wbamberg opened this issue Feb 20, 2019 · 9 comments
Closed
8 tasks

Refactor animation and transition event docs #1056

wbamberg opened this issue Feb 20, 2019 · 9 comments
Assignees

Comments

@wbamberg wbamberg self-assigned this Feb 27, 2019
@wbamberg
Copy link
Author

wbamberg commented Mar 1, 2019

@estelle or @a2sheppy or @irenesmith , would one of you mind reviewing these pages please?

@estelle
Copy link
Member

estelle commented Mar 14, 2019

I changed the example to a transform for best practice reasons: it's best to avoid animating / transitioning properties that cause a reflow. I added some tags. And on iterationevent, i added that it doesn't happen at the same time as animationend

@estelle
Copy link
Member

estelle commented Mar 14, 2019

For transitions, i added what happens when transitionstart and run are at the same time, or if a delay is negative (they're at the same time.

I extended your example and added the comparison b/t transitioncancel and transitionend. (if you cancel, does it end?). I did this only for the window events. Did you want to check it out and see if we should add it to document transition events, etc.?

@wbamberg
Copy link
Author

Thanks for the updates to the examples. I think content like this:

The transitionend event is fired in both directions: when the box finishes turning and the opacity hits 0 or 1, depending on the direction.

If there is no transition delay or duration, if both are 0s or neither is declared, there is no transition, and none of the transition events are fired.

If the transitioncancel event is fired, the transitionend event will not fire.

...is super-helpful. Personally I think it would be better to have it at the start (say, immediately after, or before, the blue box) rather than in with the examples. But I don't feel terribly strongly about this.

Did you want to check it out and see if we should add it to document transition events, etc.?

What if we just add it to the HTMLElement version, then link from the others to that page, since that's the "event target"?

@estelle estelle self-assigned this Mar 15, 2019
@estelle
Copy link
Member

estelle commented Mar 15, 2019

Remove the long examples from Window & Document. Add links to and longer example in HTMLElement:

@estelle
Copy link
Member

estelle commented Mar 16, 2019

Added ontransitionstart and ontransitionrun to https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers. Not 100% sure i should have.

Also added type of transitionEvent to https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent

@wbamberg
Copy link
Author

wbamberg commented Mar 18, 2019

Thanks for all your work on this @estelle ! I was thinking about a good wording for this, what do you think about:

The original target for this event is the HTMLElement that had the transition applied. You can listen for this event on the Window interface to handle it in the capture or bubbling phases. For full details on this event please see the page on HTMLElement: transitionstart.

(for example, for the Window: transitionstart page, replacing the para immediately after the blue box?) I like making an explicit reference to bubbling here.

@wbamberg
Copy link
Author

I've made sure only the HTMLElement version has the live example, and added links from the Window and Document versions to the HTMLElement page. So I'm calling this one closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants