Skip to content

Unify search UI pattern across Guides, Pack Templates, and Trips screens#2266

Merged
mikib0 merged 6 commits into
developmentfrom
copilot/update-search-ui-patterns
Apr 21, 2026
Merged

Unify search UI pattern across Guides, Pack Templates, and Trips screens#2266
mikib0 merged 6 commits into
developmentfrom
copilot/update-search-ui-patterns

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

Guides, Pack Templates, and Trips screens used an older or incomplete search pattern. Updated all three to match the inline search pattern used in Packs and Catalog screens.

Changes

GuidesListScreen

  • Wrap search results in LargeTitleHeaderSearchContentContainer within searchBar.content
  • Add renderSearchContent() with result count, loading states, and empty states
  • Hide category filters during active search
  • Set iosHideWhenScrolling: false to persist search bar

PackTemplateListScreen

  • Wrap search results in LargeTitleHeaderSearchContentContainer within searchBar.content
  • Add renderSearchContent() with result count and empty states
  • Hide featured packs section during active search
  • Set iosHideWhenScrolling: false to persist search bar

TripsListScreen

  • Wrap search results in LargeTitleHeaderSearchContentContainer within searchBar.content
  • Add renderSearchContent() with result count and empty states
  • Display TripCard components for each matching trip in search results
  • Set iosHideWhenScrolling: false to persist search bar

Translation keys

  • Added guides: searchGuides, result, results
  • Added packTemplates: searchPlaceholder, searchTemplates, tryDifferentSearch, result, results
  • Added trips: searchPlaceholder, result, results

Pattern

<LargeTitleHeader
  searchBar={{
    iosHideWhenScrolling: false,
    onChangeText: handleSearch,
    content: (
      <LargeTitleHeaderSearchContentContainer>
        {isSearching ? <SearchResults /> : <Placeholder />}
      </LargeTitleHeaderSearchContentContainer>
    ),
  }}
/>

Trip location search unchanged - it's a map-based location picker, not a list search screen.

@mikib0
Copy link
Copy Markdown
Collaborator

mikib0 commented Apr 21, 2026

@copilot TripListScreen

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 21, 2026

@copilot TripListScreen

Updated TripListScreen to follow the same improved search pattern as Guides and Pack Templates screens (commit e6dcad7).

Changes:

  • Added renderSearchContent() that shows search results inline within the search bar
  • Displays result count when searching (e.g., "3 results")
  • Shows empty state with icon and message when no results found
  • Added iosHideWhenScrolling: false for better UX
  • Added searchPlaceholder prop
  • Added translation keys: trips.searchPlaceholder, trips.result, trips.results

The search now displays results within the search bar overlay, matching the pattern across all list screens in the app.

Copilot AI changed the title Unify search UI pattern across Guides and Pack Templates screens Unify search UI pattern across Guides, Pack Templates, and Trips screens Apr 21, 2026
Copilot AI requested a review from mikib0 April 21, 2026 08:47
@mikib0 mikib0 marked this pull request as ready for review April 21, 2026 09:02
@mikib0
Copy link
Copy Markdown
Collaborator

mikib0 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 21, 2026

@copilot type check is failing https://github.com/PackRat-AI/PackRat/actions/runs/24712970372/job/72284498143?pr=2266

Fixed in commit 36e6d90.

The issue was that packId in TripForm could be null (from the form schema), but the Trip and TripInput types expect string | undefined. Added normalization to convert null to undefined before calling updateTrip or createTrip.

@mikib0 mikib0 merged commit 74a3824 into development Apr 21, 2026
6 of 8 checks passed
@mikib0 mikib0 deleted the copilot/update-search-ui-patterns branch April 21, 2026 10:30
andrew-bierman pushed a commit that referenced this pull request May 14, 2026
…terns

Unify search UI pattern across Guides, Pack Templates, and Trips screens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants