callstack / callstack/react-native-paper

[Android] Menu flashes when opening

Đang mở
#4,814 5 bình luận 7 reaction 0 người được giao Xem trên GitHub
bug
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ả

### Current behaviour
The menu component flashes when opening the menu via `visible=true`. I think this is actually not observable in production builds (with a Samsung S21) but rather in poor performance scenarios (dev, emulator)

### Expected behaviour
The menu doesnt flash

### How to reproduce?
show a menu

### Preview
the video only shows the menu flashing once; in the actual emulator it flashes every time when the menu opens

https://github.com/user-attachments/assets/37fa7177-a05e-4a21-bdac-718822acc5bd

### What have you tried so far?

[add](https://github.com/lovegaoshi/azusa-player-mobile/blob/2648f55f4cb6c6dd72433a871a63249cbed79d1e/patches/react-native-paper%2B5.14.5.patch#L9)
```
await new Promise(resolve => setTimeout(resolve, 1));
```
fixes this issue; unfortunately I learned enough from experience to know this works but cant tell why.

### Your Environment

| software | version
| --------------------- | -------
| ios | n/a
| android | 36
| react-native | 0.81.4
| react-native-paper | 5.14.5
| node | 22
| npm or yarn | yarn v4
| expo sdk | 54

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

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

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện việc mở menu với visible=true trên một Android emulator bằng môi trường React Native Paper 5.14.5 được báo cáo, sau đó kiểm tra patches/react-native-paper+5.14.5.patch, đặc biệt là thay đổi được tham chiếu. Hãy xác nhận nguyên nhân thay vì dựa vào độ trễ 1 ms; công việc hoàn tất khi việc mở menu không còn nhấp nháy trong kịch bản hiệu năng kém được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, react-native, typescript
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
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.