Page MenuHomePhabricator

[landing] animate mobile nav component
ClosedPublic

Authored by ginsu on May 10 2023, 6:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 5:43 PM
Unknown Object (File)
Wed, Mar 27, 11:53 PM
Unknown Object (File)
Mar 12 2024, 11:16 AM
Unknown Object (File)
Mar 4 2024, 6:59 AM
Unknown Object (File)
Mar 4 2024, 2:42 AM
Unknown Object (File)
Mar 4 2024, 2:41 AM
Unknown Object (File)
Mar 4 2024, 2:40 AM
Unknown Object (File)
Mar 4 2024, 2:39 AM
Subscribers

Details

Summary

This diff animates the mobile nav component from the top to the bottom. I worked closely with Ted on this to get the animation exactly how he wanted it to look/feel. Some things to note is that this diff is safe to land in its current state. The mobile nav component is currently hidden above the screen where it lives until someone presses the hamburger icon which will be introduced in subsequent diffs. Furthermore the first demo in the test plan may look a bit funky and that is because we need to make changes to the Header component as well. I will attach a second demo which will preview the "final form".

The focus of this diff is purely the up and down animation the mobile nav bar does

Depends on D7763

Test Plan

Please watch the demo videos below to see how the up and down animation of the mobile nav bar looks and feels

Sneak Peak of the animation with a more polished header:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

landing/landing.css
22 ↗(On Diff #26345)

This is to prevent scrolling when the MobileNav component is active

26 ↗(On Diff #26345)

This is to prevent the MobileNav from covering the Header

landing/landing.react.js
88–96 ↗(On Diff #26345)

We should be memoizing here in order to memoize the props getting passed down to MobileNav

88–96 ↗(On Diff #26345)

We also don't need to worry about gating MobileNav based on onQR since MobileNav is only accessible from Header which is already gated based on onQR

ginsu requested review of this revision.May 10 2023, 7:04 AM
ashoat requested changes to this revision.May 12 2023, 1:59 AM
ashoat added inline comments.
landing/landing.react.js
88–96 ↗(On Diff #26345)

We should be memoizing here in order to memoize the props getting passed down to MobileNav

This doesn't make any sense. You remain deeply confused about memoization

This revision now requires changes to proceed.May 12 2023, 1:59 AM

remove memoization around mobile nav component

landing/landing.css
22 ↗(On Diff #26462)

This is to prevent scrolling when the MobileNav component is active

26 ↗(On Diff #26462)

This is to prevent the MobileNav from covering the Header

landing/landing.react.js
103–106 ↗(On Diff #26462)

We don't need to worry about gating MobileNav based on onQR since MobileNav is only accessible from Header which is already gated based on onQR

Memoization concern has been addressed; will leave the rest of the review to the original selected reviewers

landing/mobile-nav.react.js
14–17 ↗(On Diff #26462)

All React props should always be read-only

atul added inline comments.
landing/mobile-nav.css
11 ↗(On Diff #26462)

We typically use ms units for transition so this would be 500ms instead of 0.5s.

That said, not sure if it's something we care about being consistent w/ so defer to you.

This revision is now accepted and ready to land.May 15 2023, 12:58 PM
This revision was automatically updated to reflect the committed changes.