Skip to content

Commit 1f52463

Browse files
committed
Merge commit '832dc8fd73ce7f927714b0841e2d7557cff0ec28' into fix/779-turn-item-history-growth
2 parents 84d8671 + 832dc8f commit 1f52463

42 files changed

Lines changed: 1486 additions & 471 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
-765 KB
Binary file not shown.
765 KB
Binary file not shown.

‎apps/mobile/modules/t3-native-controls/android/build.gradle‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ android {
2626
dependencies {
2727
implementation project(':expo-modules-core')
2828
implementation 'androidx.compose.ui:ui-android:1.10.6'
29+
implementation 'androidx.activity:activity:1.8.2'
2930
implementation 'androidx.compose.material3:material3-android:1.5.0-alpha17'
3031
implementation 'androidx.window:window:1.5.1'
3132
}

‎apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt‎

Lines changed: 277 additions & 35 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
2+
<path android:fillColor="#000000" android:pathData="M3,6H21V8H3ZM3,11H21V13H3ZM3,16H21V18H3Z" />
3+
</vector>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!-- Tabler Icons edit (MIT), the same glyph as the phone's New thread button (assets/icons/compose.xml). -->
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
3+
<path android:fillColor="#000000" android:pathData="M7,6 L6,6 C4.3431,6 3,7.3431 3,9 L3,18 C3,19.6569 4.3431,21 6,21 L15,21 C16.6569,21 18,19.6569 18,18 L18,17 C18,16.4477 17.5523,16 17,16 C16.4477,16 16,16.4477 16,17 L16,18 C16,18.5523 15.5523,19 15,19 L6,19 C5.4477,19 5,18.5523 5,18 L5,9 C5,8.4477 5.4477,8 6,8 L7,8 C7.5523,8 8,7.5523 8,7 C8,6.4477 7.5523,6 7,6 Z M21.0921,5.8779 L21.092,5.8778 L20.3849,6.5849 L21.092,7.292 C22.3027,6.0814 22.3027,4.1186 21.092,2.908 C19.8814,1.6973 17.9186,1.6973 16.708,2.908 L8.2942,11.2916 C8.1059,11.4793 8,11.7342 8,12 L8,15 C8,15.5523 8.4477,16 9,16 L12,16 C12.2658,16 12.5207,15.8942 12.7084,15.7058 L21.0934,7.2908 C21.4832,6.8996 21.4821,6.2665 21.0908,5.8766 C20.6996,5.4868 20.0665,5.4879 19.6766,5.8792 L11.2916,14.2942 L12,14 L9,14 L10,15 L10,12 L9.7058,12.7084 L18.1209,4.3235 C18.5518,3.8926 19.2482,3.8926 19.6778,4.3222 C20.1074,4.7518 20.1074,5.4482 19.6778,5.8778 C19.2873,6.2683 19.2873,6.9015 19.6778,7.292 L19.6779,7.2921 C20.0684,7.6826 20.7016,7.6826 21.0921,7.2921 C21.4826,6.9016 21.4826,6.2684 21.0921,5.8779 Z M15.2929,5.7071 L18.2929,8.7071 C18.6834,9.0976 19.3166,9.0976 19.7071,8.7071 C20.0976,8.3166 20.0976,7.6834 19.7071,7.2929 L16.7071,4.2929 C16.3166,3.9024 15.6834,3.9024 15.2929,4.2929 C14.9024,4.6834 14.9024,5.3166 15.2929,5.7071 Z" />
4+
</vector>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
2+
<path android:fillColor="#000000" android:pathData="M19.43,12.98C19.47,12.66 19.5,12.34 19.5,12C19.5,11.66 19.47,11.34 19.43,11.02L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.97 19.05,5.05L16.56,6.05C16.04,5.65 15.48,5.32 14.87,5.07L14.49,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.51,2.42L9.13,5.07C8.52,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.72,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11.02C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.66 4.57,12.98L2.46,14.63C2.27,14.78 2.22,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.95C7.96,18.35 8.52,18.68 9.13,18.93L9.51,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.49,21.58L14.87,18.93C15.48,18.68 16.04,18.34 16.56,17.95L19.05,18.95C19.28,19.04 19.54,18.95 19.66,18.73L21.66,15.27C21.79,15.05 21.73,14.78 21.54,14.63L19.43,12.98ZM12,15.5C10.07,15.5 8.5,13.93 8.5,12C8.5,10.07 10.07,8.5 12,8.5C13.93,8.5 15.5,10.07 15.5,12C15.5,13.93 13.93,15.5 12,15.5Z" />
3+
</vector>

‎apps/mobile/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"react-native-pdf-jsi": "5.0.0",
134134
"react-native-reanimated": "4.7.1",
135135
"react-native-safe-area-context": "~5.10.1",
136-
"react-native-screens": "file:deps/react-native-screens-5.0.0-t3.27.tgz",
136+
"react-native-screens": "file:deps/react-native-screens-5.0.0-t3.29.tgz",
137137
"react-native-shiki-engine": "^0.3.12",
138138
"react-native-svg": "15.16.0",
139139
"react-native-webview": "14.0.1",

‎apps/mobile/src/Stack.tsx‎

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { useResolveClassNames } from "uniwind";
3232
import { AppText as Text } from "./components/ui/AppText";
3333
import { androidWorkspaceDestinationAnimation } from "./lib/android-workspace-navigation";
3434
import { getCompactBrandHeaderOptions } from "./components/CompactBrandTitle";
35+
import { WorkspaceConnectionStatusProvider } from "./features/home/WorkspaceConnectionTitle";
3536
import { WorkspaceRootScreen } from "./features/workspace/WorkspaceRootScreen";
37+
import { AndroidWorkspaceSettings } from "./features/workspace/AndroidWorkspaceSettings";
3638
import { AndroidWorkspaceTabsProvider } from "./features/workspace/AndroidWorkspaceTabsProvider";
3739
import {
3840
PullRequestRouteScreen,
@@ -219,6 +221,9 @@ const SettingsContentStack = createV5SheetStackNavigator({
219221
linking: "",
220222
options: {
221223
title: "Settings",
224+
// Android draws its own app bar here. Hidden only from inside the screen, the native one
225+
// showed for the first frame of the Settings tab and pushed the page down.
226+
headerShown: Platform.OS !== "android",
222227
},
223228
}),
224229
SettingsEnvironments: createNativeStackScreen({
@@ -562,7 +567,12 @@ const WORKSPACE_OVERLAY_ROUTES = new Set([
562567
]);
563568

564569
function workspaceLocationFromState(state: NavigationState) {
565-
const routes = state.routes.filter((route) => !WORKSPACE_OVERLAY_ROUTES.has(route.name));
570+
// Android opens Settings as a workspace page rather than an overlay, so the layout sees it.
571+
const routes = state.routes.filter(
572+
(route) =>
573+
!WORKSPACE_OVERLAY_ROUTES.has(route.name) ||
574+
(Platform.OS === "android" && route.name === "SettingsSheet"),
575+
);
566576
const effectiveState =
567577
routes.length > 0 && routes.length !== state.routes.length
568578
? ({ ...state, routes, index: routes.length - 1 } as NavigationState)
@@ -618,16 +628,18 @@ function RootStackLayout(props: {
618628
<ThreadOutboxDrainWorker />
619629
<ShowcaseCaptureCoordinator pathname={pathname} />
620630
<ExistingThreadSettingsRouteProvider>
621-
<AndroidWorkspaceTabsProvider>
622-
<AdaptiveWorkspaceLayout
623-
pathname={workspaceLocation.pathname}
624-
workspaceRouteKey={workspaceLocation.routeKey}
625-
selectedPullRequestKey={selectedPullRequestKey(props.state)}
626-
>
627-
{props.children}
628-
<HardwareKeyboardCommandOverlay />
629-
</AdaptiveWorkspaceLayout>
630-
</AndroidWorkspaceTabsProvider>
631+
<WorkspaceConnectionStatusProvider>
632+
<AndroidWorkspaceTabsProvider state={props.state}>
633+
<AdaptiveWorkspaceLayout
634+
pathname={workspaceLocation.pathname}
635+
workspaceRouteKey={workspaceLocation.routeKey}
636+
selectedPullRequestKey={selectedPullRequestKey(props.state)}
637+
>
638+
{props.children}
639+
<HardwareKeyboardCommandOverlay />
640+
</AdaptiveWorkspaceLayout>
641+
</AndroidWorkspaceTabsProvider>
642+
</WorkspaceConnectionStatusProvider>
631643
</ExistingThreadSettingsRouteProvider>
632644
</HardwareKeyboardCommandProvider>
633645
);
@@ -913,11 +925,14 @@ const RootStackConfig = createWorkspaceStackNavigator({
913925
}),
914926
SettingsSheet: createNativeStackScreen({
915927
screen: SettingsSheetStack,
928+
layout: ({ children }) => <AndroidWorkspaceSettings>{children}</AndroidWorkspaceSettings>,
916929
linking: "settings",
917930
options: {
918931
...NESTED_NAVIGATOR_OPTIONS,
919932
gestureEnabled: true,
920933
headerShown: false,
934+
// Android opens Settings as a top-level tab, so it swaps like the other tabs.
935+
...(Platform.OS === "android" ? { animation: "none" as const } : null),
921936
},
922937
}),
923938
SettingsLegal: createNativeStackScreen({

‎apps/mobile/src/components/ui/NativeAppBar.android.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ export function NativeAppBar(props: {
1414
const { colors } = useControlTheme();
1515
const layout = useToolbarLayout();
1616
return (
17-
<NativeThemeHost matchContents={{ vertical: true }} style={{ width: "100%" }}>
17+
// The bar's height is fixed, so React Native lays out the screen below it from the first frame
18+
// instead of at zero height until Compose has measured and reported the bar.
19+
<NativeThemeHost style={{ width: "100%", height: layout.height }}>
1820
<TopAppBar
1921
applyWindowInsets={false}
20-
modifiers={[fillMaxWidth(), height(Math.max(64, layout.height))]}
22+
// Every header shares the list toolbar's height, so titles line up across panes.
23+
modifiers={[fillMaxWidth(), height(layout.height)]}
2124
colors={{
2225
containerColor: colors["--color-header"],
2326
titleContentColor: colors["--color-header-foreground"],

0 commit comments

Comments
 (0)