List jumping when sliding using maintainVisibleContentPosition on Android
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
I use maintainVisibleContentPosition in the chat list. When sliding to view older chat messages, if a new message (Especially very long messages, exceeding the height of the screen) is inserted into the list, the (android) list will jump, but iOS will not.
I can reproduce it using the latest RN 0.72.6 and wrote a demo.
https://github.com/Rays15/flatlist-demo
https://github.com/facebook/react-native/assets/17613135/d8872f9c-489e-4b83-bcbf-4205191504b7
@janicduplessis Can this be fixed?
React Native Version
0.72.6
Output of npx react-native info
System:
OS: macOS 14.0
CPU: (12) arm64 Apple M2 Max
Memory: 1.95 GB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 16.15.1
path: ~/.nvm/versions/node/v16.15.1/bin/node
Yarn:
version: 1.22.19
path: ~/.nvm/versions/node/v16.15.1/bin/yarn
npm:
version: 8.11.0
path: ~/.nvm/versions/node/v16.15.1/bin/npm
Watchman:
version: 2023.08.14.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10406996
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.20
path: /Users/rays/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Steps to reproduce
https://github.com/Rays15/flatlist-demo
Snack, screenshot, or link to a repository
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、リンクされている flatlist-demo を React Native 0.72.6 で実行し、古いメッセージをスライドしているときに Android でジャンプする現象を再現します。Android における maintainVisibleContentPosition の処理を追跡し、iOS の動作と比較します。非常に長いメッセージを挿入しても Android で表示位置が予期せず変わらなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100