Skip to content

Restore swipe between Activity and Log on Logs page #60

@tashda

Description

@tashda

Bug

After the v1.5.0 Logs redesign, the horizontal swipe gesture for switching between Activity and Log was lost. The segmented picker still works, but users could no longer swipe.

Root cause

The redesign replaced the TabView(.page) paging container with a plain switch to fix two visual regressions that PageTabViewStyle introduced once the tab bar was hidden:

  1. The navigation bar lost its scroll-edge transparency and stayed opaque, because UIKit binds the nav-bar effect to the outermost UIScrollView — which with TabView(.page) is the horizontal pager that never scrolls vertically.
  2. A white seam appeared at the bottom from the page TabView's reserved (but invisible) index-dot strip, no longer masked by the tab bar.

The switch fixed the visuals but removed the swipe.

Fix

Replace the switch with a native iOS 17+ horizontal paging ScrollView:

  • ScrollView(.horizontal) + LazyHStack + .scrollTargetBehavior(.paging) + .scrollPosition(id:) bound two-way to mode.
  • Each page is sized via GeometryReader so the inner List respects the navigation bar's safe-area inset.
  • No UIPageViewController, so no opaque toolbar and no bottom seam.

Acceptance

  • Toolbar transparent at top of list, blurs on scroll
  • No white seam at the bottom
  • Tab bar stays hidden on Logs
  • Native finger-tracking swipe between Activity and Log
  • Tapping the segmented picker animates the swap

Metadata

Metadata

Assignees

Labels

area:uiUI / UX redesignbugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions