Skip to content

refactor: Use transition instead of animation for selection animation in chip #533

@LuLaValva

Description

@LuLaValva

Description

Right now, there are two problems with the selection animation:

  1. It triggers on page load when selected=true
  2. There is an animation for "select", but none for "deselect"

Right now we have a JS hack in eBayUI to prevent (2) from happening, but it doesn't actually work 😳. It would work if we waited the length of the animation before setting mounted to true, but that seems impractical.

If we figure out how to switch to transition instead of a @keyframes animation in skin, both of these will be resolved for free. Here's the relevant mixin code:
https://github.com/eBay/evo-web/blob/main/packages/skin/src/sass/mixins/private/_chip-mixins.scss#L4-L15

Screenshots

No response

Figma link

No response

Engineering pre-requisites

  • Supports dark mode.
  • Supports responsive design.
  • Tokens have been provided (or already exist).

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions