callstack / callstack/react-native-paper

[Android] Menu flashes when opening

未关闭
#4,814 5 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
TypeScript
星标
14.5k
派生
2.2k
平均合并
5 天 23 小时
30 天内合并 PR
12

描述

### 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

贡献指南

打开贡献指南

调研方向

首先,在报告的 React Native Paper 5.14.5 环境中使用 Android emulator,通过 visible=true 复现菜单打开过程,然后检查 patches/react-native-paper+5.14.5.patch,尤其是其中引用的更改。确认原因,而不是依赖 1 ms 的延迟;当在报告的低性能场景中打开菜单不再闪烁时,工作即完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, react-native, typescript
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。