callstack / callstack/react-native-pager-view

Rendering in ScrollView makes gestures hard to be picked up on Android

オープン
#606 コメント 5 件 リアクション 4 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
3.4k
フォーク
476
平均マージ
10日 21時間
マージ済み PR(30日)
2

説明

## Environment

Android
react-native: 0.66.4
react-native-pager-view: 5.4.15

## Description

Running into a couple of issues when rendering pager view inside ScrollView on Android.
1. Swiping diagonally at a small angle - 10-20 degrees - gets captured by scrollview and not pager view.
2. Swiping horizontally while the the scroll still has momentum doesn't get captured by pager view.3.

These issues combined make a terrible user experience on Android.

| Diagonal swipe | Scroll momentum |
|:--------------------------:|:-------------------------:|
| ![ezgif-3-9b2f3ca01b](https://user-images.githubusercontent.com/10097195/190983276-7d64ef2a-5a50-4c4e-81b5-0a164c159731.gif) | ![ezgif-3-6767ceb422](https://user-images.githubusercontent.com/10097195/190983313-d325c31e-91ed-491f-835b-84d3940307e1.gif) |

## Reproducible Demo

https://snack.expo.dev/D1avOzeAs?platform=android

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Android 上でリンクされている再現可能な Expo Snack デモから始め、issue に記載されている斜めスワイプとスクロールの慣性の両方のケースを再現します。React Native PagerView と周囲の ScrollView がジェスチャーをどのように処理するかを追跡します; 水平方向の pager スワイプが、スクロールを壊すことなく両方の状況で確実に捕捉されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, react-native, typescript
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。