callstack / callstack/react-native-slider
iOS: Slider sometimes does not mount at full width
- Ngôn ngữ chính
- TypeScript
- Star
- 1.4k
- Fork
- 295
- Merge trung bình
- 5 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
## Environment
* react-native info output:
```
// react-native info
npmPackages:
"@react-native-community/cli":
installed: 15.1.3
wanted: ^15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.77.3
wanted: ^0.77.0
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
```
## Description
On initial mount of a new component that contains a slider, the slider will very rarely not expand to full width even though we have styled it as such. Here's a screenshot:
In this example the slider is being set with an initial value of 3.6 (out of 5.0), but you can see the actual track of the slider is only rendering at less than half the width that it should be. Note that we render the tick-marks ourselves, not via the repo, but they show that we expect the slider to be full width. The slider still functions normally at this point, allowing selection of values 0 to 5 but only along this tiny track. 98% of the time when pushing this screen it appears normally...this just appears to be an odd race condition.
This only started happening after I upgraded from RN 0.76 to 0.77 and enabled the new architecture, and upgraded slider from 4.5.0 to 5.0.1. I suspect it's related to new arch.
## Reproducible Demo
Not reproducible every time so this is tough. But it's a slider with `style={{ width: '100%' }}` set and the component is presented via a react-native-navigation (wix) modal
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lần mount ban đầu của slider trong một modal của react-native-navigation trên React Native 0.77 với kiến trúc mới được bật, sử dụng style={{ width: '100%' }} và giá trị ban đầu là 3.6. Điều tra hành vi layout của slider trong quá trình mount; được xem là hoàn thành khi track luôn được render với chiều rộng đầy đủ trong khi vẫn giữ cách chọn thông thường từ 0 đến 5.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- 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
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100