react / react/react-native

Sticky views have visual glitches while scrolling in ScrollView

未关闭
#45,546 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Component: ScrollView Issue: Author Provided Repro Needs: Triage :mag:
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

The views that specified as "sticky" in ScrollView have visual glitches while scrolling programmatically.

Steps to reproduce
  1. Install the Snack on a physical device
  2. Press the "Scroll to 1000" button
  3. Press the "Scroll to 5000" button
React Native Version

0.74.3

Affected Platforms

Runtime - Android, Build - Linux

Output of npx react-native info
System:
  OS: Linux 5.15 Arch Linux
  CPU: (8) x64 Intel(R) Core(TM) i3-10100F CPU @ 3.60GHz
  Memory: 5.20 GB / 7.71 GB
  Shell:
    version: 5.2.26
    path: /usr/bin/bash
Binaries:
  Node:
    version: 20.15.1
    path: ~/.nvm/versions/node/v20.15.1/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.15.1/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.15.1/bin/npm
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java: Not Found
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
Stacktrace or Logs
None
Reproducer

https://snack.expo.dev/@michail_shcherbakov/sticky-view-glitches

Screenshots and Videos

https://github.com/user-attachments/assets/9b93783e-4d85-4000-bcec-87870cfd1446

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的 Snack reproducer 和 React Native ScrollView 实现开始,重点关注 Android 上程序化滚动期间的 sticky views。在实体设备上重现这两个滚动操作;当滚动到 1000、然后滚动到 5000 时 sticky views 始终保持视觉稳定,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。