Skip to content

Polish search bar into a unified, focus-accented field - #41

Merged
kaihuang1425 merged 1 commit into
mainfrom
claude/pr-review-app-redesign-qzizrc
Jun 21, 2026
Merged

Polish search bar into a unified, focus-accented field#41
kaihuang1425 merged 1 commit into
mainfrom
claude/pr-review-app-redesign-qzizrc

Conversation

@kaihuang1425

@kaihuang1425 kaihuang1425 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Summary

Continues the app's visual revamp by giving the central search bar a deliberate, theme-correct treatment instead of a bare QLineEdit. No behavior changes to search parsing/results — purely presentation plus a reliability fix for focus/popup handling.

What changed (widgets/search_bar.py)

  • Unified search field — the input is now wrapped in a bordered searchField container with a leading magnifier glyph (AppIcons.ACT_SEARCH) and a borderless input, so the control reads as one cohesive element. Built entirely from existing spacing/radius design tokens.
  • Accent-on-focus — the field border and glyph light up with the theme's focus/accent color on focus (and the background lifts from surface_alt to surface), mirroring the branded treatment landed in Polish startup splash and empty-state visuals #39/Polish game card visuals: status pill, accent tag chips, theme-correct select #40.
  • Reliable focus + popup handling — focus lands on the nested line edit, not the parent widget, so the previous parent-level focusInEvent/keyPressEvent overrides were effectively dead. Replaced with an event filter on the input that drives the focus styling, shows suggestions, and handles Esc/Down. The suggestions popup is now anchored under the new field container.
  • Removed the now-unused QKeyEvent import (no net-new ruff warnings — count went 6 → 5).

Process notes

Per the task, I first handled outstanding PRs. The only open/unmerged PR was #40 — it had no review or general comments to reply to, all 4 CI checks were green, and it was mergeable_state: clean, so I merged it into main (no conflicts). This branch is built on that updated main.

Testing

  • Full suite green: PYTHONPATH=src pytest src/tests/278 passed.
  • py_compile clean; ruff check --select E,W,F introduces no new warnings.
  • Styling is token-driven/mechanical, consistent with the established pattern (the full UI can't be imported under the Linux CI Qt mocks).

Continue the visual revamp by giving the central search control a
deliberate, theme-correct treatment instead of a bare QLineEdit.

- Wrap the input in a bordered "searchField" container with a leading
  magnifier glyph (AppIcons.ACT_SEARCH), so the control reads as one
  cohesive element using the existing spacing/radius tokens.
- Light up the field border and glyph with the accent/focus color on
  focus, mirroring the branded treatment landed in #39/#40.
- Anchor the suggestions popup under the new field container and track
  focus/keys via an event filter on the nested input (focus now lands on
  the child line edit, so the prior parent-level overrides were unreliable).

Removed the now-unused QKeyEvent import (no net-new ruff warnings).

Testing: PYTHONPATH=src pytest src/tests/ -> 278 passed; py_compile clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DWWK5LbP1moZf5tPbo5QHm
@kaihuang1425
kaihuang1425 merged commit 5a06bd4 into main Jun 21, 2026
4 checks passed
kaihuang1425 added a commit that referenced this pull request Jun 30, 2026
…-qzizrc

Polish search bar into a unified, focus-accented field
kaihuang1425 added a commit that referenced this pull request Jun 30, 2026
Bring the multi-select batch toolbar in line with the app's visual
revamp (search bar #41, game card #40, filter chips #42). Presentation
only — every signal, slot, and selection behavior is untouched.

- Accent-emphasized selection count ("<n> games selected", number in
  the accent color) with correct singular/plural noun.
- Action buttons (Set Status / Add Tag / Add to Collection) gain icons
  and a clean neutral-to-accent hover/pressed treatment; the Set Status
  dropdown hides the native menu indicator in favor of its own chevron
  glyph, and the status menu entries carry their semantic status icons.
- Select All / Clear recede to shared ghost-button styling since they
  are selection plumbing, not primary actions.
- "Done" becomes the primary filled-accent pill that closes batch mode.
- Slim vertical dividers separate logical button groups, and the
  floating surface gains a subtle accent border so the bar reads as a
  distinct, temporary mode over the grid.
- All spacing/radius/color come from existing theme tokens.
@kaihuang1425
kaihuang1425 deleted the claude/pr-review-app-redesign-qzizrc branch June 30, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants