Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7c2fd94
fix: replace DropDownPicker with Dropdown and MultiSelect components
isotronic May 27, 2026
938dbbd
fix: remove unused react-native-dropdown-picker dependency
isotronic May 27, 2026
c458fe5
feat: implement theming system with navigation and paper theme deriva…
isotronic May 27, 2026
39b1e9e
refactor: unify borderRadius and start theme implementation
isotronic May 27, 2026
9a9cb06
fix: update imports for ViewStyle to use correct path in elevation an…
isotronic May 27, 2026
e659e74
fix: update SparklineChart to use useChartTheme and correct primary c…
isotronic May 27, 2026
60d170c
feat: add UI components including AppCard, AppIcon, AppImage, AppBott…
isotronic May 27, 2026
e0f6820
refactor: components to utilize theme colors and UI components
isotronic May 27, 2026
1b1f145
refactor: update layout components to use theme colors for consistency
isotronic May 27, 2026
364a5f3
refactor: remove deprecated color and theme management files
isotronic May 27, 2026
7f3f09e
refactor: components to use theme colors from AppTheme
isotronic May 27, 2026
8d5c79a
refactor: update components to use theme colors for loading indicator…
isotronic May 28, 2026
f9c76c9
refactor: icon usage across the application to utilize AppIcon component
isotronic May 28, 2026
3f7499f
refactor: replace Image component with AppImage for consistent image …
isotronic May 28, 2026
3779332
refactor: update snackbar background color to use theme colors for er…
isotronic May 28, 2026
2133ce7
refactor: update theme colors for chips, charts, and add new color to…
isotronic May 28, 2026
94f3fb7
refactor: replace Ionicons with AppIcon for consistent icon usage acr…
isotronic May 28, 2026
33393b8
refactor: update accent colors for consistency across components
isotronic May 28, 2026
b0dacd8
refactor: streamline component props and enhance theme integration ac…
isotronic May 28, 2026
c2e3cd4
test: add tracking_type_override to exercise plans
isotronic May 28, 2026
f448382
test: update chartTheme mock to use useChartTheme
isotronic May 28, 2026
fa7189f
refactor: replace ViewProps and TextProps with ComponentProps
isotronic May 28, 2026
df58871
fix: ensure onSave is called with inputValue in SettingsModal
isotronic May 28, 2026
a6cc370
test: add tracking_type_override to exercise plans
isotronic May 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/(app)/(create-plan)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { Colors } from "@/constants/Colors";
import { Stack } from "expo-router";
import { t } from "@lingui/core/macro";
import { useAppTheme } from "@/theme";

