Skip to content

Commit 5d46778

Browse files
camchismaria-rcks
andauthored
fix(mobile): PR tab switches no longer leave Liquid Glass behind (#26041)
Co-authored-by: maria-rcks <[email protected]>
1 parent c17a469 commit 5d46778

1 file changed

Lines changed: 19 additions & 13 deletions

File tree

‎apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx‎

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -873,19 +873,25 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
873873
}}
874874
>
875875
<PullRequestIdentity pr={identity} params={params} />
876-
<SegmentedControl
877-
options={[
878-
{ value: "overview", label: "Overview" },
879-
...(guidesEnabled
880-
? [{ value: "guide" as const, label: "Guide" }]
881-
: []),
882-
{ value: "activity", label: "Activity" },
883-
]}
884-
selected={section}
885-
onSelect={selectSection}
886-
role="tab"
887-
size="compact"
888-
/>
876+
{/* UIKit draws the tapped control's glass lens outside the hidden
877+
tab's opacity, so only the visible tab mounts the control. */}
878+
{Platform.OS !== "ios" || section === tab ? (
879+
<SegmentedControl
880+
options={[
881+
{ value: "overview", label: "Overview" },
882+
...(guidesEnabled
883+
? [{ value: "guide" as const, label: "Guide" }]
884+
: []),
885+
{ value: "activity", label: "Activity" },
886+
]}
887+
selected={section}
888+
onSelect={selectSection}
889+
role="tab"
890+
size="compact"
891+
/>
892+
) : (
893+
<View style={{ height: 32 }} />
894+
)}
889895
</View>
890896
) : null}
891897
</>

0 commit comments

Comments
 (0)