Page MenuHomePhabricator

[landing] animate mobile nav component
ClosedPublic

Authored by ginsu on May 10 2023, 6:17 AM.
Tags
None
Referenced Files
F3407318: D7781.diff
Wed, Dec 4, 5:38 AM
F3405600: D7781.id26462.diff
Tue, Dec 3, 10:16 PM
F3405599: D7781.id26345.diff
Tue, Dec 3, 10:16 PM
F3405598: D7781.id26344.diff
Tue, Dec 3, 10:16 PM
F3405597: D7781.id26342.diff
Tue, Dec 3, 10:16 PM
Unknown Object (File)
Mon, Nov 25, 2:21 PM
Unknown Object (File)
Sun, Nov 17, 2:19 AM
Unknown Object (File)
Sun, Nov 17, 1:37 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.