mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-10-16 06:25:42 -04:00
refactor(native): centralize navigation header configuration into dedicated stack components
Replace the `useTabScreenOptions` hook (and its `.android` variant) with a `TabStack` component that encapsulates all tab-level header styling in one place. Introduce `AuthStackHeader` and `DetailStackHeader` components to own header configuration for auth and detail screens respectively, removing scattered `Stack.Screen options` overrides from individual screen files.
- Delete `use-tab-screen-options.tsx` and `use-tab-screen-options.android.tsx`; all four tab layouts now render `<TabStack title="…" />` instead of manually composing `<Stack screenOptions={useTabScreenOptions()}>`.
- Add `AuthStackHeader` and swap every `<Stack.Screen options={{ title: "…" }}>` inside auth screens for it; strip the now-redundant header option overrides from the auth `_layout`.
- Add `DetailStackHeader` and remove the hardcoded `headerTransparent`/`headerTintColor`/`headerBackButtonDisplayMode` options from the title and person detail routes in `_layout.tsx`.
- Replace remaining `Stack.Screen options={{ title }}` patterns in non-tab screens (`change-password`, `+not-found`) with the `Stack.Screen.Title` helper.
- Refactor the search screen to use `Stack.Header`, `Stack.Screen.Title`, and `Stack.SearchBar` instead of an inline `Stack.Screen options` object; add `placement` and `allowToolbarIntegration` for the iOS integrated search bar.
- Add `browseTitleIds` server procedure and extend `explore` / `discover` procedures; add corresponding schema fields in `@sofa/api`.
This commit is contained in:
33 files changed
+367
-241
No files matched your search
@@ -451,6 +451,10 @@ export const PersonCreditSchema = z
|
||||
/** Reusable TMDB browse result (trending / popular / discover items) */
|
||||
export const TmdbBrowseItem = z
|
||||
.object({
|
||||
id: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe("Internal title ID when the title already exists locally"),
|
||||
tmdbId: z.number().describe("TMDB numeric ID"),
|
||||
type: mediaType,
|
||||
title: z.string().describe("Display title"),
|
||||
@@ -690,6 +694,10 @@ export const TrendingOutput = z
|
||||
items: z.array(TmdbBrowseItem).describe("Trending titles"),
|
||||
hero: z
|
||||
.object({
|
||||
id: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe("Internal title ID when the title already exists locally"),
|
||||
tmdbId: z.number().describe("TMDB numeric ID"),
|
||||
type: mediaType,
|
||||
title: z.string().describe("Display title"),
|
||||
|
||||
Reference in new issue
Block a user