Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor nav's load #13882

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Refactor nav's load #13882

merged 2 commits into from
Sep 17, 2024

Conversation

pettinarip
Copy link
Member

Description

This PR cleans up the loading exp for the nav a bit.

  • remove the isDesktop hook and replace the logic behind it with media queries using useBreakpointValue. This fixes an edge case where large mobile screens or tablets would not load the desktop menu.
  • make most of the nav components client-rendered. This improves the UX by showing the interactive components only when they are ready to be interactive, not before.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 247b2a2
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/66e93bddf301220008d6df2c
😎 Deploy Preview https://deploy-preview-13882--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 48 (no change from production)
Accessibility: 92 (🔴 down 1 from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 92 (🔴 down 1 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Looking better... This fixed the issue I was seeing where landscape mobile devices could end up without any menu available.

Just noting that this still has a very step-wise approach to loading:

  1. Logo only, blank bar
  2. Right side loads, but menu categories and Cmd/Ctrl-K missing
  3. Cmd/Ctrl-K indicator loads
  4. Menu items finally load
Screen.Recording.2024-09-17.at.09.00.43.mov

This is still an improvement so I think we can pull this in now.

@wackerow wackerow merged commit 9a4f83c into dev Sep 17, 2024
8 of 10 checks passed
@wackerow wackerow deleted the refactor-nav-load branch September 17, 2024 16:10
This was referenced Sep 18, 2024
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.

2 participants