Skip to content

Conversation

@titanous
Copy link
Contributor

@titanous titanous commented Dec 28, 2020

The default WebView decelerationRate is fast, which slows down momentum scrolling through messages significantly. This changes it to normal which is the native rate on iOS and makes it behave like other apps, allowing for much faster scrolling.

Test Plan: confirmed that this has the expected scroll momentum on an iPhone 12.

Fixes: #3557

@titanous titanous changed the title webview: Fix use native scroll deceleration on iOS webview: Use native scroll deceleration on iOS Dec 28, 2020
@titanous titanous force-pushed the fix-ios-scroll-momentum branch from 61c31fc to eabefd8 Compare December 28, 2020 05:05
The default WebView `decelerationRate` is 'fast', which slows down
momentum scrolling through messages significantly. Change it to
'normal' which is the native rate on iOS and makes it behave like
other apps, allowing for much faster scrolling.

Test Plan: confirmed that this has the expected scroll momentum on an
iPhone 12.

Fixes: zulip#3557
@chrisbobbe
Copy link
Contributor

Good find, thanks for the PR! This fixes #3557, a long-standing issue. 🎉 Merged, with a few tweaks:

  • I checked out the branch and ran tools/test (this has stopped running automatically for PRs and posting the results on GitHub; that's Migrate to GitHub Actions (from Travis CI) #4174), and ESLint told me it would like double quotes there instead of singled quotes; fixed.
  • Added Fixes: #3557 to the commit message, and the post at the top of this thread, so that issue gets linked up and closed automatically. 🎉
  • Fixed a commit-message style nit by changing "This changes it" to "Change it"; one obscure difference (we should probably document it somewhere) between the mobile-app project and the main Zulip commit-message style guide (here) is that we explicitly prefer the imperative in the commit message body, not just the summary line, for describing what work is done in the commit. The https://github.com/zulip/zulip project itself is inconsistent on this point; Greg discusses that at Store server feature level in Redux #4079 (comment).

@chrisbobbe chrisbobbe force-pushed the fix-ios-scroll-momentum branch from eabefd8 to 8da3daf Compare December 28, 2020 16:42
@chrisbobbe chrisbobbe merged commit 8da3daf into zulip:master Dec 28, 2020
@titanous titanous deleted the fix-ios-scroll-momentum branch December 28, 2020 16:46
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.

iOS: scrolling in views with messages is slow

2 participants