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

performance: avoid desktop/mobile menus unnecesary renderings #13042

Merged
merged 7 commits into from
May 29, 2024

Conversation

nhsz
Copy link
Member

@nhsz nhsz commented May 27, 2024

This PR avoids unnecesary nav menus renderings on desktop/mobile

Description

  • avoids rendering desktop Menu version on mobile
  • avoids rendering desktop LanguagePicker version on mobile
  • extracts MobileCloseBar component and renders on mobile only
  • moves LanguagePicker handlers to external functions to avoid re-creating them on each render

Copy link

netlify bot commented May 27, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 6421af4
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/6656dcfdf8ea3a00098329e3
😎 Deploy Preview https://deploy-preview-13042--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 (🟢 up 10 from production)
Accessibility: 92 (no change from production)
Best Practices: 89 (🔴 down 3 from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@nhsz nhsz changed the title performance: avoid desktop/mobile menues unnecesary renderings performance: avoid desktop/mobile menus unnecesary renderings May 27, 2024
Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

@nhsz good job, left a couple of comments.

src/components/Nav/Menu/index.tsx Outdated Show resolved Hide resolved
src/components/LanguagePicker/index.tsx Outdated Show resolved Hide resolved
@nhsz nhsz requested a review from pettinarip May 28, 2024 18:01
@pettinarip pettinarip merged commit bd0b88d into dev May 29, 2024
9 of 10 checks passed
@pettinarip pettinarip deleted the performance-avoid-desktop-nav-rendering-on-mobile branch May 29, 2024 13:03
This was referenced Jun 19, 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