fix(mobile): line loading skeletons up with loaded screens #110

Merged
joshuafhiggins merged 1 commits from t3/clean-up-loading-skeletons into main 2026-11-16 22:08:00 -05:00
Owner

Loading skeletons still carried leftovers from #66: a non-scrolling ScrollView wrapper and an embedded flag threaded through three components. Their layout also drifted from the loaded screens, so content jumped when data arrived (wrong row heights on album/playlist pages, missing divider, no tablet card height).

Changes

  • One SkeletonScreen view replaces both wrappers. It reserves useHeaderHeight() on iOS (transparent header), uses no top padding on Android (opaque header), and clips with overflow: hidden so nothing draws past screen edges.
  • CollectionDetailSkeleton takes a variant (album, playlist, favorites, artist) in place of zoomCoverSize/round, and mirrors each loaded layout: album track rows, inset song rows, CollectionDivider, landscape tablet hero.
  • TextLine sizes to the text line box for a given fontSize, so loaded text lands where the placeholder was.
  • MediaGridSkeleton takes the list header (Library) and matches the FlatList gap and tablet card height (tabletCardTextHeight is now shared with TabletMediaGrid).

Verification

  • tsc --noEmit in apps/mobile passes.
  • iPhone 18 Pro (iOS 27.2), real loading flow: album skeleton stays below the nav bar, and the cover, title, action row and track rows line up with the loaded page to within about a pixel.
  • Not verified: Android and iPad/tablet skeletons. On the Android emulator, pages rendered loaded on the first frame even with network throttling, so no skeleton appeared. Playlist, favorites and artist skeletons were also not caught on iOS because their data was already cached.

Changes made by Claude Opus 5.5 via Claude Code (T3 Code harness).

🤖 Generated with Claude Code

Loading skeletons still carried leftovers from #66: a non-scrolling `ScrollView` wrapper and an `embedded` flag threaded through three components. Their layout also drifted from the loaded screens, so content jumped when data arrived (wrong row heights on album/playlist pages, missing divider, no tablet card height). ## Changes - One `SkeletonScreen` view replaces both wrappers. It reserves `useHeaderHeight()` on iOS (transparent header), uses no top padding on Android (opaque header), and clips with `overflow: hidden` so nothing draws past screen edges. - `CollectionDetailSkeleton` takes a `variant` (`album`, `playlist`, `favorites`, `artist`) in place of `zoomCoverSize`/`round`, and mirrors each loaded layout: album track rows, inset song rows, `CollectionDivider`, landscape tablet hero. - `TextLine` sizes to the text line box for a given `fontSize`, so loaded text lands where the placeholder was. - `MediaGridSkeleton` takes the list `header` (Library) and matches the `FlatList` gap and tablet card height (`tabletCardTextHeight` is now shared with `TabletMediaGrid`). ## Verification - `tsc --noEmit` in `apps/mobile` passes. - iPhone 18 Pro (iOS 27.2), real loading flow: album skeleton stays below the nav bar, and the cover, title, action row and track rows line up with the loaded page to within about a pixel. - Not verified: Android and iPad/tablet skeletons. On the Android emulator, pages rendered loaded on the first frame even with network throttling, so no skeleton appeared. Playlist, favorites and artist skeletons were also not caught on iOS because their data was already cached. --- Changes made by Claude Opus 5.5 via Claude Code (T3 Code harness). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
joshuafhiggins added 1 commit 2026-11-16 21:35:53 -05:00
Replace the non-scrolling ScrollView wrapper and `embedded` flag left from
#66 with a single SkeletonScreen view that reserves the iOS header height
and clips at screen edges. Collection skeletons now mirror the loaded
layouts (inset song rows, album track rows, divider, tablet grid card
height) so content lands in place when data arrives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joshuafhiggins merged commit 0887808b42 into main 2026-11-16 22:08:00 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joshuafhiggins/otunes#110