fix(omnibox): preserve selected favorite borders (#441)
* fix(omnibox): preserve selected favorite borders * fix(omnibox): preserve minimal favorite hairline
- commit
- caafe10a5dd68306dd559557824846c8d97a94b7
- author
- bnema · · 2026-09-15 16:08 UTC
- committer
- GitHub · · 2026-09-15 16:08 UTC
- parent
- a015def
- signature
- GPG Unverified
B5690EEEBB952194The key is unknown
3 files · +32 -0
M CHANGELOG.md +1 -0
| @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. | |||
| 24 | 24 | ||
| 25 | 25 | ### Fixed | |
| 26 | 26 | ||
| 27 | + | - **Omnibox favorite selection**: Selected favorite rows retain their yellow left indicator in every visual style. | |
| 27 | 28 | - **Popup and floating-pane stability**: Hardened deferred popup cleanup, failed popup creation, opener-capable fallback behavior, and pane/window rollback paths. | |
| 28 | 29 | - **WebView resource cleanup**: Fixed stale callback, timer, tick, split, hover-controller, and rebuilt-WebView ownership paths that could leak resources or act on detached views. | |
| 29 | 30 | - **CEF rendering and input**: Improved OSR input and clipboard handling, effective visibility transitions, canvas presentation, repeated GPU relaunch recovery, and runtime propagation to helper processes. | |
| @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. | |||||
| 24 | 24 | ||||
| 25 | ### Fixed | 25 | ### Fixed | ||
| 26 | 26 | ||||
| 27 | + | - **Omnibox favorite selection**: Selected favorite rows retain their yellow left indicator in every visual style. | |||
| 27 | - **Popup and floating-pane stability**: Hardened deferred popup cleanup, failed popup creation, opener-capable fallback behavior, and pane/window rollback paths. | 28 | - **Popup and floating-pane stability**: Hardened deferred popup cleanup, failed popup creation, opener-capable fallback behavior, and pane/window rollback paths. | ||
| 28 | - **WebView resource cleanup**: Fixed stale callback, timer, tick, split, hover-controller, and rebuilt-WebView ownership paths that could leak resources or act on detached views. | 29 | - **WebView resource cleanup**: Fixed stale callback, timer, tick, split, hover-controller, and rebuilt-WebView ownership paths that could leak resources or act on detached views. | ||
| 29 | - **CEF rendering and input**: Improved OSR input and clipboard handling, effective visibility transitions, canvas presentation, repeated GPU relaunch recovery, and runtime propagation to helper processes. | 30 | - **CEF rendering and input**: Improved OSR input and clipboard handling, effective visibility transitions, canvas presentation, repeated GPU relaunch recovery, and runtime propagation to helper processes. | ||
M internal/ui/theme/css.go +13 -0
| @@ -567,6 +567,11 @@ entry.omnibox-entry.omnibox-entry-bang-active:focus-visible > text { | |||
| 567 | 567 | box-shadow: 0.1875em 0 0 var(--accent) inset; | |
| 568 | 568 | } | |
| 569 | 569 | ||
| 570 | + | .omnibox-style-multiplexer .omnibox-row.omnibox-row-favorite:selected { | |
| 571 | + | border-left-color: var(--warning); | |
| 572 | + | box-shadow: 0.1875em 0 0 var(--warning) inset; | |
| 573 | + | } | |
| 574 | + | ||
| 570 | 575 | .omnibox-style-multiplexer .omnibox-favorite-star { | |
| 571 | 576 | min-width: 1.25em; | |
| 572 | 577 | margin: 0 0.375em 0 0.125em; | |
| @@ -632,6 +637,10 @@ entry.omnibox-entry.omnibox-entry-bang-active:focus-visible > text { | |||
| 632 | 637 | border-left-color: transparent; | |
| 633 | 638 | } | |
| 634 | 639 | ||
| 640 | + | .omnibox-style-command .omnibox-row.omnibox-row-favorite:selected { | |
| 641 | + | border-left: 0.1875em solid var(--warning); | |
| 642 | + | } | |
| 643 | + | ||
| 635 | 644 | .omnibox-style-command .omnibox-favorite-star { | |
| 636 | 645 | min-width: 1.25em; | |
| 637 | 646 | margin: 0 0.375em 0 0.125em; | |
| @@ -689,6 +698,10 @@ entry.omnibox-entry.omnibox-entry-bang-active:focus-visible > text { | |||
| 689 | 698 | font-family: var(--font-mono); | |
| 690 | 699 | } | |
| 691 | 700 | ||
| 701 | + | .omnibox-style-minimal .omnibox-row.omnibox-row-favorite:selected { | |
| 702 | + | border-left: 0.125em solid var(--warning); | |
| 703 | + | } | |
| 704 | + | ||
| 692 | 705 | .omnibox-style-minimal .omnibox-favorite-star { | |
| 693 | 706 | color: var(--warning); | |
| 694 | 707 | opacity: 0.85; | |
| @@ -567,6 +567,11 @@ entry.omnibox-entry.omnibox-entry-bang-active:focus-visible > text { | |||||
| 567 | box-shadow: 0.1875em 0 0 var(--accent) inset; | 567 | box-shadow: 0.1875em 0 0 var(--accent) inset; | ||
| 568 | } | 568 | } | ||
| 569 | 569 | ||||
| 570 | + | .omnibox-style-multiplexer .omnibox-row.omnibox-row-favorite:selected { | |||
| 571 | + | border-left-color: var(--warning); | |||
| 572 | + | box-shadow: 0.1875em 0 0 var(--warning) inset; | |||
| 573 | + | } | |||
| 574 | + | ||||
| 570 | .omnibox-style-multiplexer .omnibox-favorite-star { | 575 | .omnibox-style-multiplexer .omnibox-favorite-star { | ||
| 571 | min-width: 1.25em; | 576 | min-width: 1.25em; | ||
| 572 | margin: 0 0.375em 0 0.125em; | 577 | margin: 0 0.375em 0 0.125em; | ||
| @@ -632,6 +637,10 @@ entry.omnibox-entry.omnibox-entry-bang-active:focus-visible > text { | |||||
| 632 | border-left-color: transparent; | 637 | border-left-color: transparent; | ||
| 633 | } | 638 | } | ||
| 634 | 639 | ||||
| 640 | + | .omnibox-style-command .omnibox-row.omnibox-row-favorite:selected { | |||
| 641 | + | border-left: 0.1875em solid var(--warning); | |||
| 642 | + | } | |||
| 643 | + | ||||
| 635 | .omnibox-style-command .omnibox-favorite-star { | 644 | .omnibox-style-command .omnibox-favorite-star { | ||
| 636 | min-width: 1.25em; | 645 | min-width: 1.25em; | ||
| 637 | margin: 0 0.375em 0 0.125em; | 646 | margin: 0 0.375em 0 0.125em; | ||
| @@ -689,6 +698,10 @@ entry.omnibox-entry.omnibox-entry-bang-active:focus-visible > text { | |||||
| 689 | font-family: var(--font-mono); | 698 | font-family: var(--font-mono); | ||
| 690 | } | 699 | } | ||
| 691 | 700 | ||||
| 701 | + | .omnibox-style-minimal .omnibox-row.omnibox-row-favorite:selected { | |||
| 702 | + | border-left: 0.125em solid var(--warning); | |||
| 703 | + | } | |||
| 704 | + | ||||
| 692 | .omnibox-style-minimal .omnibox-favorite-star { | 705 | .omnibox-style-minimal .omnibox-favorite-star { | ||
| 693 | color: var(--warning); | 706 | color: var(--warning); | ||
| 694 | opacity: 0.85; | 707 | opacity: 0.85; | ||
M internal/ui/theme/css_test.go +18 -0
| @@ -302,6 +302,24 @@ func cssBorderWidthEm(t *testing.T, block string) float64 { | |||
| 302 | 302 | return width | |
| 303 | 303 | } | |
| 304 | 304 | ||
| 305 | + | func TestGenerateCSS_SelectedFavoritesKeepWarningBorderInEveryStyle(t *testing.T) { | |
| 306 | + | css := GenerateCSS(DefaultDarkPalette()) | |
| 307 | + | ||
| 308 | + | for _, style := range []string{"multiplexer", "command", "minimal"} { | |
| 309 | + | selectedSelector := ".omnibox-style-" + style + " .omnibox-row:selected" | |
| 310 | + | favoriteSelector := ".omnibox-style-" + style + " .omnibox-row.omnibox-row-favorite:selected" | |
| 311 | + | favoriteBlock := cssRuleBlock(t, css, favoriteSelector) | |
| 312 | + | assert.Contains(t, favoriteBlock, "var(--warning)", style) | |
| 313 | + | assert.Greater(t, strings.Index(css, favoriteSelector), strings.Index(css, selectedSelector), style) | |
| 314 | + | } | |
| 315 | + | ||
| 316 | + | minimal := cssRuleBlock(t, css, ".omnibox-style-minimal .omnibox-row.omnibox-row-favorite:selected") | |
| 317 | + | assert.Contains(t, minimal, "border-left: 0.125em solid var(--warning);") | |
| 318 | + | ||
| 319 | + | multiplexer := cssRuleBlock(t, css, ".omnibox-style-multiplexer .omnibox-row.omnibox-row-favorite:selected") | |
| 320 | + | assert.Contains(t, multiplexer, "box-shadow: 0.1875em 0 0 var(--warning) inset;") | |
| 321 | + | } | |
| 322 | + | ||
| 305 | 323 | func TestGenerateCSS_OmniboxIncludesVisualConcepts(t *testing.T) { | |
| 306 | 324 | css := GenerateCSS(DefaultDarkPalette()) | |
| 307 | 325 | ||
| @@ -302,6 +302,24 @@ func cssBorderWidthEm(t *testing.T, block string) float64 { | |||||
| 302 | return width | 302 | return width | ||
| 303 | } | 303 | } | ||
| 304 | 304 | ||||
| 305 | + | func TestGenerateCSS_SelectedFavoritesKeepWarningBorderInEveryStyle(t *testing.T) { | |||
| 306 | + | css := GenerateCSS(DefaultDarkPalette()) | |||
| 307 | + | ||||
| 308 | + | for _, style := range []string{"multiplexer", "command", "minimal"} { | |||
| 309 | + | selectedSelector := ".omnibox-style-" + style + " .omnibox-row:selected" | |||
| 310 | + | favoriteSelector := ".omnibox-style-" + style + " .omnibox-row.omnibox-row-favorite:selected" | |||
| 311 | + | favoriteBlock := cssRuleBlock(t, css, favoriteSelector) | |||
| 312 | + | assert.Contains(t, favoriteBlock, "var(--warning)", style) | |||
| 313 | + | assert.Greater(t, strings.Index(css, favoriteSelector), strings.Index(css, selectedSelector), style) | |||
| 314 | + | } | |||
| 315 | + | ||||
| 316 | + | minimal := cssRuleBlock(t, css, ".omnibox-style-minimal .omnibox-row.omnibox-row-favorite:selected") | |||
| 317 | + | assert.Contains(t, minimal, "border-left: 0.125em solid var(--warning);") | |||
| 318 | + | ||||
| 319 | + | multiplexer := cssRuleBlock(t, css, ".omnibox-style-multiplexer .omnibox-row.omnibox-row-favorite:selected") | |||
| 320 | + | assert.Contains(t, multiplexer, "box-shadow: 0.1875em 0 0 var(--warning) inset;") | |||
| 321 | + | } | |||
| 322 | + | ||||
| 305 | func TestGenerateCSS_OmniboxIncludesVisualConcepts(t *testing.T) { | 323 | func TestGenerateCSS_OmniboxIncludesVisualConcepts(t *testing.T) { | ||
| 306 | css := GenerateCSS(DefaultDarkPalette()) | 324 | css := GenerateCSS(DefaultDarkPalette()) | ||
| 307 | 325 | ||||