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

Revise web-animations feature #2244

Open
flackr opened this issue Nov 14, 2024 · 3 comments · May be fixed by #2251
Open

Revise web-animations feature #2244

flackr opened this issue Nov 14, 2024 · 3 comments · May be fixed by #2251
Labels
feature definition Creating or defining new features or groups of features.

Comments

@flackr
Copy link

flackr commented Nov 14, 2024

Specification

https://www.w3.org/TR/web-animations-1/

Description

The feature description for web-animations describes it as "The animate() method of Element objects", however animations can also be constructed with the Animation constructor and the web animations API can be used on CSS animations and transitions after getting the Animation objects using the getAnimations() method on a document or Element.

I propose we revise the description to clearly include these other means of using the web animations APIs.

Documentation

N/A This is a proposed revision to the existing feature

Browser support

N/A This is a proposed revision to the existing feature

@flackr flackr added the feature definition Creating or defining new features or groups of features. label Nov 14, 2024
@flackr flackr linked a pull request Nov 15, 2024 that will close this issue
@ddbeck
Copy link
Collaborator

ddbeck commented Nov 18, 2024

Hi @flackr and welcome to web-features.

I've got some background on this description and then a question for you.

This feature is described in terms of animate() because we're aligning to how caniuse represents web animations as a high-level feature. Although it's possible to work with animations in other ways, caniuse doesn't condition support on those ways, some of which came later (e.g., getAnimations()). We can't (significantly) change this description without breaking our link to the caniuse feature (that is to say, we can't continue to claim to be talking about the same feature as caniuse).

Right now, we're working on an initial pass of the platform, to capture everything (albeit rather imperfectly). We have a number of issues open to better address what we've been calling "later additions" and this appears to be one of them. Those other methods are in fact part of the feature, but they don't contribute to the overall headline status. See https://github.com/web-platform-dx/web-features/blob/main/features/web-animations.yml.dist for details.

Given this background, does the description make some more sense? Would it be helpful to have distinct features for some of the later additions? Or is it still the case that your model of "web animations" must have Animate() and getAnimations() as well as animate()?

@flackr
Copy link
Author

flackr commented Nov 18, 2024

Hi @flackr and welcome to web-features.

I've got some background on this description and then a question for you.

This feature is described in terms of animate() because we're aligning to how caniuse represents web animations as a high-level feature.

The definition on the linked page supports the modification here, in particular it says:

  • Lets you create animations that are run in the browser

    The same animations that run in the browser are also be created by using the Animation constructor directly.

  • as well as inspect and manipulate animations created through declarative means like CSS.

    This is only supported through the getAnimations() API.

Although it's possible to work with animations in other ways, caniuse doesn't condition support on those ways, some of which came later (e.g., getAnimations()). We can't (significantly) change this description without breaking our link to the caniuse feature (that is to say, we can't continue to claim to be talking about the same feature as caniuse).

I believe it is the very same feature. Browser versions that only support Element.animate are listed as partial support on caniuse.

Right now, we're working on an initial pass of the platform, to capture everything (albeit rather imperfectly). We have a number of issues open to better address what we've been calling "later additions" and this appears to be one of them. Those other methods are in fact part of the feature, but they don't contribute to the overall headline status. See https://github.com/web-platform-dx/web-features/blob/main/features/web-animations.yml.dist for details.

I think this is important in establishing what counts as use and tests of the described feature.

Given this background, does the description make some more sense? Would it be helpful to have distinct features for some of the later additions? Or is it still the case that your model of "web animations" must have Animate() and getAnimations() as well as animate()?

I think it is still the case that it must have new Animation() and getAnimations() as well.

@ddbeck
Copy link
Collaborator

ddbeck commented Nov 19, 2024

Thanks for the update, @flackr. I think I've misunderstood some pieces of this, so I'm going to take a closer look at the data and see what I can do here with the feature pinning, to unblock changing the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants