mobile: preserve dashboard scroll on back; allow iOS edge-swipe#596
Open
sshane wants to merge 1 commit into
Open
mobile: preserve dashboard scroll on back; allow iOS edge-swipe#596sshane wants to merge 1 commit into
sshane wants to merge 1 commit into
Conversation
Two related mobile UX fixes: - Dashboard now persists window.scrollY to sessionStorage (keyed by dongleId) and restores on remount. Closing a route via the X button or via OS/browser back returns the user to where they were in the list, instead of jumping to the top. - PullDownReload's document-level passive:false touchstart was swallowing the iOS system edge-swipe-back gesture. Skip touches that start within 30px of either screen edge so the OS gesture is preserved while pull-to-reload still works in the middle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Welcome to connect! Make sure to:
deployed preview: https://596.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
Two related mobile UX fixes.
1. Dashboard scroll restoration. Closing a route view via X (or browser/OS back) jumped the dashboard to the top, losing the user's place in the list. Dashboard now persists `window.scrollY` to `sessionStorage` keyed by `dongleId` and restores on remount via `requestAnimationFrame` so children have a chance to lay out first.
2. iOS edge-swipe-back. `PullDownReload` registers `touchstart` with `{ passive: false }` at the document level. That swallowed iOS' system back-swipe gesture (which begins at the screen edge), so the gesture didn't work in the PWA. Skip touches that start within 30px of either screen edge so the OS gesture is preserved while pull-to-reload still works in the middle of the screen.
Test plan
🤖 Generated with Claude Code