Skip to content

Commit 571d12d

Browse files
committed
m: new trackable flow (WIP)
1 parent 9287abf commit 571d12d

5 files changed

Lines changed: 92 additions & 44 deletions

File tree

apps/mobile/ios/Potential.xcodeproj/project.pbxproj

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88

99
/* Begin PBXBuildFile section */
1010
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
11+
265D4A5ABC97417D89D3FA88 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7758168AC748BE2F657E11D1 /* ExpoModulesProvider.swift */; };
12+
2FEA71BEEF4A049A8849283F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = C1FFC0D564D07FB0127C06F2 /* PrivacyInfo.xcprivacy */; };
1113
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
12-
8C1D7EF57C6F685B20DCB29B /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = CD9F87511C1BAEE69327D09A /* PrivacyInfo.xcprivacy */; };
1314
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
14-
D8C78923A8E52A61A5DF427F /* libPods-Potential.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 92B7899C817D085FFBF61F43 /* libPods-Potential.a */; };
15+
D257BB8B0BE60ED09AC4805A /* libPods-Potential.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3B5EE6125A51CC7572E1908 /* libPods-Potential.a */; };
1516
F11748422D0307B40044C1D9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F11748412D0307B40044C1D9 /* AppDelegate.swift */; };
16-
FF2E3797734B28CF44C340F1 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29FF390F714CAC4306BA576A /* ExpoModulesProvider.swift */; };
1717
/* End PBXBuildFile section */
1818

1919
/* Begin PBXFileReference section */
20-
04B562CC0E1925ADED71127B /* Pods-Potential.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Potential.debug.xcconfig"; path = "Target Support Files/Pods-Potential/Pods-Potential.debug.xcconfig"; sourceTree = "<group>"; };
2120
13B07F961A680F5B00A75B9A /* Potential.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Potential.app; sourceTree = BUILT_PRODUCTS_DIR; };
2221
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Potential/Images.xcassets; sourceTree = "<group>"; };
2322
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Potential/Info.plist; sourceTree = "<group>"; };
24-
29FF390F714CAC4306BA576A /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Potential/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
25-
3B2D11FA463C68C282C65A15 /* Pods-Potential.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Potential.release.xcconfig"; path = "Target Support Files/Pods-Potential/Pods-Potential.release.xcconfig"; sourceTree = "<group>"; };
26-
92B7899C817D085FFBF61F43 /* libPods-Potential.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Potential.a"; sourceTree = BUILT_PRODUCTS_DIR; };
23+
7758168AC748BE2F657E11D1 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Potential/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
24+
A2326D3F6A8095F3DDE73A66 /* Pods-Potential.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Potential.debug.xcconfig"; path = "Target Support Files/Pods-Potential/Pods-Potential.debug.xcconfig"; sourceTree = "<group>"; };
2725
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = Potential/SplashScreen.storyboard; sourceTree = "<group>"; };
2826
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
29-
CD9F87511C1BAEE69327D09A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = Potential/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
27+
C1FFC0D564D07FB0127C06F2 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = Potential/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
28+
CAC2DAD2D55905B9AE7774C5 /* Pods-Potential.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Potential.release.xcconfig"; path = "Target Support Files/Pods-Potential/Pods-Potential.release.xcconfig"; sourceTree = "<group>"; };
29+
D3B5EE6125A51CC7572E1908 /* libPods-Potential.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Potential.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3030
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
3131
F11748412D0307B40044C1D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = Potential/AppDelegate.swift; sourceTree = "<group>"; };
3232
F11748442D0722820044C1D9 /* Potential-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "Potential-Bridging-Header.h"; path = "Potential/Potential-Bridging-Header.h"; sourceTree = "<group>"; };
@@ -37,7 +37,7 @@
3737
isa = PBXFrameworksBuildPhase;
3838
buildActionMask = 2147483647;
3939
files = (
40-
D8C78923A8E52A61A5DF427F /* libPods-Potential.a in Frameworks */,
40+
D257BB8B0BE60ED09AC4805A /* libPods-Potential.a in Frameworks */,
4141
);
4242
runOnlyForDeploymentPostprocessing = 0;
4343
};
@@ -53,7 +53,7 @@
5353
13B07FB51A68108700A75B9A /* Images.xcassets */,
5454
13B07FB61A68108700A75B9A /* Info.plist */,
5555
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
56-
CD9F87511C1BAEE69327D09A /* PrivacyInfo.xcprivacy */,
56+
C1FFC0D564D07FB0127C06F2 /* PrivacyInfo.xcprivacy */,
5757
);
5858
name = Potential;
5959
sourceTree = "<group>";
@@ -62,29 +62,19 @@
6262
isa = PBXGroup;
6363
children = (
6464
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
65-
92B7899C817D085FFBF61F43 /* libPods-Potential.a */,
65+
D3B5EE6125A51CC7572E1908 /* libPods-Potential.a */,
6666
);
6767
name = Frameworks;
6868
sourceTree = "<group>";
6969
};
70-
39A56B429B1DCBFDC62A905C /* Potential */ = {
70+
3D5B84B6775E07F6864B1B02 /* Potential */ = {
7171
isa = PBXGroup;
7272
children = (
73-
29FF390F714CAC4306BA576A /* ExpoModulesProvider.swift */,
73+
7758168AC748BE2F657E11D1 /* ExpoModulesProvider.swift */,
7474
);
7575
name = Potential;
7676
sourceTree = "<group>";
7777
};
78-
636CE9DCCDB99AC6024125A8 /* Pods */ = {
79-
isa = PBXGroup;
80-
children = (
81-
04B562CC0E1925ADED71127B /* Pods-Potential.debug.xcconfig */,
82-
3B2D11FA463C68C282C65A15 /* Pods-Potential.release.xcconfig */,
83-
);
84-
name = Pods;
85-
path = Pods;
86-
sourceTree = "<group>";
87-
};
8878
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
8979
isa = PBXGroup;
9080
children = (
@@ -99,8 +89,8 @@
9989
832341AE1AAA6A7D00B99B32 /* Libraries */,
10090
83CBBA001A601CBA00E9B192 /* Products */,
10191
2D16E6871FA4F8E400B85C8A /* Frameworks */,
102-
636CE9DCCDB99AC6024125A8 /* Pods */,
103-
E8D6773A034A0BFA21E3324E /* ExpoModulesProviders */,
92+
DCEC2295B7D8EAE553BE6393 /* Pods */,
93+
E619F967B6BB31332B70CF85 /* ExpoModulesProviders */,
10494
);
10595
indentWidth = 2;
10696
sourceTree = "<group>";
@@ -124,10 +114,20 @@
124114
path = Potential/Supporting;
125115
sourceTree = "<group>";
126116
};
127-
E8D6773A034A0BFA21E3324E /* ExpoModulesProviders */ = {
117+
DCEC2295B7D8EAE553BE6393 /* Pods */ = {
118+
isa = PBXGroup;
119+
children = (
120+
A2326D3F6A8095F3DDE73A66 /* Pods-Potential.debug.xcconfig */,
121+
CAC2DAD2D55905B9AE7774C5 /* Pods-Potential.release.xcconfig */,
122+
);
123+
name = Pods;
124+
path = Pods;
125+
sourceTree = "<group>";
126+
};
127+
E619F967B6BB31332B70CF85 /* ExpoModulesProviders */ = {
128128
isa = PBXGroup;
129129
children = (
130-
39A56B429B1DCBFDC62A905C /* Potential */,
130+
3D5B84B6775E07F6864B1B02 /* Potential */,
131131
);
132132
name = ExpoModulesProviders;
133133
sourceTree = "<group>";
@@ -140,13 +140,13 @@
140140
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Potential" */;
141141
buildPhases = (
142142
08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */,
143-
2656CE5F1B2B539064FB1CF3 /* [Expo] Configure project */,
143+
3598E65994BACB84B6F5A9FD /* [Expo] Configure project */,
144144
13B07F871A680F5B00A75B9A /* Sources */,
145145
13B07F8C1A680F5B00A75B9A /* Frameworks */,
146146
13B07F8E1A680F5B00A75B9A /* Resources */,
147147
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
148148
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
149-
D885218381B1F352D9DBFD1D /* [CP] Embed Pods Frameworks */,
149+
E562FA57A5FBABC0FD935F73 /* [CP] Embed Pods Frameworks */,
150150
);
151151
buildRules = (
152152
);
@@ -196,7 +196,7 @@
196196
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
197197
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
198198
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
199-
8C1D7EF57C6F685B20DCB29B /* PrivacyInfo.xcprivacy in Resources */,
199+
2FEA71BEEF4A049A8849283F /* PrivacyInfo.xcprivacy in Resources */,
200200
);
201201
runOnlyForDeploymentPostprocessing = 0;
202202
};
@@ -240,7 +240,7 @@
240240
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
241241
showEnvVarsInLog = 0;
242242
};
243-
2656CE5F1B2B539064FB1CF3 /* [Expo] Configure project */ = {
243+
3598E65994BACB84B6F5A9FD /* [Expo] Configure project */ = {
244244
isa = PBXShellScriptBuildPhase;
245245
alwaysOutOfDate = 1;
246246
buildActionMask = 2147483647;
@@ -311,7 +311,7 @@
311311
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Potential/Pods-Potential-resources.sh\"\n";
312312
showEnvVarsInLog = 0;
313313
};
314-
D885218381B1F352D9DBFD1D /* [CP] Embed Pods Frameworks */ = {
314+
E562FA57A5FBABC0FD935F73 /* [CP] Embed Pods Frameworks */ = {
315315
isa = PBXShellScriptBuildPhase;
316316
buildActionMask = 2147483647;
317317
files = (
@@ -337,7 +337,7 @@
337337
buildActionMask = 2147483647;
338338
files = (
339339
F11748422D0307B40044C1D9 /* AppDelegate.swift in Sources */,
340-
FF2E3797734B28CF44C340F1 /* ExpoModulesProvider.swift in Sources */,
340+
265D4A5ABC97417D89D3FA88 /* ExpoModulesProvider.swift in Sources */,
341341
);
342342
runOnlyForDeploymentPostprocessing = 0;
343343
};
@@ -346,7 +346,7 @@
346346
/* Begin XCBuildConfiguration section */
347347
13B07F941A680F5B00A75B9A /* Debug */ = {
348348
isa = XCBuildConfiguration;
349-
baseConfigurationReference = 04B562CC0E1925ADED71127B /* Pods-Potential.debug.xcconfig */;
349+
baseConfigurationReference = A2326D3F6A8095F3DDE73A66 /* Pods-Potential.debug.xcconfig */;
350350
buildSettings = {
351351
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
352352
CLANG_ENABLE_MODULES = YES;
@@ -382,7 +382,7 @@
382382
};
383383
13B07F951A680F5B00A75B9A /* Release */ = {
384384
isa = XCBuildConfiguration;
385-
baseConfigurationReference = 3B2D11FA463C68C282C65A15 /* Pods-Potential.release.xcconfig */;
385+
baseConfigurationReference = CAC2DAD2D55905B9AE7774C5 /* Pods-Potential.release.xcconfig */;
386386
buildSettings = {
387387
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
388388
CLANG_ENABLE_MODULES = YES;

apps/mobile/src/app/(home)/_layout.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ export default function DashboardLayout() {
108108
),
109109
}}
110110
/>
111+
<Stack.Screen
112+
name="new"
113+
options={{
114+
title: "Track something new",
115+
presentation: "modal",
116+
headerRight: () => (
117+
<Button variant="link" size="icon" onPress={() => router.back()}>
118+
<X size={24} color={iconColor()} />
119+
</Button>
120+
),
121+
}}
122+
/>
111123
<Stack.Screen
112124
name="[trackableId]"
113125
options={{

apps/mobile/src/app/(home)/index.tsx

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,62 @@
11
import React from "react";
22
import { View } from "react-native";
3-
import { ScrollView } from "react-native-gesture-handler";
3+
import { Pressable, ScrollView } from "react-native-gesture-handler";
44
import { SafeAreaView } from "react-native-safe-area-context";
55
import { useRouter } from "expo-router";
6+
import { Flask, PlusCircle } from "phosphor-react-native";
67

78
import { TrackablesContainer } from "~/components/trackables/TrackablesContainer";
8-
import { Button } from "~/components/ui/button";
99
import { Text } from "~/components/ui/text";
10+
import { iconColor } from "~/utils/ui";
1011

1112
export default function DashboardHome() {
1213
const router = useRouter();
1314

1415
return (
1516
<SafeAreaView className="flex-1" edges={["bottom"]}>
16-
<View className="flex h-full flex-1 flex-col gap-2">
17+
<View className="flex h-full flex-1 flex-col gap-6 pt-6">
18+
<View
19+
className={
20+
"flex flex-row items-center justify-between gap-2 px-6 py-0"
21+
}
22+
>
23+
<View className={"flex flex-row items-center justify-end gap-2"}>
24+
<Pressable onPress={() => router.push("/(home)/new")} hitSlop={4}>
25+
<Flask color={iconColor()} />
26+
</Pressable>
27+
<Text className="text-sand-11 text-xs">Run a new experiment</Text>
28+
</View>
29+
<View className={"flex flex-row items-center justify-end gap-2"}>
30+
<Text className="text-sand-11 text-xs">Track something new</Text>
31+
<Pressable onPress={() => router.push("/(home)/new")} hitSlop={4}>
32+
<PlusCircle color={iconColor()} />
33+
</Pressable>
34+
</View>
35+
</View>
1736
<ScrollView
18-
className="flex flex-1 flex-col gap-8 p-6 pb-0"
37+
className="flex flex-1 flex-col gap-8 px-6 pb-0"
1938
contentContainerStyle={{ flexGrow: 1 }}
2039
>
2140
<View className="mb-6 flex flex-1 flex-col items-center gap-6">
2241
{/* <ExperimentsDemo /> */}
2342
<TrackablesContainer />
2443
</View>
2544
</ScrollView>
26-
<View className="flex w-full flex-row gap-2 px-6 py-0">
45+
{/* <View className="flex w-full flex-row gap-2 px-6 py-0">
2746
<Button
2847
onPress={() => router.push("/(home)/log")}
2948
// className="flex w-[49%] flex-row gap-2"
3049
className="flex w-full flex-row gap-2"
3150
>
3251
<Text>Log</Text>
3352
</Button>
34-
{/* <Button
53+
<Button
3554
onPress={() => router.push("/(home)/experiment")}
3655
className="flex w-[49%] flex-row gap-2"
3756
>
3857
<Text>Experiment</Text>
39-
</Button> */}
40-
</View>
58+
</Button>
59+
</View> */}
4160
</View>
4261
</SafeAreaView>
4362
);

apps/mobile/src/app/(home)/new.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React from "react";
2+
import { ScrollView, View } from "react-native";
3+
import { SafeAreaView } from "react-native-safe-area-context";
4+
5+
import { Text } from "~/components/ui/text";
6+
7+
export default function NewTrackable() {
8+
return (
9+
<SafeAreaView className="flex-1" edges={{ bottom: "maximum" }}>
10+
<ScrollView className="flex-1 p-6">
11+
<View className="mb-12 flex w-full flex-col items-center justify-center gap-6">
12+
<Text>New Trackable</Text>
13+
</View>
14+
</ScrollView>
15+
</SafeAreaView>
16+
);
17+
}

apps/mobile/src/components/app/userHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function UserHeader() {
3838
</Text>
3939
<Fire size={18} color={iconColor()} />
4040
</View>
41-
<View className="flex flex-row items-center justify-end gap-1">
41+
<View className="flex flex-row items-center justify-end pr-1">
4242
<Bug size={18} color={iconColor()} />
4343
</View>
4444
</View>

0 commit comments

Comments
 (0)