torchbox / careers

Torchbox careers site
https://torchbox.com/careers
4 stars 1 forks source link

Animate Elements on Scroll #100

Open jhancock532 opened 2 years ago

jhancock532 commented 2 years ago

Description of Changes Made

Adds SVG loop animation and logo fade in on scroll animation.

I've made a custom hook for the SVG arrow animation which has been applied to the three different SVG arrow components. I've simplified these SVG files so they are smaller and animate smoother.

A further hook has been added for animating multiple child components. This could be refactored to be more generic, supporting different animation objects or intersection observer settings.

How to Test

Link to changes made on preview site

Screenshots

Expand to show more ![logo-load-in](https://user-images.githubusercontent.com/18164832/197243581-a89c250e-6e2f-4b21-a6d5-72b536414e7a.gif)

MR Checklist

jhancock532 commented 1 year ago

Having read into recommended animation practices for better user experience, I will reduce the scope of this MR so only the logos receive an animated entrance, as well as one or two arrows which won't distract from the content.

I think that reducing the proposed site animations will improve the user experience, especially in the case of the Benefits list component, which is repeated often in the site and would be annoying to watch stagger in each time.