fix(menu): Preferences… from the title-bar menu throws "Looking up a deactivated widget's ancestor is unsafe"
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
lib/features/main_screen/querya_window_title_bar.dart、lib/shared/widgets/querya_context_menu.dart:58-67、lib/shared/widgets/app_dialog.dart:25を読み、メニューのコールバックのコンテキストがダイアログにどう渡るかをたどってください。実際のポインタークリックで問題を再現し、メニューを開いて項目をタップする、提案されたウィジェットテストを追加してください。非アクティブ化されたコンテキストに関するアサーションが発生せずにダイアログが開けば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
Choosing Edit → Preferences… in the title-bar menu throws in the scheduler callback (seen in a debug run, Linux):
Looking up a deactivated widget's ancestor is unsafe.
#3 Localizations.of
#6 MaterialLocalizations.of
#7 showAppDialog (lib/shared/widgets/app_dialog.dart:25)
#8 showPreferencesDialog (lib/features/settings/preferences_dialog.dart:30)
#9 QueryaWindowTitleBar.build.<anonymous closure> (lib/features/main_screen/querya_window_title_bar.dart:251)
#10 QueryaMenuItem.build.<anonymous closure> (lib/shared/widgets/querya_context_menu.dart:65)
#11 _MenuItemButtonState._handleSelect
QueryaMenuItem passes its own context to onPressed(ctx). By the time showAppDialog runs (the menu closes first, the call lands in a frame callback) that element is deactivated, so MaterialLocalizations.of(context) asserts. In a release build the assertion is off, so the symptom there is not known; it was not checked.
Not reproduced through a semantic tap (it calls onPressed before the menu closes); it needs a real pointer click. "Go to Object…" and the other items use the same ctx, so they may have the same problem; not checked.
Proposal
Open the dialog with a context that outlives the menu (the title bar's own context or the root navigator, as _dialogAnchorContext in connection_creation_flow.dart does), or give QueryaMenuItem a context that is still mounted. Add a widget test that opens a menu, taps the item and expects the dialog.
Where
lib/features/main_screen/querya_window_title_bar.dart(theonPressed: (ctx) => ...items)lib/shared/widgets/querya_context_menu.dart:58-67- `lib/shared/widgets/app_dialog.dart:25
- 主要言語
- Dart
- スター
- 23
- フォーク
- 1
- 平均マージ
- 49分
- マージ済み PR(30日)
- 496
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QueryaHub/Querya-Desktop のほかの issue
-
bug P3 ux
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
QueryaHub/Querya-Desktop#1837 ·
メンテナーはふだん 1 日以内に返信
-
enhancement P3
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
QueryaHub/Querya-Desktop#1838 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
QueryaHub/Querya-Desktop#1690 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
QueryaHub/Querya-Desktop#1683 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
QueryaHub/Querya-Desktop#1625 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
QueryaHub/Querya-Desktop の issue をすべて見る
似ている issue
-
fix: jaspr serve keyboard shortcuts (r/R/l/d/q) don't work on Windows対応中かも @lewinpauli が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
berkmancenter/frankly#729 ·
メンテナーはふだん 1 日以内に返信
-
ORMオープンBackend SW VTA
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
aau-giraf/visual-tangible-artefacts#376 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Baseflow/flutter-geocoding#324 ·