Skip to content

Commit 44ea3d5

Browse files
Jerematixclaude
andcommitted
fix(mobile): keep iOS compose button size while a tab is pressed
Pressing a tab on the iOS 26+ glass tab bar adds a magnified copy of the tab buttons for the lens, without the workspace-tab identifiers. The fallback then measured those scaled copies, so compose was sized ~1.16x until the bar happened to lay out again. Skip controls drawn under a scaling transform. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent fa31b66 commit 44ea3d5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ private final class WorkspaceTabBar: UITabBar {
88
super.layoutSubviews()
99
// iOS 26.6 doesn't copy item identifiers onto its tab buttons; the bar holds no other controls.
1010
let identified = tabButtons(in: self) { $0.accessibilityIdentifier?.hasPrefix("workspace-tab-") == true }
11-
let buttons = identified.isEmpty ? tabButtons(in: self) { _ in true } : identified
11+
let candidates = identified.isEmpty ? tabButtons(in: self) { _ in true } : identified
12+
// Pressing a tab adds a magnified copy of the row for the glass lens, without identifiers.
13+
// Sizing compose from it leaves compose enlarged until the bar lays out again.
14+
let buttons = candidates.filter { convert($0.bounds, from: $0).size == $0.bounds.size }
1215
let row = buttons.reduce(CGRect.null) { $0.union(convert($1.bounds, from: $1)) }
1316
if !row.isNull { onContentLayout?(row) }
1417
}

0 commit comments

Comments
 (0)