Skip to content

Header search improvements - #19

Merged
gcgoncalves merged 3 commits into
mainfrom
search-adjustments
Aug 13, 2026
Merged

Header search improvements#19
gcgoncalves merged 3 commits into
mainfrom
search-adjustments

Conversation

@a-effort

@a-effort a-effort commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary
Style, interaction, and accessibility update to the header search. Also fixes a responsive bug that hid the search entirely on smaller screens.

Changes

  • Collapsed state icon plus a filled shortcut chip instead of a 62px input pill with an outlined badge floated on top of it. The input collapses to w-0.
  • The ⌘ symbol is lucide's Command glyph rather than a text character; Windows/Linux still get a text Ctrl. getQuickNavShortcutLabel becameisAppleShortcutPlatform and returns a boolean instead of a prebuilt string.
  • Expanded field: 300px at md, 400px at lg (md:w-75 lg:w-100)
  • Results dropdown matches at w-75 lg:w-100, up from a fixed w-80.
  • The native ::-webkit-search-cancel-button (system-accent blue, unthemeable) is suppressed via appearance-none, replaced by a lucide X button that clears the query and returns focus.
  • The dropdown's "Searching…" state drops the anvil Loading spinner and now renders identically to the other status messages.
  • The dropdown no longer opens over the input's expand animation. Both it and aria-expanded derive from a single isResultsOpen that requires a query.
  • One role="status" live region now stays mounted for the component's lifetime and mirrors dropdown state, including a new result-count announcement. Previously results arrived silently after "Searching…".
  • The search was hidden md:block while the sidebar collapses at 768px, so it disappeared exactly when the nav collapsed. Now visible at all widths, with the shortcut chip hidden below md and a 50vw cap on the expanded field.
  • GitHub and docs links hide below sm, matching the version label, to give the search room on narrow viewports.
  • Added common.search.clear and common.search.resultCount to en-US, es-ES, and pt-BR.
search.mp4

Test plan

  • Collapsed search matches the Figma frame in light and dark themes
  • ⌘K / Ctrl+K focuses and expands; correct modifier renders per platform
  • Dropdown stays closed when clicking the magnifier, opens on first keystroke
  • Clear button appears with a query, clears it, and returns focus
  • Expanded field and dropdown are 300px / 400px at md / lg
  • Resize under 768px: search remains visible, chip hidden, no overflow
  • Resize under 640px: GitHub and docs links hidden
  • Screen reader announces "Searching…", result counts, and empty/error states
  • npm run build, tsc --noEmit, and the layout suite (55 tests) pass

Known follow-ups

@a-effort
a-effort marked this pull request as ready for review August 13, 2026 04:59
a-effort and others added 3 commits August 12, 2026 22:22
Signed-off-by: Anna Effort <anna.effort@ibm.com>
Signed-off-by: Anna Effort <anna.effort@ibm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Anna Effort <anna.effort@ibm.com>

@gcgoncalves gcgoncalves left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excelent! 👏

@gcgoncalves
gcgoncalves merged commit 4185482 into main Aug 13, 2026
5 checks passed
@gcgoncalves
gcgoncalves deleted the search-adjustments branch August 13, 2026 09:11
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