Skip to content

perf: general improvements#73

Draft
elboletaire wants to merge 5 commits into
mainfrom
f/issue-69-performance
Draft

perf: general improvements#73
elboletaire wants to merge 5 commits into
mainfrom
f/issue-69-performance

Conversation

@elboletaire
Copy link
Copy Markdown
Member

  • 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)## Summary

Validation

  • pnpm validate
  • commit format follows the repo convention
  • pnpm translations was run or pnpm guardrails:translations passes cleanly

refs #69

- 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.
@github-actions
Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request April 30, 2026 15:18 Inactive
@elboletaire elboletaire changed the title perf: add preconnect, dns-prefetch, and defer analytics scripts perf: general improvements Apr 30, 2026
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.

1 participant