Repository navigation
fix(ui): Escape closes the innermost thing, and a closed dropdown is outlined - #75
Merged
Merged
Conversation
…outlined The owner's alpha walk of 2026-10-22 on v0.38.0 (G16): - AW3, AW19: the window's Escape knew the palette, the notifications, a settings page and the drawer only, so over a dialog it closed the drawer behind it or did nothing. Every overlay now registers what Escape does over it as it shows (escape.go: onEscape, onShown); the window's escape runs the top one's, an overlay without one takes the key. Every Fyne dialog is shown through sh.showDialog (Escape is its Dismiss), a framed dialog hides (its SetOnClosed answers no), the pop-ups, the palette, the notifications, the MCP details and the top bar's menus close. - Fyne hands a key to the focused widget only: the fields of Cogpit's dialogs are types that pass an Escape on (fieldEntry, fieldSelectEntry, fieldCheck, fieldSlider, secretEntry), so Escape cancels a dialog whatever field has the keyboard. - AW4: a list's search is cleared and the table gets the keys; the find bar closes from its fields and from the editor (yamlview's OnEscape). D-57's "any other search" had been the navigator's only. - AW2: Escape on an open dropdown's list takes the keyboard off the field, and a dropdown with the keyboard passes Escape on. - AW1: a closed dropdown draws an entry's outline; the field outline token is raised to 2:1 on every surface in both themes, the wells' and cards' edges keep the old value as colorHairline. TestEveryDialogTakesEscape reads the sources for a dialog or pop-up shown past the mechanism. D-116 and D-104 record the lead's decisions; G16, ui-parity, usage, architecture, conventions and the design language say so.
hans-fischer
force-pushed
the
fix/escape-closes-innermost
branch
from
October 22, 2026 15:43
31d152a to
6592c95
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Escape findings and the dropdown field of the owner's alpha walk (2026-10-22, v0.38.0): AW1 (a closed dropdown has the background's colour), AW2 (an open dropdown's Escape leaves the field focused), AW3 (Escape over the Rollback confirmation closes the drawer instead), AW4 (Escape leaves neither the find bar nor a list's search) and AW19 (Connection Updates does not close with Escape). G16, D-116, D-104.
Cause
Fix
escape.go: every overlay registers what Escape does over it as it shows. The window'sescaperuns the top one's, else a settings page, else the drawer. An overlay without a registration takes the key, so nothing behind it closes.sh.showDialog. Framed dialogs hide (theirSetOnClosedanswers no). Pop-ups, the palette, the notifications, the MCP details and the top bar's menus close.fieldEntry,fieldSelectEntry,fieldCheck,fieldSlider,secretEntry,selectField.yamlview.OnEscape); its text stays for the next ⌘F.colorHairline.Tests
TestEscapeCancelsTheRollbackDialog,TestEscapeOnAnOpenDropdown,TestEscapeOnAnOpenDropdownInPreferences,TestEscapeClosesTheConnectionUpdates,TestEscapeClosesTheFindBar,TestEscapeLeavesTheListSearch,TestEscapeCancelsEveryDialog,TestClosedDropdownHasAnOutline, and the field outline inTestPaletteContrast.TestEveryDialogTakesEscapeis a source guard. It fails on a Fyne dialog shown with its ownShowor a pop-up not shown throughonShown; checked against a revertedconnectlog.goandstatusfilter.go.go build ./...,go vet ./internal/ui/...,make test-ui(8 shards), yamlview tests, golangci-lint (0 issues),make cyclo(none above 56),go run ./hack/parity -check.Renders
The outline token is shared chrome, so every render was drawn once more. 523 PNGs changed:
make showcase) are not redrawn.Before and after (offscreen render, dark)