Skip to content

Push profile/tag taps inside the detail overlay

jedmund requested to merge jedmund/detail-user-tap-nav into main

Created by: jedmund

Summary

  • Wrap IllustDetailOverlay in its own NavigationStack(path:) and register ProfileDestination / PixivIllust.Tag destinations on it. IllustDetailContent's user-row and tag-pill buttons were reading \.pushDestination from an env that resolved to nil (the overlay is a sibling of TabView, not a child of any tab's NavigationStack), so both taps were silent no-ops. Setting the env on the overlay's own stack makes Back return to the same detail view — pager position, scroll offset, matched-geometry hero all preserved.
  • Gate the close button and bookmark on pathIsRoot so they hide once a destination is pushed; the pushed view's nav bar back button takes over.
  • Keep the status bar visible across the entire overlay (root + pushed destinations). Previously .statusBarHidden() was unconditional, and gating it on pathIsRoot introduced a safe-area-top collapse/restore flash at push time. Only hide the status bar while the lightbox is up.

Host-feed PresentedDetail.onPushProfile / onPushTag callbacks are left in place (still wired at HomeView / ProfileView / SearchView / TagFeedView / RelatedIllustsSection). They're unreached by the new code path but harmless; removing them is a mechanical follow-up once we've verified no other consumer relies on them.

Known issues (not blockers for this checkpoint)

  • The unshifted() calibration in prepareSourceFrameThenDismiss / handlePageChange compensated for the safe-area-top collapse when the status bar was hidden. With it staying visible, the delta is ~0 and the calibration is effectively a no-op. Safe to drop in a follow-up.
  • Nested-overlay interaction (related → open → tap user row) should work via the same mechanism — the nested overlay gets its own NavigationStack — but hasn't been exercised end-to-end yet.

Test plan

  • Home → tap illust → tap user row. Profile slides in with Back chevron; overlay chrome (X, heart) hides.
  • Back returns to the same detail with pager position and scroll offset preserved; X + heart restored.
  • Edge-swipe back has the standard interactive pop animation and lands on the restored detail.
  • Tag pill push → TagFeedView with the same Back behavior.
  • Multi-page illust: page to image 2, tap user row, Back — carousel index preserved.
  • Repeat from Search and Profile tabs to confirm per-overlay stack works regardless of host.
  • Related section: open a nested overlay from within a detail, then tap its user row. Back returns to the nested detail; dismissing returns to the original detail.
  • Status bar: visible on detail root, visible in pushed profile/tag, hidden only while the lightbox is up.

🤖 Generated with Claude Code

Merge request reports

Loading