callstack / callstack/react-native-paper

React Native 0.73 supports `transformOrigin` which can potentially fix TextInput issues

Đang mở
#4,341 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
14.5k
Fork
2.2k
Merge trung bình
5 ngày 23 giờ
Pull request đã merge (30 ngày)
12

Mô tả

See related source code:
https://github.com/callstack/react-native-paper/blob/813cdd47a90ee3bb693c6ec143af73092cd3edae/src/components/TextInput/Label/InputLabel.tsx#L62

See React Native 0.73 docs mentioning `transformOrigin` https://reactnative.dev/docs/0.73/transforms#transform-origin

It means we do not need to move TextInput label with [translateX](https://github.com/callstack/react-native-paper/blob/813cdd47a90ee3bb693c6ec143af73092cd3edae/src/components/TextInput/Label/InputLabel.tsx#L63) to adjust label position after [scaling](https://github.com/callstack/react-native-paper/blob/813cdd47a90ee3bb693c6ec143af73092cd3edae/src/components/TextInput/Label/InputLabel.tsx#L102). Most likely `translateX` was needed b/c transform origin was always related to `center` before v0.73. Now we can set it `left` and remove `translateX` position adjustments.

Related issues:
https://github.com/callstack/react-native-paper/issues/4245
https://github.com/callstack/react-native-paper/issues/4299
https://github.com/callstack/react-native-paper/issues/4340
and possibly more related issues reporting TextInput label flickering..

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with src/components/TextInput/Label/InputLabel.tsx, especially the transform at lines 62, 63, and 102, then compare it with the React Native 0.73 transformOrigin documentation. Review related issues 4245, 4299, and 4340 for the reported label behavior. Done means validating the proposed transformOrigin approach and confirming that TextInput label positioning and flickering issues are addressed.

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, typescript
Lĩnh vực
mobile
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 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
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.