ios pwa: rubber-band pull-to-refresh instead of Material circle#597
Open
sshane wants to merge 1 commit into
Open
ios pwa: rubber-band pull-to-refresh instead of Material circle#597sshane wants to merge 1 commit into
sshane wants to merge 1 commit into
Conversation
iOS PWAs in standalone mode don't get the system pull-to-refresh because there's no browser chrome to host it. The previous PullDownReload showed a Material Design circle indicator that didn't match the OS look. Replace it with the iOS Safari rubber-band style: when the user pulls down at scrollTop=0, translate document.body downward with damping (damping exponent 0.55, max translate 200px). On release, animate back to 0 with a cubic-bezier easing. If pulled past 80px, reload after the animation completes so the rubber-band-back isn't cut short. Also leaves a 30px edge zone uncaptured so iOS' system edge-swipe-back gesture is preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Welcome to connect! Make sure to:
deployed preview: https://597.connect-d5y.pages.dev |
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
iOS PWAs in standalone mode don't get the system pull-to-refresh because there's no browser chrome to host it. The previous `PullDownReload` showed a Material Design circle indicator that didn't match the iOS look.
Replace it with iOS Safari rubber-band style: when the user pulls down at `scrollTop=0`, translate `document.body` downward with damping (exponent 0.55, capped at 200px). On release, animate back to 0 via cubic-bezier easing. If pulled past 80px, reload after the animation completes so the rubber-band-back isn't cut short.
Also leaves a 30px edge zone uncaptured so iOS' system edge-swipe-back gesture is preserved.
No visible UI element — the page itself is the indicator.
Test plan
🤖 Generated with Claude Code