Skip to content

Conversation

@katiezutter
Copy link
Contributor

@katiezutter katiezutter commented Mar 3, 2021

Overview

Address accessibility issue by consolidating headers; removes slide up/down transitions.

Major update: For these animations, we are now removing the slide up/down transitions, as per this new design:

Frame 8

Came out of work from https://github.com/Codecademy/client-modules/pull/1430.

We were seeing an accessibility issue where the user could navigate through both the visible and the hidden header at any given time. Merging into one header solves this issue, but there might be animation implications that I haven't thought about!

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: EGG-822
  • I have run this code to verify it works
  • This PR includes unit tests for the code change

@katiezutter katiezutter requested a review from a team as a code owner March 3, 2021 16:04
@katiezutter katiezutter requested review from codecaaron and jakemhiller and removed request for a team March 3, 2021 16:04
@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #1454 (ffe59c0) into je-header-animation (edd0f37) will increase coverage by 0.29%.
The diff coverage is 100.00%.

@@                   Coverage Diff                   @@
##           je-header-animation    #1454      +/-   ##
=======================================================
+ Coverage                82.88%   83.17%   +0.29%     
=======================================================
  Files                      337      337              
  Lines                     2804     2782      -22     
  Branches                   729      718      -11     
=======================================================
- Hits                      2324     2314      -10     
+ Misses                     424      415       -9     
+ Partials                    56       53       -3     
Impacted Files Coverage Δ
...mental/GlobalHeader/AnimatedGlobalHeader/index.tsx 100.00% <100.00%> (+42.85%) ⬆️

@katiezutter katiezutter requested a review from jcenglish March 3, 2021 16:04
@jcenglish
Copy link
Contributor

Ah.. this seems to re-introduce one of the initial pre-two-header bugs. When scrolling down from the very top, scroll back up and the header instantly reappears instead of transitions. It transitions normally when scrolling down and up in the middle of the page.

We could ask design if that's a dealbreaker.

Screen.Recording.2021-03-03.at.1.00.03.PM.mov

@katiezutter
Copy link
Contributor Author

@jcenglish wow great catch!! I'll try to fix that now!

}

.translateDown {
.transitionSlideDown {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this will be much easier to manage with framer-motion.

Copy link
Contributor

@saghdaey saghdaey Mar 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we move to framer-motion, we may have to create a separate AnonymousAppHeader or always have animation: false for

type:anon 
variant: landing

i'm interpreting this comment to mean we shouldn't rely on framer-motion on the anonymous landing page

context: https://github.com/codecademy-engineering/Codecademy/blob/bf6f8b21df681f3df0570e8d92c8e856e3411ea6/webpack/assets/components/AppHeader/AnonymousAppHeader/index.tsx#L9-L14

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcenglish pulling you in here too if you have thoughts about framer-motion!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I wouldn't know how to implement framer-motion in this case, so, I have no thoughts about it. But... since we're leaning towards releasing without the midpage sliding transitions, maybe we don't need to think about it right now.

@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/gamut-kit@0.1.1-alpha.ffe59c.0
@codecademy/gamut-labs@10.4.6-alpha.ffe59c.0
@codecademy/styleguide@30.0.1-alpha.ffe59c.0

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://60429949fee0870097f37c8f--gamut-preview.netlify.app

Deploy Logs

@jcenglish jcenglish merged commit 32c07cf into je-header-animation Mar 5, 2021
@jcenglish jcenglish deleted the kz-EGG-822-header-a11y branch March 5, 2021 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants