Skip to content

perf: lazy-load testimonial embeds - #148

Open
liukaisweetsmile-pixel wants to merge 1 commit into
gibwork:mainfrom
liukaisweetsmile-pixel:gib-lazy-testimonials
Open

perf: lazy-load testimonial embeds#148
liukaisweetsmile-pixel wants to merge 1 commit into
gibwork:mainfrom
liukaisweetsmile-pixel:gib-lazy-testimonials

Conversation

@liukaisweetsmile-pixel

@liukaisweetsmile-pixel liukaisweetsmile-pixel commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • replace the duplicated mobile and desktop testimonial trees with one responsive, semantic list
  • defer each react-tweet request until its card is close to the viewport
  • keep horizontally clipped mobile testimonials on demand instead of fetching all ten at once
  • add accessible previous/next controls, scroll snapping, and loading status text for the mobile carousel
  • preserve sizing classes across loading, success, and error states

Why

The current section renders the same ten tweet IDs twice—once for mobile and once for desktop—and every mounted ClientTweetCard calls useTweet immediately. Even though testimonials are well below the first viewport, those third-party requests can compete with critical landing-page resources.

This change keeps the social proof and existing visual design while making the section progressive: no tweet client mounts until its card approaches the viewport, and mobile cards that are still clipped horizontally remain unloaded until the visitor browses to them.

Validation

  • /Users/kai/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node node_modules/typescript/bin/tsc --noEmit --incremental false
  • /Users/kai/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node node_modules/next/dist/bin/next build
  • git diff --check
  • production preview returned HTTP 200
  • initial server-rendered page contains 10 deferred testimonial markers, all with data-loaded="false"
  • initial server-rendered page contains 0 Twitter/X syndication API URLs
  • confirmed accessible labels for the testimonial list and both mobile navigation controls

Preview status

Vercel currently reports that a Gibwork team member must authorize the deployment for this first-time contributor. This is an account/deployment permission gate; the production build above completed successfully from the same commit.

Task context

Submitted for the funded Gibwork task: Improve Gibwork Landing Page or Submit a GitHub Enhancement.

The Gibwork reward is contingent on task-owner review and approval.

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

@liukaisweetsmile-pixel is attempting to deploy a commit to the gibwork Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Author

Hi team — Vercel reports that a Gibwork team member must authorize the preview deployment for this first-time-contributor PR. The production build and validation notes are included in the PR description. When convenient, could someone authorize the preview and review the funded task submission? I’m happy to make adjustments.

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