measurement y values for nodes used in stickyHeaderIndices do not match it's sticky positioning
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Description
When a node which is included in a list that specifies it in it's stickyHeaderIndices is measured via it's ref using measure or measureInWindow, the y and pageY values reflect the node's original coordinates and do not account for it's sticky positioning.
Steps to reproduce
- Scroll a list until the node(s) in
stickyHeaderIndicesbecome sticky - Measure the sticky node via it's ref
Expected:
Coordinates reflect it's current, sticky position on the screen or in the viewport, like how it works on the legacy architecture.
Actual:
Coordinates reflect it's original positioning, not accounting for it's sticky position, so once the element becomes sticky due to scroll the y values will be negative.
React Native Version
0.79.2
Affected Platforms
Runtime - iOS
Areas
Other (please specify), Fabric - The New Renderer
Output of npx @react-native-community/cli info
System:
OS: macOS 14.6.1
CPU: (12) arm64 Apple M2 Pro
Memory: 154.50 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.19.1
path: /usr/local/bin/node
Yarn:
version: 1.22.19
path: ~/.yarn/bin/yarn
npm:
version: 10.8.2
path: /usr/local/bin/npm
Watchman:
version: 2024.09.09.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.11.3
path: /Users/adamhari/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11330709
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.7.6
path: /Users/adamhari/.rvm/rubies/ruby-2.7.6/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.2
wanted: 0.79.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
n/a
MANDATORY Reproducer
https://snack.expo.dev/@adamhari-kashoo/measure-y-value-incorrect-for-element-in-stickyheaderindices
Screenshots and Videos
https://github.com/user-attachments/assets/cec10b97-ac2e-4931-b920-0fe045725f38
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách chạy trình tái hiện Snack bắt buộc trên iOS và so sánh các phép đo trước và sau khi một node trong stickyHeaderIndices trở thành sticky. Điều tra hành vi đo lường của Fabric đối với measure và measureInWindow, sử dụng kết quả của kiến trúc legacy làm tham chiếu mong đợi. Hoàn tất khi các tọa độ y và pageY được báo cáo phản ánh vị trí sticky hiện tại của node thay vì vị trí ban đầu của nó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, react-native
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100