MIL-003 task 8: keep keyboard focus in the answer dialog #31

Merged
Tirsvad merged 2 commits from mil-003-dialog-focus into main 2026-10-13 10:26:10 +02:00
Owner

Keeps keyboard focus in the answer dialog. After a wrong answer the reopened dialog had no focus (Tk focus_get() was None), so the player had to click it. The dialog is lifted and focus is forced onto it and its entry each time it opens.

Adds task 8 to MIL-003, with RC-014 (code) and RC-015 (milestone re-review). Both are Go, with the AI as stand-in for S01 at S01's instruction; not independent.

Checks run locally and in CI: ruff, mypy --strict, 38 pytest tests, doxygen. ask_state_name needs a display and is verified only by a throwaway focus script.

Closes #32

Keeps keyboard focus in the answer dialog. After a wrong answer the reopened dialog had no focus (Tk `focus_get()` was `None`), so the player had to click it. The dialog is lifted and focus is forced onto it and its entry each time it opens. Adds task 8 to MIL-003, with RC-014 (code) and RC-015 (milestone re-review). Both are Go, with the AI as stand-in for S01 at S01's instruction; not independent. Checks run locally and in CI: ruff, mypy --strict, 38 pytest tests, doxygen. `ask_state_name` needs a display and is verified only by a throwaway focus script. Closes #32
Tirsvad added 2 commits 2026-10-13 10:22:49 +02:00
After a wrong answer the reopened dialog had no keyboard focus. The dialog is
lifted and focus is forced onto it and its entry each time it opens.

Task: MIL-003#8
Resolve pending commit links for MIL-003, RC-014 and RC-015
Run tests / Lint, type check and test (pull_request) Successful in 48s
b417dee37e
Tirsvad merged commit b9641b8fa5 into main 2026-10-13 10:26:10 +02:00
Tirsvad deleted branch mil-003-dialog-focus 2026-10-13 10:26:13 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tirsvad-Udemy-100-days-of-code/025-us-states-game#31