Skip to content

feat(landing): smooth wheel scrolling with Lenis - #295

Merged
Lexirieru merged 1 commit into
mainfrom
feat/landing-lenis
Nov 12, 2026
Merged

Lexirieru merged 1 commit into
mainfrom
feat/landing-lenis

Conversation

@AncungAulia

Copy link
Copy Markdown
Contributor

@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

  • lenis 1.3.27, pinned, in components/SmoothScroll.tsx.
  • It drives the page's own scroll, with no wrapper. It runs on GSAP's ticker and calls ScrollTrigger.update on every scroll, so the pins and the scrubbed approvals scene stay in step.
  • Touch keeps native scrolling, and reduced motion gets no Lenis.
  • It waits for the page loader to lift.
  • PageLoader's in-page jumps and the overlay scrollbar's drag go through lenis.scrollTo(…, { immediate: true }), so it doesn't glide on afterwards.

Tests (local, on main 8e86e27)

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 build pass.

  • 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

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>
@Lexirieru
Lexirieru merged commit 9597c68 into main Nov 12, 2026
1 check passed
@Lexirieru
Lexirieru deleted the feat/landing-lenis branch November 12, 2026 18:02
@Lexirieru

Copy link
Copy Markdown
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.

@Lin1er

Lin1er commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Live on the hosted demo: main 799eb6b (automatic deploy, together with #296).

  • GET /v1/health → {"ok":true,"engine":true,"revision":"799eb6b"}; https://hellonear.xyz answers 200.
  • Try-out e2e against the hosted demo: 22/22.

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.

3 participants