Commit Graph

18 Commits

Author SHA1 Message Date
Fred Liu ab52de6300 More sensitive swipe gesture recognition
Summary: I noticed sometimes the swipeable row prioritizes the list view's vertical scroll too much, or returns to closed position if swiped a little distance but at high velocity. These new thresholds help both cases.

Reviewed By: hedgerwang

Differential Revision: D3441994

fbshipit-source-id: 84a9fdf63a33b3047a9a0205e87d8c489e9a6631
2016-06-15 19:13:31 -07:00
Fred Liu 88f08ec99a quick actions resize when campaign card resizes
Reviewed By: zjj010104

Differential Revision: D3427226

fbshipit-source-id: da8f3a8e399be45afef7e6ba10cb16c7c025c078
2016-06-13 16:58:24 -07:00
Fred Liu 78485a36ba Slower bounce
Summary: Slower bounce during mount and right swipe, so it feels less jarring to users.

Reviewed By: hedgerwang

Differential Revision: D3420169

fbshipit-source-id: d5da87c4a64eecf478edd626c96f5541ab94b56e
2016-06-10 17:28:52 -07:00
Fred Liu c99fb9cb9b More bounce
Summary: Bounce more

Reviewed By: ejanzer

Differential Revision: D3411697

fbshipit-source-id: 6d21b4b0f2637ac0a290b372cb22ec1b0ca38f60
2016-06-09 10:43:51 -07:00
Fred Liu 381a0051c7 Swipeables documentation
Summary: So users can know how to use

Reviewed By: hedgerwang

Differential Revision: D3399028

fbshipit-source-id: 5ce97c5464f1975145aba1bcf4b79550394859ae
2016-06-07 11:58:38 -07:00
Fred Liu 4868948175 NUX-y bounce
Summary: On mount, bounce the 1st row so users know it's swipeable.

Reviewed By: fkgozali

Differential Revision: D3395214

fbshipit-source-id: 6d391209014a6a7957a2160734d8ef6548b7693b
2016-06-07 09:13:21 -07:00
Fred Liu 26a92220c2 Allow some right swipe
Summary: Allow some right swipe so users know swiping is a possibility, with some bounceback.

Reviewed By: fkgozali

Differential Revision: D3388836

fbshipit-source-id: 596a6be3c641ff0ee6ac32d7c0d798478edef72b
2016-06-06 14:58:59 -07:00
Geoff Lawson 2fd537c55d Incorrect import reference of emptyFunction causes error when importi…
Summary:
Experimental component SwipeableListView fails to import due to incorrect import reference.  Followed example use of import of emptyFunction found in https://github.com/facebook/react-native/blob/master/Libraries/Components/TextInput/TextInput.js#L31
Closes https://github.com/facebook/react-native/pull/7954

Differential Revision: D3394202

fbshipit-source-id: db8ddc9d9635878f0ce1fb969ef6c6e3c27d63f3
2016-06-06 13:58:24 -07:00
Fred Liu c1ab766096 Disable right-swipe from closed position
Summary: Disables right-swipe from closed position.

Reviewed By: fkgozali

Differential Revision: D3368525

fbshipit-source-id: b850458bd088dfda09bbbe4db71b33c3577a2167
2016-05-31 16:28:22 -07:00
Basil Hosmer ac5636dd59 explicit type args in react-native-github
Reviewed By: vjeux

Differential Revision: D3342856

fbshipit-source-id: ba5a4d5529fc9d1d1efe98cc175d718c5f044a5b
2016-05-24 18:28:26 -07:00
Fred Liu ca71143ff4 Faster animation
Summary: Reduce auto-swipe animation duration to 200 ms to increase swipe speed.

Reviewed By: zjj010104

Differential Revision: D3333942

fbshipit-source-id: a9e0b15926ef854adcd9e1d2c1e67fd080139d84
2016-05-23 10:28:34 -07:00
Fred Liu 3ccfb58701 Simplify SwipeableRow styling
Summary: - Removed some styling from `SwipeableRow` that wasn't doing much and made slide out view full height

Reviewed By: fkgozali

Differential Revision: D3322849

fbshipit-source-id: 811eee9032c142c61d303ae7e966d8ef7903adaf
2016-05-19 21:43:42 -07:00
Fred Liu 62e588bece Fix Android flash and iOS juttering
Summary:
Before:
- Android had the slideout row flash upon render due to it being rendered first
- iOS had the left side of each row load first, then rerender to show entire row when `scrollViewWidth` is available

Reason:
- Android was loading the slideout view first without an opacity check
- iOS was loading the swipeable view with width 0 first then stretching to `scrollViewWidth` when it was available via `onLayout`

Fix:
Render swipeable view with `flex: 1` then render slideout view

Reviewed By: fkgozali

Differential Revision: D3321466

fbshipit-source-id: 92a3b5e22034e06d05986ddb8c348796bafbbf34
2016-05-19 21:43:42 -07:00
Fred Liu 12fcacb58f Full width styling for quick actions
Summary: - Used absolute positioning to render full-width quick actions

Reviewed By: fkgozali

Differential Revision: D3302467

fbshipit-source-id: cdcac88b20eff7a71be1ab8bb39e6888216dad84
2016-05-17 01:43:27 -07:00
Fred Liu c779e233b6 Improve SwipeableListView performance
Summary:
- Removed unnecessary rerending of `SwipeableListView` by properly managing `SwipeableListViewDataSource`
- Simplified `SwipeableRow` logic and improved swiping performance
- Added bounce effect
- Locked `ListView` from being scrollable when `SwipeableRow` is being swiped; behaviour mirrors that of Android on iOS and significantly improves framerates

Reviewed By: fkgozali

Differential Revision: D3307599

fbshipit-source-id: 168b6b72ef1f9e47d0145cf9e1baecbab3564b84
2016-05-16 20:28:27 -07:00
Fred Liu 052cd7eb8a SwipeableListView
Summary:
- Updated SwipeableListView to be much more performant by checking `rowHasChanged` more vigorously
- New `SwipeableListViewDataSource` used to mask implementation details from caller

Reviewed By: fkgozali

Differential Revision: D3272172

fbshipit-source-id: 02f66ed7fce7d587118ad7d82b20f8e78db44b7b
2016-05-11 00:25:20 -07:00
Fred Liu 2132ad1441 Swipeable list view enhancements
Summary:
- Removes "flickering" on first load
- Takes in Map<rowID, slideoutView> to display customs slideout view in `SwipeableRowListView`

Reviewed By: furdei

Differential Revision: D3267262

fb-gh-sync-id: a89806138b9172b3c184cc117504e205632a36d0
fbshipit-source-id: a89806138b9172b3c184cc117504e205632a36d0
2016-05-05 20:45:24 -07:00
Fred Liu 2a7f6aeda7 Swipeable row container
Reviewed By: hedgerwang

Differential Revision: D3263983

fb-gh-sync-id: f77bb3dd7771c16e1f26398171b7784e3d89cb1d
fbshipit-source-id: f77bb3dd7771c16e1f26398171b7784e3d89cb1d
2016-05-05 11:49:29 -07:00