fix(ui): Escape that closes a menu also cancels an in-flight Move

Chiusa
#95 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #223 di @cristim — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
desktop

Direzione di ricerca

The Escape cancel is gated only on !files.is_modal() in src/app/panels.rs (around lines 31-33), so start with cancel_on_escape there and find how shortcuts check for an open popup (Popup::is_any_open). Add the same popup check to the shared native path. Done means Escape with the File menu open closes only the menu while Move stays active and the status is unchanged, a second Escape still cancels, and the Status Line T1 pinned test is updated. The regression test should use real key events.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/ui-parity effort/s good first issue impact/many priority/p2 severity/medium triaged type/bug urgency/this-sprint

Problem

Pressing Escape while any menu or popup is open (for example the File menu) also runs the editor's Escape handling (cancel_on_escape): it cancels an in-flight Move and rewrites the status to "Edit cancelled". The user only meant to close the menu.

Current behavior

src/app/panels.rs (around lines 31-33) gates the Escape cancel only on !files.is_modal(), not on whether an egui popup/menu is open (Popup::is_any_open). Same on main. Found while testing the Status Line menu-set combo; the Status Line T1 test pins the current behavior so a fix flips it deliberately.

Expected

Escape with a menu or popup open closes the popup only; Move and drafts are untouched and the status is unchanged. Escape with no popup open keeps the current cancel behavior.

Acceptance

  • Gate the Escape cancel on no open popup/menu (same predicate shortcuts use), in the shared native path.
  • Regression test with real key events: Move in flight, open File menu, Escape -> menu closes, Move still active, status unchanged; second Escape cancels as today. Update the Status Line T1 pinned test intentionally.
  • Guard ledger note if Escape handling is documented there.
Lingua principale
Rust
Stelle
4
Fork
2
Merge medio
9h 11m
PR unite (30g)
181

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cristim/AztecCraft

Tutte le issue di cristim/AztecCraft

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.