export default function CreatePlanLayout() {
const { colors } = useAppTheme();
return (
<Stack
screenOptions={{
headerStyle: {
backgroundColor: Colors.dark.background,
backgroundColor: colors.background,
},
headerTintColor: Colors.dark.text,
headerTintColor: colors.contentPrimary,
}}
>
<Stack.Screen name="create" options={{ title: t`Create Plan` }} />
Expand Down
9 changes: 5 additions & 4 deletions app/(app)/(create-plan)/create-workout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
useLocalSearchParams,
useNavigation,
} from "expo-router";
import { Colors } from "@/constants/Colors";
import { useAppTheme } from "@/theme";
import WorkoutCard from "@/components/WorkoutCard";
import { useQueryClient } from "@tanstack/react-query";
import Bugsnag from "@bugsnag/expo";
Expand All @@ -30,6 +30,7 @@ import {
import { useStandaloneWorkoutsQuery } from "@/hooks/useStandaloneWorkoutsQuery";

export default function CreateWorkoutScreen() {
const { colors } = useAppTheme();
const navigation = useNavigation();
const queryClient = useQueryClient();
const { workoutId: workoutIdParam } = useLocalSearchParams<{
Expand Down Expand Up @@ -228,15 +229,15 @@ export default function CreateWorkoutScreen() {

return (
<KeyboardAvoidingView
style={{ flex: 1, backgroundColor: Colors.dark.screenBackground }}
style={{ flex: 1, backgroundColor: colors.surface }}
behavior={Platform.OS === "ios" ? "padding" : undefined}
keyboardVerticalOffset={Platform.OS === "ios" ? 100 : 0}
>
{isSaving && (
<Portal>
<Modal visible={isSaving} dismissable={false}>
<View style={styles.loadingOverlay}>
<ActivityIndicator size="large" color="white" />
<ActivityIndicator size="large" color={colors.contentPrimary} />
</View>
</Modal>
</Portal>
Expand Down Expand Up @@ -274,7 +275,7 @@ export default function CreateWorkoutScreen() {
/>
) : (
<ActivityIndicator
color={Colors.dark.text}
color={colors.contentPrimary}
style={{ marginTop: 40 }}
/>
)}
Expand Down
159 changes: 82 additions & 77 deletions app/(app)/(create-plan)/create.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState, useRef } from "react";
import { useEffect, useState, useRef, useMemo } from "react";
import {
StyleSheet,
View,
Expand Down Expand Up @@ -26,7 +26,6 @@ import {
useLocalSearchParams,
useNavigation,
} from "expo-router";
import { Colors } from "@/constants/Colors";
import { useCreatePlan } from "@/hooks/useCreatePlan";
import WorkoutCard from "@/components/WorkoutCard";
import { usePlanQuery } from "@/hooks/usePlanQuery";
Expand All @@ -37,10 +36,14 @@ import SaveIcon from "@/components/SaveIcon";
import PlanScheduleEditor from "@/components/PlanScheduleEditor";
import { fetchPlanSchedule } from "@/utils/database";
import { useSettingsQuery } from "@/hooks/useSettingsQuery";
import { useAppTheme, radii } from "@/theme";
import type { AppThemeColors } from "@/theme/types";

type ScrollViewType = typeof ScrollView;

export default function CreatePlanScreen() {
const { colors } = useAppTheme();
const styles = useMemo(() => createStyles(colors), [colors]);
const navigation = useNavigation();
const router = useRouter();
const queryClient = useQueryClient();
Expand Down Expand Up @@ -331,15 +334,15 @@ export default function CreatePlanScreen() {

return (
<KeyboardAvoidingView
style={{ flex: 1, backgroundColor: Colors.dark.screenBackground }}
style={{ flex: 1, backgroundColor: colors.surface }}
behavior={Platform.OS === "ios" ? "padding" : undefined}
keyboardVerticalOffset={Platform.OS === "ios" ? 100 : 0}
>
{isSaving && (
<Portal>
<Modal visible={isSaving} dismissable={false}>
<View style={styles.loadingOverlay}>
<ActivityIndicator size="large" color="white" />
<ActivityIndicator size="large" color={colors.contentPrimary} />
<ThemedText style={styles.loadingText}>
<Trans>Saving Plan...</Trans>
</ThemedText>
Expand Down Expand Up @@ -368,7 +371,7 @@ export default function CreatePlanScreen() {
>
{!dataLoaded ? (
<ThemedView style={styles.loadingContainer}>
<ActivityIndicator size="large" color={Colors.dark.text} />
<ActivityIndicator size="large" color={colors.contentPrimary} />
</ThemedView>
) : (
<ThemedView style={styles.container}>
Expand All @@ -381,15 +384,15 @@ export default function CreatePlanScreen() {
<IconButton
icon="pen"
size={20}
iconColor={Colors.dark.tint}
iconColor={colors.accent}
style={styles.overlayIcon}
onPress={handleImageSearch}
/>
</ImageBackground>
</View>
<TextInput
style={styles.input}
placeholderTextColor={Colors.dark.subText}
placeholderTextColor={colors.contentSecondary}
placeholder={t`Training Plan Name`}
value={planName}
onChangeText={setPlanName}
Expand Down Expand Up @@ -438,73 +441,75 @@ export default function CreatePlanScreen() {
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
padding: 16,
overflow: "visible",
},
loadingContainer: {
flex: 1,
justifyContent: "center",
alignItems: "center",
},
inputContainer: {
flexDirection: "row",
alignItems: "center",
marginBottom: 20,
},
imageContainer: {
position: "relative",
width: 60,
height: 60,
marginRight: 10,
},
image: {
width: "100%",
height: "100%",
borderRadius: 10,
overflow: "hidden",
},
overlayIcon: {
position: "absolute",
top: 5,
right: 5,
},
input: {
flex: 1,
padding: 10,
borderColor: Colors.dark.subText,
borderWidth: 1,
borderRadius: 8,
color: Colors.dark.text,
fontSize: 18,
lineHeight: 24,
height: 45,
},
emptyText: {
fontSize: 18,
color: Colors.dark.text,
},
addWorkoutButton: {
marginTop: 16,
borderRadius: 8,
},
buttonLabel: {
fontSize: 16,
},
loadingOverlay: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "rgba(0, 0, 0, 0.7)", // Dark transparent overlay
position: "absolute",
width: "100%",
height: "100%",
},
loadingText: {
marginTop: 10,
fontSize: 18,
color: "white",
},
});
function createStyles(colors: AppThemeColors) {
return StyleSheet.create({
container: {
flex: 1,
padding: 16,
overflow: "visible",
},
loadingContainer: {
flex: 1,
justifyContent: "center",
alignItems: "center",
},
inputContainer: {
flexDirection: "row",
alignItems: "center",
marginBottom: 20,
},
imageContainer: {
position: "relative",
width: 60,
height: 60,
marginRight: 10,
},
image: {
width: "100%",
height: "100%",
borderRadius: radii.md,
overflow: "hidden",
},
overlayIcon: {
position: "absolute",
top: 5,
right: 5,
},
input: {
flex: 1,
padding: 10,
borderColor: colors.contentSecondary,
borderWidth: 1,
borderRadius: radii.md,
color: colors.contentPrimary,
fontSize: 18,
lineHeight: 24,
height: 45,
},
emptyText: {
fontSize: 18,
color: colors.contentPrimary,
},
addWorkoutButton: {
marginTop: 16,
borderRadius: radii.md,
},
buttonLabel: {
fontSize: 16,
},
loadingOverlay: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: colors.modalBackdrop,
position: "absolute",
width: "100%",
height: "100%",
},
loadingText: {
marginTop: 10,
fontSize: 18,
color: colors.contentPrimary,
},
});
}
Loading
Loading