Skip to content

Commit 34ed5b0

Browse files
committed
Disable the console UI’s scroll clipping on tvOS
This ensures the focused states of the cells are not clipped
1 parent 29c1ad5 commit 34ed5b0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Sources/PulseUI/Features/Console/ConsoleView-tvos.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public struct ConsoleView: View {
3737
.onAppear { listViewModel.isViewVisible = true }
3838
.onDisappear { listViewModel.isViewVisible = false }
3939
}
40+
.disableScrollClip()
4041
.injecting(environment)
4142
.environmentObject(listViewModel)
4243
}
@@ -92,6 +93,17 @@ private struct ConsoleMenuView: View {
9293
}
9394
}
9495

96+
extension View {
97+
@available(tvOS, obsoleted: 17.0, renamed: "scrollClipDisabled")
98+
@ViewBuilder func disableScrollClip() -> some View {
99+
if #available(tvOS 17.0, *) {
100+
scrollClipDisabled()
101+
} else {
102+
self
103+
}
104+
}
105+
}
106+
95107
#if DEBUG
96108
struct ConsoleView_Previews: PreviewProvider {
97109
static var previews: some View {

Sources/PulseUI/Features/Inspector/NetworkInspectorView-tvos.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ struct NetworkInspectorView: View {
2626
Form { lhs }.frame(width: 740)
2727
Form { rhs }
2828
}
29+
.disableScrollClip()
2930
}
3031

3132
@ViewBuilder

0 commit comments

Comments
 (0)