callstack / callstack/react-native-paper

[Android] Menu flashes when opening

オープン
#4,814 コメント 5 件 リアクション 7 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
14.5k
フォーク
2.2k
平均マージ
5日 23時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。