Skip to content

fix(motion): eliminate residual mobile Portfolio flicker - #77

Merged
devrodri-com merged 3 commits into
mainfrom
fix/devrodri-mobile-portfolio-flicker
Aug 5, 2026
Merged

fix(motion): eliminate residual mobile Portfolio flicker#77
devrodri-com merged 3 commits into
mainfrom
fix/devrodri-mobile-portfolio-flicker

Conversation

@devrodri-com

@devrodri-com devrodri-com commented Aug 5, 2026

Copy link
Copy Markdown
Owner

What changed

  • Preserve the existing single preload for the approved self-hosted Inter WOFF2 file.
  • Scope the landing Portfolio card CSS transition from transition-all to transition-shadow, while preserving the Framer Motion reveal, stagger, duration, hover/tap, links, focus-visible, and reduced-motion behavior.
  • Set the five local Inter faces (300, 400, 500, 600, 700) to font-display: optional.
  • Update only the direct repository and motion regression contracts needed to lock both fixes.

The third append-only commit is 2b8050cfc52d77427bc84b8ad045e582ee220b12 (fix(motion): stabilize mobile Portfolio entry in WebKit). It changes five files and does not touch dependencies, package manifests, copy, images, geometry, SEO, JSON-LD, CSP, Analytics, or forms.

Root causes

Two independent contributors were confirmed:

  1. transition-all duration-300 and Framer Motion were both controlling opacity/transform on the same landing card. Production WebKit reproduced an opacity reset in 20/20 cold entries; Chromium reproduced an opacity/translate desynchronization in 20/20. Limiting the CSS transition to box shadow removes that ownership conflict.
  2. A late cold-load Inter swap could change the accumulated height above Portfolio and visibly move the cards. The existing preload improves discovery, while font-display: optional prevents a very late swap from reflowing an already-visible card.

Accepted tradeoff: on an extremely slow first navigation, the readable fallback font may remain for that navigation. Inter remains available on normal or cached loads and may be used from cache on later navigation.

Validation

Local validation on Node 22.23.2 / npm 9.9.4:

  • npm run typecheck — PASS
  • npm run lint — PASS
  • npm run test:run — 29 files / 268 tests PASS
  • directed gate — 3 files / 18 tests PASS
  • npm run build — PASS
  • prerender verification — PASS
  • HTTP verification — PASS
  • npm run ci — PASS

Browser evidence on the exact Preview head:

  • WebKit focal: production flicker 20/20; Preview flicker 0/20.
  • WebKit Preview normal/reduced coverage: 32/32 stable.
  • WebKit Preview with Inter delayed 6 s: 0/4 material reflows and zero material geometry shifts. Native Layout Shift API was unavailable in this WebKit harness, so no native WebKit CLS value is claimed.
  • Chromium focal: Preview 20/20 stable; production 20/20 retained the original opacity/translate desynchronization.
  • Chromium Preview compact normal/reduced/reentry coverage: 4/4 stable.
  • Chromium Preview with Inter delayed 6 s: 0/4 material reflows, CLS 0; production control reflowed in 4/4.
  • Card remounts, reveal restarts, unstable currentSrc changes, duplicate image/font requests, and application/page errors: 0 in the Preview gates.
  • Hover shadow/restore and tap-to-the-same-href behavior: PASS.
  • General regression matrix: 74/74 PASS across ES/EN Home and Portfolio routes, Chromium/WebKit, mobile/desktop, filters, focus, navigation, form, no-JS, font delivery/line breaks, SEO, JSON-LD, CSP, and Analytics.
  • One local WOFF2 request per cold/delayed run, five optional faces, immutable caching, and zero Google Fonts requests.
  • All GitHub checks are green.

Vercel Preview-only toolbar CSP messages and Analytics requests cancelled during navigation/context teardown were separated from product errors. Analytics initialized once and queued page_view; backend delivery was not asserted. The form was validated without sending an external submission.

Review status

This PR intentionally remains Draft and unmerged pending physical-device review on the phone that originally showed the flicker.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
minisitio-rodrigo Ready Ready Preview Aug 5, 2026 1:16am

Request Review

@devrodri-com
devrodri-com marked this pull request as ready for review August 5, 2026 02:07
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@devrodri-com
devrodri-com merged commit 3ec9997 into main Aug 5, 2026
7 checks passed
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