Skip to content

Give scrolling back to the visitor - #401

Merged
singhharsh1708 merged 1 commit into
mainfrom
fix/native-scroll
Sep 19, 2026
Merged

singhharsh1708 merged 1 commit into
mainfrom
fix/native-scroll

Conversation

@singhharsh1708

Copy link
Copy Markdown
Owner

The site and every export shipped a smooth-scroll library that took over the wheel and eased each movement. Taking over the scroll is the most common complaint about scroll-animated sites. In one Hacker News thread it reads "Feels like I'm trying to navigate through molasses", and Nielsen Norman Group found most of its test users at least mildly disoriented by it.

Measured in Chrome with three real wheel notches, 360px of input:

after 100ms after 300ms caught up
site, before 53px 169px 1,297ms
site, after 120px 360px 288ms
export, before 46px 153px 1,580ms
export, after 120px 360px 302ms

After this change, "caught up" is simply when the last notch arrives. The page follows the visitor's hand.

  • The library is gone from the root layout, the export template, the editor's ZIP packing, package.json and public/.
  • The export listens to native scroll with a passive listener.
  • The editor needed opt-out attributes on its panels so the preview could be scrubbed by wheel at all. Those go with it.
  • The plugin engine already scrolled natively, so the example sites are unchanged.

The export README said the page is about 35 KB, a figure that counted this library. Measured across all 21 templates as procedural exports, it is 28.2 to 30.5 KB, median 29.9 KB. The README now says about 30 KB, and the test that guarded the sentence now measures every template instead of checking the words exist.

The FAQ gains one entry, saying the page scrolls the way the visitor's own device scrolls it and nothing slows, smooths or snaps it. Tests hold that claim: they fail if the library returns to the site, to an export or to the editor. Also ran: tsc, eslint, 541 vitest tests, and a production build.

The site and every export shipped a smooth-scroll library that took over the
wheel and eased each movement. With three wheel notches, an export had moved
46px after 100ms and caught up after 1,580ms, and the site after 1,297ms.
Scrolling now is native on both: 120px after 100ms, all 360px as soon as the
last notch lands. The editor no longer packs the library into the ZIP, which
also removes the opt-out attributes it needed so the preview could be scrubbed
at all. The README's page size is re-measured across all 21 templates, 28.2 to
30.5 KB, and a test now measures it rather than checking the sentence exists.
The FAQ says scrolling is never taken over, which the tests hold.
@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
scrollcraft Ready Ready Preview Sep 19, 2026 7:47am UTC

@singhharsh1708
singhharsh1708 merged commit 64ad95e into main Sep 19, 2026
3 checks passed
@singhharsh1708
singhharsh1708 deleted the fix/native-scroll branch September 19, 2026 07:47

This branch was successfully deployed

1 active deployment
Preview 9136421f Deployed Sep 19, 2026 by vercel[bot]
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