[Feature request] Native footer slot pinned to the sheet's visible bottom edge
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- react-native
- Lĩnh vực
- mobile
Hướng nghiên cứu
Start by tracing the existing surface slot and content-region inset implementation, then inspect the native positioning path that keeps the sheet aligned during dragging, snapping, resizing, and keyboard avoidance. Define how a footer prop would integrate with those paths and with detached sheets. Done means the footer remains pinned without Reanimated and content can scroll above it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What
A footer prop on BottomSheet / ModalBottomSheet — a sibling to the existing surface slot — that renders a React-composed view pinned to the sheet's visible bottom edge natively, staying frame-perfect while the sheet is dragged, snapped, or resized.
<BottomSheet
index={index}
onIndexChange={setIndex}
surface={/* ... */}
footer={
<View style={styles.footer}>
<Button title="Confirm" onPress={onConfirm} />
</View>
}
>
{/* scrollable content */}
</BottomSheet>
Ideally the content region would also account for the footer's height (similar to how the content-region inset works today), so scrollables inside the sheet can scroll their last items above the footer rather than behind it.
Why
A fixed action area (confirm/cancel buttons, a total-price bar, a "add to cart" CTA) is one of the most common bottom-sheet compositions, and there is currently no first-class way to build one:
- Absolutely positioning a footer inside the sheet content doesn't work during drags: the sheet container is translated natively, so a content-anchored footer moves off-screen with it as the sheet collapses, and content-size updates go through the shadow tree asynchronously.
- The documented position-tracking approach (onPositionChange + wrapNativeView={Animated.createAnimatedComponent} + a useEvent worklet) can counter-translate a footer on the UI thread, and it works well — but it reintroduces a Reanimated dependency and per-frame handler work for what is arguably core sheet composition. Not requiring Reanimated is one of this library's stated advantages over @gorhom/bottom-sheet.
- Rendering the footer outside the sheet as a screen-bottom sibling loses modal layering (it sits below the scrim/portal), keyboard avoidance, and show/hide coordination with the sheet.
For comparison, @gorhom/bottom-sheet ships BottomSheetFooter for exactly this reason, and it's one of its most-used building blocks. Since this library already moves positioning into native code and already has the surface slot precedent, a natively pinned footer seems like a natural fit for the architecture: the native host knows the visible bottom edge every frame (including during springs and keyboard avoidance), so it can hold the footer there with no JS involvement.
Things that would need defining (happy to discuss):
- Interaction with keyboard avoidance — presumably the footer rides above the keyboard with the sheet.
- Interaction with the detached / floating-card sheets proposed in #58, where the visible bottom edge is lifted by bottomInset.
- Whether the footer's height feeds 'content' detent sizing.
If this sounds reasonable, I'd be glad to help test it, or take a shot at a PR if maintainers can offer some pointers on the preferred native approach.
- Ngôn ngữ chính
- Kotlin
- Star
- 536
- Fork
- 24
- Merge trung bình
- 12 giờ 10 phút
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 software-mansion/react-native-bottom-sheet
-
Android: NoSuchElementException in ScrollIndicators.refit when a scroll view is garbage collectedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
software-mansion/react-native-bottom-sheet#140 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
software-mansion/react-native-bottom-sheet#137 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Feature request: opt-in native keyboard avoidanceCó thể đã có người làm @Asad-Butt đã nhận 5 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
software-mansion/react-native-bottom-sheet#134 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
software-mansion/react-native-bottom-sheet#132 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
software-mansion/react-native-bottom-sheet#74 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của software-mansion/react-native-bottom-sheet
Issue tương tự
-
Remove Collect againĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
thisisartman/Meguri#211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
follow-up
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:android fleet
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
emm3000/myGame#2175 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày