Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 frontend/app/(auth)/(tabs)/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
const [animationTrigger, setAnimationTrigger] = useState(0);

useThemeAware(); // Force re-render when theme changes
const { profile, loading } = useProfile();

Check warning on line 54 in frontend/app/(auth)/(tabs)/profile.tsx

View workflow job for this annotation

GitHub Actions / Frontend - Build & Type Check

'loading' is assigned a value but never used
const [showSignOutSheet, setShowSignOutSheet] = useState(false);
const [showRatingSheet, setShowRatingSheet] = useState(false);
const [showOnboardingVideo, setShowOnboardingVideo] = useState(false);
Expand Down Expand Up @@ -79,7 +79,7 @@
Alert.alert(
'Error',
'Failed to sign out: ' +
(error instanceof Error ? error.message : 'Unknown error')
(error instanceof Error ? error.message : 'Unknown error')
);
}
};
Expand Down Expand Up @@ -132,7 +132,7 @@
</Pressable>

<View style={styles.nameContainer}>
<AppText variant="title">{displayName}</AppText>
<AppText variant="title" numberOfLines={2}>{displayName}</AppText>
<AppText variant="body" color="dimmer">
Member since {getMemberSinceText()}
</AppText>
Expand Down Expand Up @@ -325,7 +325,8 @@
borderRadius: 64,
},
nameContainer: {
display: 'flex',
flex: 1,
flexShrink: 1,
flexDirection: 'column',
},
buttonRow: {
Expand Down
10 changes: 5 additions & 5 deletions frontend/app/(auth)/create-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
import React, { useEffect, useRef, useState } from 'react';
import {
Alert,
Animated as RNAnimated,
Dimensions,
Image,
KeyboardAvoidingView,
Platform,
Animated as RNAnimated,
ScrollView,
StatusBar,
StyleSheet,
Expand Down Expand Up @@ -204,7 +204,7 @@
useNativeDriver: true,
}),
]).start();
}, [currentStep]);

Check warning on line 207 in frontend/app/(auth)/create-profile.tsx

View workflow job for this annotation

GitHub Actions / Frontend - Build & Type Check

React Hook useEffect has missing dependencies: 'direction', 'fadeAnim', and 'slideAnim'. Either include them or remove the dependency array

if (!isLoaded) {
return null; // Wait for AsyncStorage to load
Expand Down Expand Up @@ -809,8 +809,8 @@
>
<PromptSelector
prompt={data.prompts[draggingPromptIndex]}
onUpdate={() => {}}
onRemove={() => {}}
onUpdate={() => { }}
onRemove={() => { }}
canRemove={true}
/>
</View>
Expand Down Expand Up @@ -857,7 +857,7 @@
<View style={styles.stepContainer}>
<OnboardingTitle
title="What clubs are you in?"
subtitle="Optional - Add any Cornell clubs or organizations you're part of."
subtitle="Optional - Add any Cornell clubs or organizations you're a part of."
/>

{data.clubs.length > 0 && (
Expand Down Expand Up @@ -1013,7 +1013,7 @@
return (
<View style={styles.stepContainer}>
<AppText variant="title" style={{ textAlign: 'center' }}>
And now, {data.firstName}, you&apos;re redi!
And now, {data.firstName}, you&apos;re redi!
</AppText>
<View style={styles.welcomeContainer}>
{data.pictures[0] && (
Expand Down
26 changes: 21 additions & 5 deletions frontend/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
const [initializing, setInitializing] = useState(true);
const [firstCheckDone, setFirstCheckDone] = useState(false);
const [user, setUser] = useState<FirebaseAuthTypes.User | null>(null);
const [showOnboarding, setShowOnboarding] = useState(false);

Check warning on line 50 in frontend/app/_layout.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this useless assignment to variable "setShowOnboarding".

See more on https://sonarcloud.io/project/issues?id=cornell-dti_redi&issues=AZzJmDIVBZFy4ifrAw7g&open=AZzJmDIVBZFy4ifrAw7g&pullRequest=102
const [isCheckingProfile, setIsCheckingProfile] = useState(false);

Check warning on line 51 in frontend/app/_layout.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this useless assignment to variable "isCheckingProfile".

See more on https://sonarcloud.io/project/issues?id=cornell-dti_redi&issues=AZy16AIA7AKibpF0ljxC&open=AZy16AIA7AKibpF0ljxC&pullRequest=102
const [animate, setAnimate] = useState(false);

Check warning on line 52 in frontend/app/_layout.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this useless assignment to variable "animate".

See more on https://sonarcloud.io/project/issues?id=cornell-dti_redi&issues=AZzJmDIVBZFy4ifrAw7h&open=AZzJmDIVBZFy4ifrAw7h&pullRequest=102
const router = useRouter();
const segments = useSegments();
const appState = useRef(AppState.currentState);
Expand Down Expand Up @@ -231,6 +233,7 @@
if (user && !inAuthGroup) {
// User is signed in but not in auth group
// Check if user has a profile to determine where to redirect
setIsCheckingProfile(true);
try {
const profile = await getCurrentUserProfile();

Expand Down Expand Up @@ -352,11 +355,24 @@
}, [firstCheckDone]);

return (
<Stack screenOptions={{ animation: animate ? 'default' : 'none' }}>
<Stack.Screen name="index" options={{ headerShown: false }} />
<Stack.Screen name="(auth)" options={{ headerShown: false }} />
<Stack.Screen name="home" options={{ headerShown: false }} />
</Stack>
<>
<Stack>
<Stack.Screen name="index" options={{ headerShown: false }} />
<Stack.Screen name="(auth)" options={{ headerShown: false }} />
<Stack.Screen
name="home"
options={{
headerShown: false,
}}
/>
</Stack>
{showOnboarding && (
<OnboardingVideo

Check failure on line 370 in frontend/app/_layout.tsx

View workflow job for this annotation

GitHub Actions / Frontend - Build & Type Check

'OnboardingVideo' is not defined
visible={showOnboarding}
onFinish={handleOnboardingFinish}
/>
)}
Comment on lines +369 to +374
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this fix! While you're at it, do you also wanna try fixing the Log in page flashing briefly before you go to Home?

Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-11-30.at.11.26.34.mp4

</>
);
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/onboarding/PhotoUploadGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const { width: SCREEN_WIDTH } = Dimensions.get('window');
// Grid configuration
const NUM_COLUMNS = 3; // 3 columns for a 2x3 grid (6 items total)
const GRID_GAP = 4; // Gap between items
const HORIZONTAL_PADDING = 32; // Account for parent container padding (16 on each side)
const HORIZONTAL_PADDING = 40; // Account for parent container padding (20 on each side)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hang on, this introduces a regression in the photoupload grid in Edit Profile

In the current production it's working correctly (and at different display/zoom sizes), but on ur branch, you can see it appears cut off:

Image


// Calculate item width: (available width - gaps between items) / number of columns
// With 3 columns, there are 2 gaps between them
Expand Down
9 changes: 8 additions & 1 deletion frontend/app/components/ui/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,14 @@ export default function Button({
size: 20,
color: getIconColor(),
})}
<Text style={[getTextStyle(), textStyle]}>{title}</Text>
<Text
style={[getTextStyle(), textStyle]}
numberOfLines={1}
adjustsFontSizeToFit
minimumFontScale={0.8}
Comment on lines +221 to +222
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

>
{title}
</Text>
{iconRight &&
React.createElement(iconRight, {
size: 20,
Expand Down
1 change: 1 addition & 0 deletions frontend/app/components/ui/WeeklyMatchCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ const styles = StyleSheet.create({
},
buttonContainer: {
flexDirection: 'row',
flexWrap: 'wrap',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have a pic of the before/after of this?

i can't seem to test it on local rn (prob cuz match cards aren't shown yet?)

gap: 16,
flex: 1,
// width: '50%',
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ export default function HomePage() {
{(mode === 'signup' || mode === 'login') && renderAuthForm()}

{/* Onboarding Video Modal */}
<OnboardingVideo visible={showVideo} onFinish={handleVideoFinish} />
{showVideo && <OnboardingVideo visible={showVideo} onFinish={handleVideoFinish} />}

<Sheet
visible={showInfoSheet}
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function Index() {

return (
<View style={styles.container}>
<OnboardingVideo visible={showVideo} onFinish={handleVideoFinish} />
{showVideo && <OnboardingVideo visible={showVideo} onFinish={handleVideoFinish} />}
</View>
);
}
Expand Down
Loading