Repository navigation
feat(landing): smooth wheel scrolling with Lenis - #295
Merged
Merged
Conversation
Axel asked for Lenis (13 Nov). lenis 1.3.27, pinned, drives the page's own scroll (no wrapper), runs on GSAP's ticker and updates ScrollTrigger on every scroll, so the pins and the scrubbed approvals scene stay in step. Touch keeps native scrolling; reduced motion gets none. It waits for the page loader to lift. PageLoader's in-page jumps and the overlay scrollbar's drag go through lenis.scrollTo (immediate), so Lenis doesn't glide on afterwards. Tests: landing typecheck. Playwright on the dev server: one wheel notch glides over about 0.7 s instead of jumping; Safety, Skills and the logo still land where they did, with no '#' in the URL; a reload starts at the top; no sideways scroll; no page errors. The approvals scene at scrollY 2200 and 3200 matches the live site (mean pixel difference 0.2 of 255). Not checked on a real trackpad or phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Merged, thanks @AncungAulia (Axel's approval). CI build passed; touch, reduced motion and the in-page jumps are handled as you described. Not checked on a real phone yet. |
Contributor
|
Live on the hosted demo:
|
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.
@Lexirieru Lenis on the landing, as you asked (13 Nov). #293 was merged just before this commit, so it comes as its own PR.
What it does
lenis1.3.27, pinned, incomponents/SmoothScroll.tsx.ScrollTrigger.updateon every scroll, so the pins and the scrubbed approvals scene stay in step.lenis.scrollTo(…, { immediate: true }), so it doesn't glide on afterwards.Tests (local, on
main8e86e27)Playwright on the dev server:
One wheel notch glides over about 0.7 s.
Safety, Skills and the logo land where they did, with no
#in the URL.A reload starts at the top. No sideways scroll, no page errors.
The approvals scene at scrollY 2200 and 3200 matches the live site (mean pixel difference 0.2 of 255).
Landing typecheck and
next buildpass.Ancung tried it in his browser and likes it.
Not run: the landing has no unit or integration tests.
Not checked: a real phone.
🤖 Generated with Claude Code