Reaction: Eliminate dependency on Velocity

Created on 16 Jul 2018  路  3Comments  路  Source: reactioncommerce/reaction

Issue Description

We currently have a dependency on Velocity for animating parts of our client application.
Velocity is a DOM animation library which makes doing some complex animations performant and simple.
We currently use velocity to do one of two things.

  1. Animate the cart drawer opacity
  2. Animate the background color of changed fields from green and then back to white.

Neither of these animations should need a library to do well or simply and don't justify the added overhead of 94.5kb

The animations using velocity are contained in one of 6 files

  • containers/cartIconContainer.js
  • components/metadata/metafield.js
  • components/tagItem.js
  • components/productAdmin.js
  • components/productField.js
  • components/variantForm.js

This issue is to eliminate the dependency on Velocity and replace any animations that are using Velocity with another method of animation.

Most helpful comment

@dancastellon No jQuery ever.

All 3 comments

@zenweasel Does it make sense to try CSS animations or is jQuery fine?

@dancastellon No jQuery ever.

Animating with Javascript is fine though, I created this ticket because I don't think the type of animations we're performing warrant an animation library. Honestly this is not a high priority if it turns out to be a tough task.

Was this page helpful?
0 / 5 - 0 ratings