feat: hold first paint for fonts and fade in the ui on load - #208
Merged
Merged
Conversation
|
React Doctor found 2 new issues in 2 files · 2 warnings · score 93 / 100 (Great) · 2 fixed · vs 2 warnings
Reviewed by React Doctor for commit |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tagium | 617f820 | Commit Preview URL Branch Preview URL |
Sep 25 2026, 10:14 AM |
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.
Note
🤖 Claude Opus 5.5 on behalf of Oliver
ELI5
The app now waits a split second for its font before appearing, then gently fades in so nothing jumps around while it loads.
Problem
On a cold load, text first renders in a fallback font and then swaps to Satoshi, and the whole UI appears at once. Together, that makes the first second feel jarring.
Fix
src/runtime/holdForFonts.tsaddsfonts-loadingto<html>and removes it once Satoshi loads, or after 800ms, whichever comes first. Satoshi is a variable font, so a singledocument.fonts.loadcovers every weight.page-entertailwind utility fades a region in with a 6px rise over 480ms.page-slide-inslides a region in from off-screen left with no fade, on an ease-out curve (cubic-bezier(0.22, 1, 0.36, 1), the same curve the mobile drawer uses). Both stay paused whilefonts-loadingis set, and both usebackwardsfill so no transform is left behind to breakfixeddescendants.UI Changes
Before
https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/a4f17b9b63b51c2b/before.webm
After
This recording predates the current motion: in it, both regions fade and rise, and the sidebar enters first.
https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/4e6d8628b90524ec/after.webm
Review guide
/and/?app=tagium-savewith cache disabled and "fast 4g" throttling. Expect no fallback-font flash: the main column fades in place in Satoshi, as the sidebar slides in from the left, fully opaque, at the same time. Also open a share link to check the page fades in.*.fontshare.com; the UI should still appear after about 800ms in the fallback font. On mobile (390px), the drawer should not flash during load and should still open and close. With reduced motion enabled, everything fades with no movement, including the sidebar.vp dev, the CSS is injected by JS, so the hold may not engage; it is reliable in production builds.tsc, lint, and all 682 unit tests pass. A Codex browser pass on production builds (before vs. after) confirmed the font hold, the 800ms cap, the stagger,transform: noneafter the animation, the mobile drawer, the save app, reduced motion, and no new console errors.Made by Claude Opus 5.5 in Claude Code (T3 Code), browser verification by GPT-6 Sol in Codex.