Skip to content

redesign search trigger as wide input pill - #680

Merged
Flotapponnier merged 1 commit into
devfrom
feat/header-search-bar
Jun 24, 2026
Merged

redesign search trigger as wide input pill#680
Flotapponnier merged 1 commit into
devfrom
feat/header-search-bar

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #677 — the pill-redesign + lint fix landed after the merge so they need a new PR.

  • Search trigger now reads as a real input: soft surface, rule border, max-width 440px, takes a flex-1 zone between nav and utilities (CMC-style).
  • Platform shortcut badge (⌘K / Ctrl K) removed. `useSyncExternalStore` machinery gone with it.
  • Side fix: `useEffect(() => setOpen(false), [pathname])` in site-header.tsx removed. It triggered the `react-hooks/set-state-in-effect` rule that's now failing CI on dev (PR fix(template) + header redesign (CMC-style + sub-nav) #677 merged despite the red lint). Mobile nav items already call `setOpen(false)` in their own onClick, so closing on route change works without the effect.

Test plan

  • Visit any page on the Preview URL → search trigger reads as a proper input (light grey background, border, placeholder "Search benchmarks, products…").
  • No `⌘K` / `Ctrl K` badge.
  • `pnpm lint` passes (was failing on dev).
  • Cmd+K / Ctrl+K shortcut still opens the dialog.
  • Mobile menu closes on link tap.

- Desktop trigger now looks like a real search field: soft surface,
  rule border, max-width 440px so it stretches across the header
  between nav and utilities (CMC-style).
- Drop the platform shortcut hint entirely; Cmd+K / Ctrl+K still
  work but advertising one or the other ships the wrong copy to half
  the audience.
- Header layout: nav links left of search, search in a flex-1 zone,
  utilities (github + theme) right. The pipe separator was already
  gone; this commit just gives the search the room it deserves.
@Flotapponnier
Flotapponnier merged commit 2a83c23 into dev Jun 24, 2026
1 check passed
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.

1 participant