Feature: Functional global search in header #6

Closed
opened 2026-04-26 08:15:03 +00:00 by TopherMayor · 0 comments
Owner

Summary

The search bar in the main layout header (src/app/(main)/layout.tsx) has local state but never triggers search. Make it functional.

Implementation

  1. Create a shared search context or use URL params:

    • Typing in header search navigates to /explore?search=query
    • Explore page reads search from URL search params
    • This makes search shareable/bookmarkable
  2. Update Explore page to read initial search from URL params

  3. Sync header search with explore page search (bidirectional)

  4. Add search suggestions/dropdown (optional, can be separate issue)

Files

  • Modify: src/app/(main)/layout.tsx (header search bar)
  • Modify: src/app/(main)/explore/page.tsx (read URL params)
  • May need: shared context/hook for search state

Acceptance Criteria

  • Typing in header search navigates to explore with results
  • Search query appears in URL params
  • Explore page reads initial state from URL
  • Back/forward browser navigation works
## Summary The search bar in the main layout header (`src/app/(main)/layout.tsx`) has local state but never triggers search. Make it functional. ## Implementation 1. **Create a shared search context** or use URL params: - Typing in header search navigates to `/explore?search=query` - Explore page reads `search` from URL search params - This makes search shareable/bookmarkable 2. **Update Explore page** to read initial search from URL params 3. **Sync header search** with explore page search (bidirectional) 4. **Add search suggestions/dropdown** (optional, can be separate issue) ## Files - Modify: `src/app/(main)/layout.tsx` (header search bar) - Modify: `src/app/(main)/explore/page.tsx` (read URL params) - May need: shared context/hook for search state ## Acceptance Criteria - [ ] Typing in header search navigates to explore with results - [ ] Search query appears in URL params - [ ] Explore page reads initial state from URL - [ ] Back/forward browser navigation works
TopherMayor added this to the v0.4 - Search & Polish milestone 2026-04-26 08:15:03 +00:00
TopherMayor added the featurefrontend labels 2026-04-26 08:15:03 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TopherMayor/comparaison#6