polish: smooth site-name scale animation on photography page transition - #403
Open
kiennt23 wants to merge 1 commit into
Open
polish: smooth site-name scale animation on photography page transition#403kiennt23 wants to merge 1 commit into
kiennt23 wants to merge 1 commit into
Conversation
kiennt23
force-pushed
the
polish/smooth-site-name-scale
branch
14 times, most recently
from
April 22, 2026 01:25
6760351 to
5fb8bf8
Compare
kiennt23
force-pushed
the
polish/smooth-site-name-scale
branch
from
April 22, 2026 01:29
5fb8bf8 to
7c76bfa
Compare
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.
Summary
Closes #337
Fixes the slight snap when the site-name scales from 32px → 50px (via
transform: scale(1.5625)) on home → photography navigation.Root Cause
The FLIP animation completes and calls
onComplete, which used a 50mssetTimeoutbefore adding thewide-layoutclass. This was a race condition — sometimes the browser batched the site-name visibility restore and the scale change into a single paint frame, skipping the CSS transition entirely.Fix
Replaced
setTimeout(() => ..., 50)with doublerequestAnimationFrame— this guarantees the browser paints the site-name atscale(1)beforewide-layoutaddsscale(1.5625), ensuring the CSStransform 0.4s easetransition always fires.The reverse direction (photography → home) was already smooth — the 400ms delay matches the FLIP duration, so no change needed there.