Skip to content

Animations: consider dropping CssKeyframesDriver in favor of WebAnimationsDriver #44520

Closed

Description

@AndrewKushnir

Which @angular/* package(s) are relevant/releated to the feature request?

animations

Description

Currently we have 2 implementations of the animations driver:

  • CssKeyframesDriver
  • WebAnimationsDriver

We select which one to use in this code based on the presence of the animate function in an element's prototype (see here). Since IE is no longer supported, the animate function should be available in all supported browsers, so it looks like we can drop the CssKeyframesDriver in favor of WebAnimationsDriver.

The biggest benefit that we'd have is less code in app bundles, the way those classes are referenced is non-tree-shakable (see here): both classes would be retained in an app bundle when the BrowserAnimationsModule is used. That'd probably save a few KB.

If we decide to do that, it'd be great to implement and land the tooling to measure the bundle size and retained symbols first, see #44437. In this case we'd be able to measure the impact of this change.

Activity

  1. added
    area: animations
    refactoring
    on Dec 17, 2021
  2. modified the milestone: needsTriage on Dec 17, 2021
  3. added
    feature
    on Dec 17, 2021
  4. modified the milestones: needsTriage, Backlog on Dec 17, 2021
  5. angular-robot commented on Dec 17, 2021

    @angular-robot
    Contributor

    This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

    You can find more details about the feature request process in our documentation.

  6. angular-robot commented on Jan 25, 2022

    @angular-robot
    Contributor

    Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

    Find more details about Angular's feature request process in our documentation.

  7. added and removed
    feature
    on Jan 31, 2022
  8. modified the milestones: Backlog, needsTriage on Jan 31, 2022
  9. added a commit that references this issue on Jan 31, 2022
    c8d6f2f
  10. added a commit that references this issue on Jan 31, 2022
    4644886
  11. angular-automatic-lock-bot commented on Mar 3, 2022

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  12. locked and limited conversation to collaborators on Mar 3, 2022
  13. added a commit that references this issue on Apr 8, 2022
    2f3c50a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: animationsrefactoringstate: has PR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions