Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final Project Complete #79

Merged
merged 83 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
11460d2
Added frontend functionality for updating profile pic
pvanderlaat Oct 22, 2023
e6dd140
Fixed styling and images.
flemingvincent Oct 23, 2023
e566db2
Merge pull request #53 from FlemingVincent/feature/profile-pic-settings
flemingvincent Oct 26, 2023
3dc0fa5
Add Features (update UserID, Auth Email, Auth Password)
VicTu946 Nov 1, 2023
ee2bdbd
update update profile feature
VicTu946 Nov 1, 2023
c3e1615
complete the OTP check before entering new passwords
ChristianDeGuzmanUF Nov 3, 2023
a735f1a
Merge pull request #55 from FlemingVincent/feature/digitcode_validati…
flemingvincent Nov 3, 2023
4a8a2a5
Built out Join Circle screen UI. Linting.
flemingvincent Nov 7, 2023
071da31
Merge pull request #56 from FlemingVincent/feature/join-circle-screen
pvanderlaat Nov 7, 2023
9186d66
Add basic screen for creating a circle.
pvanderlaat Nov 8, 2023
9245659
Extract ScreenIndicator to util file. Remove duplication
pvanderlaat Nov 8, 2023
bec82ae
Remove duplicate code from forgot-pass-screen
pvanderlaat Nov 8, 2023
9e6598a
Remove duplicate code from create circle screen
pvanderlaat Nov 8, 2023
377ca7f
Implement create circle and invitation code
ChristianDeGuzmanUF Nov 13, 2023
a94ad8b
Linting
flemingvincent Nov 14, 2023
4110d56
Merge pull request #59 from FlemingVincent/feature/create-circle-screen
flemingvincent Nov 14, 2023
4f6bed0
Linting
flemingvincent Nov 14, 2023
271096a
Merge pull request #60 from FlemingVincent/feature/create-circle-scre…
flemingvincent Nov 14, 2023
4166416
Add drop down for circle selection
pvanderlaat Nov 14, 2023
fa88b8a
Please enter the commit message for your changes. Lines starting
VicTu946 Nov 15, 2023
309d1d3
Merge branch 'feature/profile_update' of https://github.com/FlemingVi…
VicTu946 Nov 15, 2023
5e1ee7e
"update Setting file"
VicTu946 Nov 15, 2023
448225b
Remove package-lock.json since we're using Yarn. Updated dropdown sty…
flemingvincent Nov 15, 2023
96bbe6a
Merge pull request #61 from FlemingVincent/feature/map-filter
flemingvincent Nov 15, 2023
0d4d28b
update Settings.tsx file#
VicTu946 Nov 15, 2023
2b2d3e6
Linting.
flemingvincent Nov 15, 2023
c19e97f
Fixed username and email validation in settings. Added alerts for suc…
flemingvincent Nov 15, 2023
d811529
finish updateProfilePicture
VicTu946 Nov 15, 2023
9b7724d
Merge branch 'feature/profile_update' of https://github.com/FlemingVi…
VicTu946 Nov 15, 2023
dc45b76
Added todo comments for updating avatar_url in profiles table. Added …
flemingvincent Nov 15, 2023
cbee26c
"Update feature/updateAvatars"
VicTu946 Nov 15, 2023
eda0487
Updating profileStore whenever the user updates their avatar_url.
flemingvincent Nov 15, 2023
a8e41a7
Merge branch 'development' into feature/profile_update
flemingvincent Nov 15, 2023
036c97b
Merge pull request #57 from FlemingVincent/feature/profile_update
flemingvincent Nov 15, 2023
5cc172e
Fixing ForgotPassword bug from merge conflicts.
flemingvincent Nov 15, 2023
5763dc9
Merge pull request #62 from FlemingVincent/fix/forgot-password-bug
flemingvincent Nov 15, 2023
2f95a83
Fully implemented status functionality.
flemingvincent Nov 16, 2023
9df3a63
Merge pull request #63 from FlemingVincent/feature/profile-status
pvanderlaat Nov 16, 2023
869dd18
Add frontend functionality for toggling users per circle
pvanderlaat Nov 16, 2023
3309e21
Implement join circle using invitation code, right now it is just con…
ChristianDeGuzmanUF Nov 17, 2023
4b64b1e
Minor fixes to syling, everything looks good!
flemingvincent Nov 17, 2023
3d0f211
Merge pull request #64 from FlemingVincent/feature/filter-users-frontend
flemingvincent Nov 17, 2023
95a41da
Search functionality, including querying profiles, selecting and remo…
flemingvincent Nov 17, 2023
38e2d9c
Merge pull request #66 from FlemingVincent/feature/invite-friends-sea…
gabcoroba Nov 18, 2023
56354fa
Merge pull request #65 from FlemingVincent/feature/join-a-circle-usin…
gabcoroba Nov 18, 2023
9a20df8
add expo-notifications package
gabcoroba Nov 18, 2023
9978e57
Use supabase to populate circles and profiles location mapping data
ChristianDeGuzmanUF Nov 19, 2023
9d3e098
Store expo push token when user logs in
gabcoroba Nov 19, 2023
0fe4117
Send notifications successful. Code undefined
gabcoroba Nov 19, 2023
c024e59
Linting
flemingvincent Nov 21, 2023
3410048
Working basic push invite code feature
gabcoroba Nov 21, 2023
56f86ec
Tap on notification leads to join circle screen
gabcoroba Nov 23, 2023
1ac6fd1
Tapping copies code to clipboard
gabcoroba Nov 23, 2023
6396432
Fix invite friend search bug and linting
flemingvincent Nov 26, 2023
37f2882
Add notifications option to settings screen with hardcoded frontend
flemingvincent Nov 26, 2023
dddd7d4
adding clipboard call to handler
gabcoroba Nov 26, 2023
0cccd32
refactor navigation out of push
gabcoroba Nov 26, 2023
3e5b061
Move notification listener to Home
gabcoroba Nov 26, 2023
23a7060
Added success alerts and navigation after creating and joining a circle.
flemingvincent Nov 28, 2023
8b39759
Merge pull request #69 from FlemingVincent/feature/send-invite-push-n…
flemingvincent Nov 28, 2023
5e9e42b
Merge branch 'development' into feature/toggling-users-percircle-backend
flemingvincent Nov 28, 2023
2230205
Merge pull request #67 from FlemingVincent/feature/toggling-users-per…
flemingvincent Nov 28, 2023
626856c
Fixed linting issue from merge conflict.
flemingvincent Nov 28, 2023
4558134
Merge pull request #70 from FlemingVincent/fix/home-linting
flemingvincent Nov 28, 2023
961683c
Fix two bugs related to displaying cirles.
pvanderlaat Nov 28, 2023
a1e6741
Merge pull request #71 from FlemingVincent/feature/fix-two-bugs
flemingvincent Nov 28, 2023
fda3326
fix forgot password
ChristianDeGuzmanUF Nov 29, 2023
08b8f0c
Merge pull request #72 from FlemingVincent/feature/fix-forgot-password
flemingvincent Nov 29, 2023
c2777aa
Removed email and notifications from settings.
flemingvincent Nov 29, 2023
914a7a4
Merge pull request #73 from FlemingVincent/fix/remove-email-and-notif…
gabcoroba Nov 29, 2023
375ec38
Delete notification on emulator alert
gabcoroba Nov 29, 2023
c0af0de
Merge pull request #74 from FlemingVincent/feature/send-invite-push-n…
flemingvincent Nov 29, 2023
6d1b9ff
Add circle to user's circle list after joining.
pvanderlaat Dec 1, 2023
6bd30fe
Linting.
pvanderlaat Dec 1, 2023
e9cd13a
Merge pull request #75 from FlemingVincent/feature/update-circle-afte…
flemingvincent Dec 1, 2023
b98f6fb
bug/Android Circle bug fix
gabcoroba Dec 1, 2023
b469f77
Merge pull request #76 from FlemingVincent/bug/android-map-fix
flemingvincent Dec 2, 2023
0063694
fix android avatar overflow
ChristianDeGuzmanUF Dec 3, 2023
1b4cf32
Merge pull request #77 from FlemingVincent/bug/android-avatar-overflo…
gabcoroba Dec 3, 2023
064914a
add a refresh button to get new users in circle
pvanderlaat Dec 3, 2023
44b9f06
Updated refresh map icon and linting.
flemingvincent Dec 4, 2023
7c40b26
Fix spacing
flemingvincent Dec 4, 2023
50e25e9
Merge pull request #78 from FlemingVincent/feature/refresh-button
flemingvincent Dec 4, 2023
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
22 changes: 14 additions & 8 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ import { useFonts } from "expo-font";
import * as SplashScreen from "expo-splash-screen";
import { StatusBar } from "expo-status-bar";
import { useEffect } from "react";
import { LogBox } from "react-native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { useDeviceContext } from "twrnc";

import tw from "@/lib/tailwind";
import { AuthProvider } from "@/providers/AuthProvider";
import { CircleProvider } from "@/providers/CircleProvider";
import { LocationProvider } from "@/providers/LocationProvider";
import { AppRoutes } from "@/routes";

SplashScreen.preventAutoHideAsync();

LogBox.ignoreAllLogs();

export default function App() {
useDeviceContext(tw);

Expand Down Expand Up @@ -41,14 +45,16 @@ export default function App() {
return (
<AuthProvider>
<LocationProvider>
<GestureHandlerRootView style={tw`flex-1`}>
<BottomSheetModalProvider>
<SafeAreaProvider>
<StatusBar style="dark" />
<AppRoutes />
</SafeAreaProvider>
</BottomSheetModalProvider>
</GestureHandlerRootView>
<CircleProvider>
<GestureHandlerRootView style={tw`flex-1`}>
<BottomSheetModalProvider>
<SafeAreaProvider>
<StatusBar style="dark" />
<AppRoutes />
</SafeAreaProvider>
</BottomSheetModalProvider>
</GestureHandlerRootView>
</CircleProvider>
</LocationProvider>
</AuthProvider>
);
Expand Down
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,36 @@
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"lint": "eslint ."
"lint": "eslint .",
"lint-fix": "eslint --fix ."
},
"dependencies": {
"@gorhom/bottom-sheet": "^4",
"@hookform/resolvers": "^3.3.1",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-native-clipboard/clipboard": "^1.12.1",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@supabase/supabase-js": "^2.36.0",
"eslint-plugin-prettier": "^5.0.0",
"expo": "~49.0.8",
"expo-clipboard": "~4.3.1",
"expo-constants": "~14.4.2",
"expo-device": "~5.4.0",
"expo-font": "~11.4.0",
"expo-image": "~1.3.4",
"expo-image": "~1.3.5",
"expo-image-picker": "~14.3.2",
"expo-location": "~16.1.0",
"expo-notifications": "~0.20.1",
"expo-router": "^2.0.13",
"expo-secure-store": "~12.3.1",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"expo-updates": "~0.18.16",
"expo-updates": "~0.18.17",
"react": "18.2.0",
"react-hook-form": "^7.46.1",
"react-native": "0.72.5",
"react-native": "0.72.6",
"react-native-dropdown-select-list": "^2.0.5",
"react-native-gesture-handler": "~2.12.0",
"react-native-maps": "^1.7.1",
"react-native-reanimated": "3.3.0",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/icons/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/assets/icons/refresh-map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions src/components/Push.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import Constants from "expo-constants";
import * as Device from "expo-device";
import * as Notifications from "expo-notifications";
import { Platform } from "react-native";

Notifications.setNotificationHandler({
handleNotification: async (notification) => {
return {
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: false,
};
},
});

async function sendPushInviteCode(
expoPushToken: string,
code: string | undefined,
) {
const message = {
to: expoPushToken,
sound: "default",
title: "Circles",
body: `You've been invited to a circle, tap to join with code: ${code}`,
priority: "high",
data: {
screen: "Join",
invitationCode: code,
},
};

await fetch("https://exp.host/--/api/v2/push/send", {
method: "POST",
headers: {
Accept: "application/json",
"Accept-encoding": "gzip, deflate",
"Content-Type": "application/json",
},
body: JSON.stringify(message),
});
}

async function registerForPushNotificationsAsync() {
let token;

if (Platform.OS === "android") {
Notifications.setNotificationChannelAsync("default", {
name: "default",
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: "#FF231F7C",
});
}
// Check that is it being run on a device, not an emulator
if (Device.isDevice) {
const { status: existingStatus } =
await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
if (existingStatus !== "granted") {
const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status;
}
if (finalStatus !== "granted") {
alert("Failed to get push token for push notification!");
return "";
}
token = await Notifications.getExpoPushTokenAsync({
projectId: Constants?.expoConfig?.extra?.eas.projectId,
});
console.log(token);
}
// else {
// alert("Must use physical device for Push Notifications");
// }

return token?.data ?? "";
}

export { sendPushInviteCode, registerForPushNotificationsAsync };
6 changes: 5 additions & 1 deletion src/components/map/CustomMarker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ import { IProfile, Status } from "@/types/profile";
export interface ICustomMarkerProps {
location: IProfile["location"];
avatar_url: string | null | undefined;
status?: Status | undefined;
status?: Status | null | undefined;
}

export const CustomMarker = ({
location,
avatar_url,
status,
}: ICustomMarkerProps) => {
if (!location || !location.latitude || !location.longitude) {
return null;
}

return (
<Marker coordinate={location as LatLng}>
<Avatar
Expand Down
2 changes: 1 addition & 1 deletion src/components/sheet/CustomHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const CustomHandle: React.FC<HandleProps> = ({ navigation }) => {
style={tw`w-[1.8421875rem] h-[0.25rem] bg-[#e5e5e5] self-center rounded-full m-2.5`}
/>
<View style={tw`w-full flex-row items-center gap-x-2 mt-2 px-4`}>
<Avatar avatar_url={profile?.avatar_url} />
<Avatar avatar_url={profile?.avatar_url} status={profile?.status} />
<View style={tw`flex-col flex-grow`}>
<Text variant="headline" weight="semibold">
{profile?.first_name} {profile?.last_name}
Expand Down
20 changes: 11 additions & 9 deletions src/components/ui/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Status } from "@/types/profile";

interface IAvatarProps {
avatar_url: string | null | undefined;
status?: Status;
status?: Status | null | undefined;
style?: Image["props"]["style"];
}

Expand All @@ -18,14 +18,16 @@ export const Avatar = ({
}: IAvatarProps) => {
return (
<View>
<Image
source={
avatar_url
? { uri: avatar_url }
: require("@/assets/icons/avatar.svg")
}
style={[tw`w-11 h-11 rounded-full`, style]}
/>
<View style={[tw`rounded-full overflow-hidden`]}>
<Image
source={
avatar_url
? { uri: avatar_url }
: require("@/assets/icons/avatar.svg")
}
style={[tw`w-11 h-11 rounded-full`, style]}
/>
</View>
<View
style={[
tw`absolute top-[-1] left-[-1] w-[1.125rem] h-[1.125rem] rounded-full border-2 border-white`,
Expand Down
31 changes: 31 additions & 0 deletions src/components/ui/ScreenIndicator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Animated, {
useAnimatedStyle,
withTiming,
} from "react-native-reanimated";

import tw from "@/lib/tailwind";

interface IScreenIndicatorProps {
activeIndex: Animated.SharedValue<number>;
index: number;
}

export const ScreenIndicator = ({
activeIndex,
index,
}: IScreenIndicatorProps) => {
const rIndicatorStyle = useAnimatedStyle(() => {
return {
width: withTiming(activeIndex.value === index ? 32 : 16),
backgroundColor: withTiming(
activeIndex.value === index ? "#4DAFFF" : "#D9D9D9",
),
};
});

return (
<Animated.View
style={[tw`h-[0.1875rem] bg-red-500 rounded-full`, rIndicatorStyle]}
/>
);
};
2 changes: 2 additions & 0 deletions src/components/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ export * from "./Button";
export * from "./Input";
export * from "./Text";
export * from "./Alert";
export * from "./ScreenIndicator";
export * from "./Avatar";
5 changes: 5 additions & 0 deletions src/hooks/useCircle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { useContext } from "react";

import { CircleContext } from "@/providers/CircleProvider";

export const useCircle = () => useContext(CircleContext);
Loading