perf: general improvements#73
Draft
elboletaire wants to merge 5 commits into
Draft
Conversation
- Add preconnect hints for Google Fonts (googleapis + gstatic) - Add dns-prefetch for GTM and Plausible - Add conditional preconnect for YouTube origins on /app page only - Switch Plausible script to async (removes redundant defer)
Replace the heavy plyr-react embed with a zero-JS facade that defers iframe creation until the user clicks play. Avoids loading ~500 KB of YouTube JS on page load. - Add components/ui/youtube-facade.tsx: poster image + play button, activates real iframe on click, uses youtube-nocookie.com - Rewrite CleanYoutubePlayer to wrap YoutubeFacade - Update AppHeroWithVideo: remove local playing state, use #app-demo-video anchor for the 'Watch the Demo' CTA button - Extract ui.youtube_facade.play i18n key (en/es/ca)
Add width, height, loading, and decoding attributes to all <img> elements across the site to eliminate CLS (Cumulative Layout Shift). - Above-the-fold images (TrustedBySection logos, YouTube facade poster) use the default eager loading to avoid delaying LCP - Below-the-fold images use loading=lazy + decoding=async - PortfolioItem imageWidth/imageHeight made optional with conditional rendering - Accordion step images: per-image real dimensions (1400x924/893/862) - Success stories: per-story real dimensions; bellpuig correctly 1000x1157
Large libraries not on the critical rendering path get their own chunks so they can be loaded in parallel and cached independently. i18next is kept in the main bundle since it is required synchronously by +Layout.tsx on every page.
|
🚀 Deployed on https://69f372b86c2b091787daf3c8--vocdoni-io.netlify.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Validation
pnpm validatepnpm translationswas run orpnpm guardrails:translationspasses cleanlyrefs #69