[iOS] pager content getting cropped on version 8.0.4
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ios, react-native, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi propagateSafeArea() từ PageChildViewController và so sánh với hồi quy được issue #1085 đưa vào. Tái hiện layout Fabric iOS với một trang có chiều cao thay đổi, sau đó xác minh rằng inset dưới vẫn ổn định và nội dung không bị cắt trong lần render đầu tiên cũng như sau khi relayout.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
react-native-pager-view: 8.0.4 (regression from 8.0.2)
react-native: 0.81.1
Architecture: Fabric (New Architecture)
Platform: iOS
Device: iPhone 16 Pro, portrait (reproduces on any device with a home-indicator safe area)
Tab bar: custom React Native bottom tab (not the system UITabBar)
Description
Regression in 8.0.4, introduced by #1085.
After upgrading 8.0.2 → 8.0.4, page content is cropped at the bottom on first render and only corrects after the first scroll.
Root cause (confirmed with native logging inside PageChildViewController):
propagateSafeArea() walks up to the nearest ancestor with a non-zero safe area and copies its safeAreaInsets into additionalSafeAreaInsets. The picked source is consistently the same view (_UIHostingView<_ViewList_View>), but its safeAreaInsets.bottom is not stable during layout — it flickers 49 → 24.33 while the hosting view's height settles through intermediate passes (730 → 681 → 656.66).
propagateSafeArea() samples this value mid-relayout and pins the transient 24.33, cropping the content. The 0.5pt guard doesn't help, since 49 → 24.33 is a large delta (the guard only prevents infinite layout loops, not incorrect values). A manual scroll forces a clean relayout back to 49, which is why the crop disappears after scrolling.
Trigger: the initial layout pass on first mount, and again whenever the page is relaid out. The inset is read while the hosting view's layout is still settling, so an intermediate value gets applied.
Expected: content uses the correct, stable bottom inset (49) on first render.
Actual: content is cropped using a transient inset (24.33) until the first scroll.
Reproducible Demo
Fabric app with a PagerView whose page contains a scrollable list.
The page is rendered inside a view whose height changes during initial layout (below a collapsing header or header height changes during layout).
On first load, the bottom of the content is cut off. Scroll once and it corrects.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.4k
- Fork
- 485
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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.
Issue khác của callstack/react-native-pager-view
-
iOS: PagerScrollDelegate proxies to itself and overflows the stack when the weak originalDelegate diesCó thể đã có người làm @lvlrSajjad đã nhận 34 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
callstack/react-native-pager-view#1146 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
callstack/react-native-pager-view#1144 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
callstack/react-native-pager-view#1141 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
callstack/react-native-pager-view#1081 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[iOS 15] Tab indicator does not update when switching pages after SwiftUI migration (v8)Có thể đã có người làm @d-mato đã nhận 3 ngày trước. Đang mởios
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
callstack/react-native-pager-view#1080 · 2 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstack/react-native-pager-view
Issue tương tự
-
area:security documentation effort:S priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
app:web meta:ops
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
osu-tournament-rating/otr#1113 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
typegoose/mongodb-memory-server#1040 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100