Give scrolling back to the visitor - #401
Merged
Merged
Conversation
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.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
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 this change, "caught up" is simply when the last notch arrives. The page follows the visitor's hand.
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.