[Android] Menu flashes when opening

未關閉
#4,814 5 則留言 7 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
42/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
android, react-native, typescript
領域
mobile

研究方向

首先,在回報的 React Native Paper 5.14.5 環境中使用 Android emulator,透過 visible=true 重現選單開啟過程,然後檢查 patches/react-native-paper+5.14.5.patch,尤其是其中參照的變更。確認原因,而不是依賴 1 ms 的延遲;當在回報的低效能情境中開啟選單不再閃爍時,工作即完成。

由索引模型根據 Issue 內容生成。

描述

bug
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

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
主要語言
TypeScript
星號
14.5k
分支
2.3k
平均合併
3 天 14 小時
30 天內合併 PR
12

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

callstack/react-native-paper 的其他 Issue

查看 callstack/react-native-paper 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。