TypeScript
fix(mobile): PR tab switches no longer leave Liquid Glass behind (#26041)
Cameron Chisholm5d4677831329
diff --git a/apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx b/apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsxindex 9f66f5f337b..4e55ed4ef65 100644--- a/apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx+++ b/apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx@@ -873,19 +873,25 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP}}><PullRequestIdentity pr={identity} params={params} />- <SegmentedControl- options={[- { value: "overview", label: "Overview" },- ...(guidesEnabled- ? [{ value: "guide" as const, label: "Guide" }]- : []),- { value: "activity", label: "Activity" },- ]}- selected={section}- onSelect={selectSection}- role="tab"- size="compact"- />+ {/* UIKit draws the tapped control's glass lens outside the hidden+ tab's opacity, so only the visible tab mounts the control. */}+ {Platform.OS !== "ios" || section === tab ? (+ <SegmentedControl+ options={[+ { value: "overview", label: "Overview" },+ ...(guidesEnabled+ ? [{ value: "guide" as const, label: "Guide" }]+ : []),+ { value: "activity", label: "Activity" },+ ]}+ selected={section}+ onSelect={selectSection}+ role="tab"+ size="compact"+ />+ ) : (+ <View style={{ height: 32 }} />+ )}</View>) : null}</>