From aa0ad7326a3bb47ae19ef08ab589fd415bb9436b Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Mon, 9 Nov 2026 18:25:53 -0500 Subject: [PATCH] feat(mobile): adapt tablet layouts to unfolded iPhone Duo --- apps/mobile/README.md | 9 +- apps/mobile/app/(app)/(tabs)/_layout.tsx | 37 +- .../app/(app)/(tabs)/home/album/[id].tsx | 4 +- .../app/(app)/(tabs)/home/artist/[id].tsx | 4 +- .../app/(app)/(tabs)/home/browse/albums.tsx | 4 +- .../app/(app)/(tabs)/home/browse/artists.tsx | 13 +- .../(app)/(tabs)/home/browse/playlists.tsx | 4 +- .../app/(app)/(tabs)/home/browse/songs.tsx | 10 +- apps/mobile/app/(app)/(tabs)/home/index.tsx | 9 +- .../app/(app)/(tabs)/home/playlist/[id].tsx | 7 +- .../(app)/(tabs)/home/playlist/favorites.tsx | 7 +- apps/mobile/app/(app)/(tabs)/home/queue.tsx | 4 +- .../app/(app)/(tabs)/home/recently-added.tsx | 4 +- .../app/(app)/(tabs)/home/recently-played.tsx | 4 +- .../mobile/app/(app)/(tabs)/home/settings.tsx | 4 +- .../mobile/app/(app)/(tabs)/library/index.tsx | 4 +- apps/mobile/app/(app)/player.tsx | 9 +- apps/mobile/components/media-cards.tsx | 3 +- apps/mobile/components/player.tsx | 11 +- apps/mobile/components/search-results.tsx | 4 +- apps/mobile/components/skeletons.tsx | 6 +- apps/mobile/components/tab-screen-content.tsx | 2 +- apps/mobile/components/tablet-media-grid.tsx | 4 +- apps/mobile/components/tablet-now-playing.tsx | 403 +++++++++--------- apps/mobile/contexts/android-tab-theme.tsx | 9 +- apps/mobile/hooks/use-tablet-layout.ts | 8 +- apps/mobile/native/TabletSidebar.swift | 2 +- apps/mobile/package.json | 13 +- package.json | 2 +- ...atch => react-native-screens@4.30.1.patch} | 0 pnpm-lock.yaml | 276 +++++++----- 31 files changed, 507 insertions(+), 373 deletions(-) rename patches/{react-native-screens@4.30.0.patch => react-native-screens@4.30.1.patch} (100%) diff --git a/apps/mobile/README.md b/apps/mobile/README.md index 5ca7e20..6ce1a29 100644 --- a/apps/mobile/README.md +++ b/apps/mobile/README.md @@ -43,9 +43,14 @@ thumbnail, while sharing the original HTTPS URL. Receiving apps control whether they display previews. If artwork cannot load, the URL is still shared. Existing builds without the native sharing module fall back to URL-only sharing. -### iPad sidebar +### Adaptive iOS sidebar -Expo Router owns navigation through `NativeTabs sidebarAdaptable`. +Expo Router owns navigation through `NativeTabs sidebarAdaptable`. Expanded iOS +windows prefer sidebar placement, including the unfolded iPhone Duo. Compact +windows use the phone player accessory and player layout. Layout selection uses +the current window dimensions rather than the device's iPad identifier. +Horizontal safe areas protect content from the sidebar and either rail edge, +and player spacing updates as the window folds or resizes. `native/TabletSidebar.swift` adds UIKit Library and Playlists groups and the pinned account footer, which the current Expo Router API does not expose. The bridge reuses the router's tab instances so each destination retains its navigation stack. diff --git a/apps/mobile/app/(app)/(tabs)/_layout.tsx b/apps/mobile/app/(app)/(tabs)/_layout.tsx index 512741d..16a62fa 100644 --- a/apps/mobile/app/(app)/(tabs)/_layout.tsx +++ b/apps/mobile/app/(app)/(tabs)/_layout.tsx @@ -119,6 +119,13 @@ function TabsContent() { ) : null} = 27 + ? tabletLayout + ? "sidebar" + : "automatic" + : undefined + } blurEffect={ tabColors.blurEffect as "systemChromeMaterialDark" | "systemChromeMaterialLight" @@ -180,7 +187,10 @@ function TabsContent() {