34 Commits
Author SHA1 Message Date
James Ide 6e49c94ff6 [0.1.1] Split react and react-native imports 2016-05-10 03:14:18 -07:00
James Ide c704a4caa0 [RN] Split React and React Native imports 2016-05-10 03:13:45 -07:00
James Ide b260838a9f [0.1.0] BREAKING: Must use RN 0.18+
Switch to react-clone-referenced-element
2016-01-19 12:39:30 -08:00
James Ide da3fe5ff9c [0.0.8] Handle case where contentInset is unspecified 2015-10-08 22:19:07 -07:00
James Ide 3a11b9bb31 Merge pull request #1 from brentvatne/fix/content-inset-optional
contentInset prop is optional, should respect that in _restoreScrollView
2015-10-08 22:18:48 -07:00
Brent Vatne 06c83dc5ce contentInset prop is optional, should respect that in _restoreScrollView 2015-10-08 21:01:25 -07:00
James Ide 1df3f42ca7 [Perf] Add shouldComponentUpdate check + reduce scroll timeout to 300ms 2015-10-01 00:47:28 -07:00
James Ide f82c93f185 [0.0.7] Reduce jank and CPU consumption 2015-09-30 20:21:33 -07:00
James Ide 845fb8e173 [Perf/Interaction] Fix jank when letting go and regrabbing after refresh end + avoid spurious setState calls
- If you pulled down, let the refresh complete, then let go and regrabbed the scroll view, RefreshableScrollView would still try to restore the scroll position and you'd see the scroll view jump a bit as the content inset shifted. Get rid of that by looking at `this.state.tracking` when deciding whether to restore the scroll position (need to wait for the `onResponderGrant` callback though, so used rAF for now... should switch to a latch).
- Avoid calling `setState` when the scroll position is positive since the user isn't pulling. Save some power and CPU :)
2015-09-30 20:11:55 -07:00
James Ide a1b8728afe [Interaction] Greatly reduce jankiness when restoring the scroll position
Rewrote the part for restoring the scroll position after refreshing is completed. This mimics the Twitter app in this way where the scroll view is non-interactive while it slides back up from its resting position w/the refresh indicator to its resting position without it. This is feeling close to production quality.
2015-09-30 14:07:18 -07:00
James Ide 52fd5a3e5c [0.0.6] 2015-09-23 22:06:04 -07:00
James Ide 3fa54b103d [Bugfix] Accommodate missing contentInset prop or missing fields
If you don't provide a contentInset (or are missing some of the fields) we should not crash or thread through silent NaNs.
2015-09-23 22:05:44 -07:00
James Ide a0ea73b22e Add Slack badge 2015-08-30 22:44:03 -07:00
James Ide c296ae3d7f [0.0.5] Upgrade ScrollableMixin to ^1.0.0 2015-07-09 13:51:36 -07:00
James Ide efa60365b9 [0.0.4] 2015-07-09 13:43:42 -07:00
James Ide 4d37c1f73a Comment out the scrollTo adjustment when the refresh completes
Feels less janky without this. We should probably animate the contentInset instead.
2015-07-09 13:42:33 -07:00
James Ide 95d19d1b27 0.0.3 2015-07-08 19:06:38 -07:00
James Ide f7d174fbe5 Don't hide the indicator unless we're not refreshing and progress = 0
Progress can be zero even if we're refreshing, in which case we still want to show the indicator.
2015-07-08 19:05:56 -07:00
James Ide 9e80086616 Don't start a second refresh until the user has lifted their finger after the first completed
You could get into an aggressive flurry of refreshes if you pulled down to refresh, then kept your finger down while the refresh completes, and then moved your finger a bit to trigger another refresh.

Fix this by requiring the user to have lifted their finger (i.e. for the gesture responder to have stopped tracking) after the refresh completes before allowing a second one.
2015-07-08 15:12:39 -07:00
James Ide 967fd2f2b4 Hide the refresh indicator until the user has started scrolling
This is so that an empty scroll view doesn't show the indicator.
2015-07-08 12:21:05 -07:00
James Ide 17f7554223 [0.0.2] 2015-07-08 02:10:51 -07:00
James Ide 7d2af08b28 Get the pull to refresh behavior working
Lots of fixes, especially around using the native adjusted content inset.
2015-07-07 00:39:30 -07:00
James Ide 40a383309e Developing... 2015-07-06 16:15:21 -07:00
James Ide 07c82e1d6c [README] Update readme to mention WIP status 2015-07-06 15:56:16 -07:00
James Ide 91191c8858 Use let instead of var in more places 2015-07-06 15:52:19 -07:00
James Ide fa2d2a7ec8 Use cloneReferencedElement and fix scroll component composition 2015-07-06 02:24:26 -07:00
James Ide 1a97c031b7 Use a composed callback refs for the refresh indicator 2015-07-05 23:28:21 -07:00
James Ide 56c6453e83 Use function to render refresh indicator, rename delegate fn to renderScrollComponent 2015-07-05 21:54:56 -07:00
James Ide 0deee37a66 Update license info to standard MIT 2015-05-27 22:23:24 -07:00
James Ide 345659d5a6 Update package.json 2015-05-27 22:15:23 -07:00
James Ide 5b2a4b3ccd Mention custom patches
These are needed for composition.
2015-05-19 22:57:10 -07:00
James Ide 5893d3a2d9 Update npm description 2015-05-19 21:55:21 -07:00
James Ide bac6667519 Add source files and a package.json 2015-05-19 21:54:44 -07:00
James Ide cc3a6e1c78 Initial commit 2015-04-08 14:29:24 -07:00