Skip to content

Commit efc36b4

Browse files
juliusmarmingeJulius Marminge
andauthored
Add mobile review diff and comment sheets (#2021)
Co-authored-by: Julius Marminge <julius@macmini.local>
1 parent a62b2ac commit efc36b4

37 files changed

+2734
-3
lines changed
Lines changed: 3 additions & 0 deletions
Loading
10.2 MB
Loading
14.2 MB
Loading

T3 Code blueprint.icon/icon.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"fill": {
3+
"solid": "display-p3:0.00000,0.00000,0.00000,1.00000"
4+
},
5+
"groups": [
6+
{
7+
"layers": [
8+
{
9+
"blend-mode": "normal",
10+
"fill": "automatic",
11+
"hidden": false,
12+
"image-name": "seedream-v4.5-kn732b3mfqe78y3dga2h92wbk984vnh7.png",
13+
"name": "seedream-v4.5-kn732b3mfqe78y3dga2h92wbk984vnh7",
14+
"position": {
15+
"scale": 0.25,
16+
"translation-in-points": [0, 0]
17+
}
18+
},
19+
{
20+
"image-name": "T3.svg",
21+
"name": "T3",
22+
"position": {
23+
"scale": 10,
24+
"translation-in-points": [0, 0]
25+
}
26+
},
27+
{
28+
"hidden": false,
29+
"image-name": "Texturelabs_Paper_381XL.jpg",
30+
"name": "Texturelabs_Paper_381XL"
31+
}
32+
],
33+
"shadow": {
34+
"kind": "neutral",
35+
"opacity": 0.5
36+
},
37+
"translucency": {
38+
"enabled": true,
39+
"value": 0.5
40+
}
41+
}
42+
],
43+
"supported-platforms": {
44+
"squares": ["iOS", "macOS"]
45+
}
46+
}

apps/mobile/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@effect/atom-react": "catalog:",
3838
"@expo-google-fonts/dm-sans": "^0.4.2",
3939
"@legendapp/list": "3.0.0-beta.44",
40+
"@pierre/diffs": "^1.1.0-beta.16",
4041
"@react-native-menu/menu": "^2.0.0",
4142
"@t3tools/client-runtime": "workspace:*",
4243
"@t3tools/contracts": "workspace:*",
@@ -74,6 +75,7 @@
7475
"react-native-screens": "~4.23.0",
7576
"react-native-svg": "15.15.3",
7677
"react-native-worklets": "0.7.2",
78+
"shiki": "^4.0.2",
7779
"tailwind-merge": "^3.5.0",
7880
"uniwind": "^1.6.2"
7981
},

apps/mobile/src/app/threads/[environmentId]/[threadId]/_layout.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { useResolveClassNames } from "uniwind";
44

55
export default function ThreadLayout() {
66
const sheetStyle = StyleSheet.flatten(useResolveClassNames("bg-sheet"));
7+
const headerBg = {
8+
backgroundColor: (sheetStyle as { backgroundColor?: string })?.backgroundColor,
9+
};
710

811
return (
912
<Stack screenOptions={{ headerShown: false }}>
@@ -38,6 +41,29 @@ export default function ThreadLayout() {
3841
sheetGrabberVisible: true,
3942
}}
4043
/>
44+
<Stack.Screen
45+
name="review"
46+
options={{
47+
animation: "slide_from_right",
48+
contentStyle: sheetStyle,
49+
headerShown: true,
50+
headerTitle: "Files changed",
51+
headerBackTitle: "",
52+
headerShadowVisible: false,
53+
headerStyle: headerBg,
54+
}}
55+
/>
56+
<Stack.Screen
57+
name="review-comment"
58+
options={{
59+
contentStyle: sheetStyle,
60+
gestureEnabled: true,
61+
headerShown: false,
62+
presentation: "formSheet" as const,
63+
sheetAllowedDetents: [0.72, 0.92],
64+
sheetGrabberVisible: true,
65+
}}
66+
/>
4167
</Stack>
4268
);
4369
}

apps/mobile/src/app/threads/[environmentId]/[threadId]/git/_layout.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ export default function GitSheetLayout() {
4242
headerStyle: headerBg,
4343
}}
4444
/>
45+
<Stack.Screen
46+
name="review"
47+
options={{
48+
animation: "slide_from_right",
49+
headerShown: true,
50+
headerTitle: "Review changes",
51+
headerBackTitle: "",
52+
headerShadowVisible: false,
53+
headerStyle: headerBg,
54+
}}
55+
/>
4556
</Stack>
4657
);
4758
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Redirect, useLocalSearchParams } from "expo-router";
2+
3+
export default function ReviewRoute() {
4+
const { environmentId, threadId } = useLocalSearchParams<{
5+
environmentId: string;
6+
threadId: string;
7+
}>();
8+
9+
return (
10+
<Redirect
11+
href={{
12+
pathname: "/threads/[environmentId]/[threadId]/review",
13+
params: { environmentId, threadId },
14+
}}
15+
/>
16+
);
17+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { ReviewCommentComposerSheet } from "../../../../features/threads/review/ReviewCommentComposerSheet";
2+
3+
export default function ReviewCommentRoute() {
4+
return <ReviewCommentComposerSheet />;
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { ReviewSheet } from "../../../../features/threads/review/ReviewSheet";
2+
3+
export default function ReviewRoute() {
4+
return <ReviewSheet />;
5+
}

0 commit comments

Comments
 (0)