`flexGrow: 1` inside `alignItems: <non-stretch>` covers siblings
Đang mở
Chưa có ai nhận issue này.
Component: ScrollView
Issue: Author Provided Repro
Needs: Triage :mag:
Newer Patch Available
- 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
Android:
React Native Version
0.72.5
Output of npx react-native info
> npx react-native info
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.22621
CPU: "(12) x64 AMD Ryzen 5 5600 6-Core Processor "
Memory: 16.28 GB / 31.91 GB
Binaries:
Node:
version: 20.2.0
path: C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm:
version: 9.7.2
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio:
- 17.5.33424.131 (Visual Studio Community 2022)
Languages:
Java:
version: 11.0.20.1
path: C:\Program Files\Eclipse Adoptium\jdk-11.0.20.101-hotspot\bin\javac.EXE
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.5
wanted: 0.72.5
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Steps to reproduce
import { View, Text } from 'react-native';
export default function App() {
return (
<View>
<View style={{ alignItems: 'center', }}>
<View style={{ backgroundColor: 'red' }}>
<View style={{ flexGrow: 1 }}>
<Text>foo</Text>
</View>
</View>
<Text>foo</Text>
<Text>foo</Text>
<Text>foo</Text>
<Text>foo</Text>
</View>
</View>
);
}
Snack, screenshot, or link to a repository
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 tái hiện bố cục trong Expo Snack được liên kết bằng cấu hình React Native 0.72.5 đã được báo cáo, tập trung vào alignItems được đặt thành giá trị khác stretch và view flexGrow lồng nhau. So sánh kết quả hiển thị trên Android với bố cục dự kiến của các phần tử cùng cấp; được xem là hoàn thành khi phần tử con có flexGrow không còn che các phần tử cùng cấp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, 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
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100