Replace page TabView with paging ScrollView; fix diff + centering; bump to 3.2
Build iOS App / Build .ipa and publish source (push) Failing after 16s
Build iOS App / Build .ipa and publish source (push) Failing after 16s
The TabView with .page style broke NavigationLink inside tabs (the page gesture swallows taps) and centered content. Replace with a horizontal paging ScrollView using containerRelativeFrame and scrollTargetBehavior(.paging): same swipe-to-change behavior, no gesture conflicts, diff view works again. Bump to 3.2.
This commit is contained in:
1 parent
ed36ed72de
commit
1817422836
2 files changed
+28
-16
No files matched your search
@@ -103,19 +103,31 @@ struct PRDetailView: View {
|
||||
VStack(spacing: 0) {
|
||||
header(pr)
|
||||
|
||||
// Page-style TabView gives iOS-native swipe-to-change between
|
||||
// sections (matching iOS 26), while the bottom bar taps select.
|
||||
TabView(selection: $selectedTab) {
|
||||
OverviewTab(pr: pr)
|
||||
.tag(DetailTab.overview)
|
||||
ConversationTab(vm: vm)
|
||||
.tag(DetailTab.conversation)
|
||||
FilesTab(vm: vm)
|
||||
.tag(DetailTab.files)
|
||||
ChecksTab(vm: vm, onRerun: { showRerunConfirm = $0 })
|
||||
.tag(DetailTab.checks)
|
||||
// Horizontal paging ScrollView — swipeable like a TabView, but
|
||||
// without breaking NavigationLink inside the tabs (TabView's .page
|
||||
// style swallows taps and interferes with nested navigation).
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 0) {
|
||||
OverviewTab(pr: pr)
|
||||
.id(DetailTab.overview)
|
||||
.containerRelativeFrame(.horizontal)
|
||||
|
||||
ConversationTab(vm: vm)
|
||||
.id(DetailTab.conversation)
|
||||
.containerRelativeFrame(.horizontal)
|
||||
|
||||
FilesTab(vm: vm)
|
||||
.id(DetailTab.files)
|
||||
.containerRelativeFrame(.horizontal)
|
||||
|
||||
ChecksTab(vm: vm, onRerun: { showRerunConfirm = $0 })
|
||||
.id(DetailTab.checks)
|
||||
.containerRelativeFrame(.horizontal)
|
||||
}
|
||||
.scrollTargetLayout()
|
||||
}
|
||||
.tabViewStyle(.page(indexDisplayMode: .never))
|
||||
.scrollTargetBehavior(.paging)
|
||||
.scrollPosition(id: $selectedTab)
|
||||
.ignoresSafeArea(edges: .bottom)
|
||||
|
||||
bottomTabBar
|
||||
|
||||
Reference in new issue
Block a user