Skip to content

Commit

Permalink
iOS review
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis committed Apr 29, 2024
1 parent 4eb22e4 commit 8fc0a5f
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 75 deletions.
2 changes: 1 addition & 1 deletion app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config: ExpoConfig = {
statusUrl: process.env.DUO_STATUS_URL,
},
ios: {
bundleIdentifier: "app.duolicious"
bundleIdentifier: "app.duolicious",
},
plugins: [
"expo-secure-store",
Expand Down
Binary file added assets/ios-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ios-splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 18 additions & 14 deletions components/in-depth-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { api } from '../api/api';
import { StatusBarSpacer } from './status-bar-spacer';
import { FloatingBackButton } from './prospect-profile-screen';
import { CardState } from './quiz-card';
import { filteredTraits } from '../data/filtered-traits';

const sideMargins: StyleProp<ViewStyle> = {
marginLeft: 10,
Expand Down Expand Up @@ -306,20 +307,23 @@ const InDepthScreen = (navigationRef) => ({navigation, route}) => {
const Charts = ({data}) => {
return (
<View style={sideMargins}>
{data.map((trait) =>
<Chart
key={JSON.stringify(trait)}
dimensionName={trait.trait_min_label ? undefined : trait.trait_name}
minLabel={trait.trait_min_label}
maxLabel={trait.trait_max_label}
name1={trait.prospect_name ?? undefined}
percentage1={trait.prospect_percentage ?? undefined}
name2="You"
percentage2={trait.person_percentage ?? undefined}
>
{trait.trait_description}
</Chart>
)}
{data
.filter((trait) => !filteredTraits.includes(trait.trait_name))
.map((trait) =>
<Chart
key={JSON.stringify(trait)}
dimensionName={trait.trait_min_label ? undefined : trait.trait_name}
minLabel={trait.trait_min_label}
maxLabel={trait.trait_max_label}
name1={trait.prospect_name ?? undefined}
percentage1={trait.prospect_percentage ?? undefined}
name2="You"
percentage2={trait.person_percentage ?? undefined}
>
{trait.trait_description}
</Chart>
)
}
</View>
);
};
Expand Down
9 changes: 9 additions & 0 deletions components/logo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import Svg, { G, Rect } from "react-native-svg"
import { Platform } from 'react-native';

const Logo16 = ({
size = 48,
Expand All @@ -10,6 +11,10 @@ const Logo16 = ({
color?: string,
rectSize?: number,
}) => {
if (Platform.OS === 'ios') {
return <></>;
}

return (
<Svg
width={size}
Expand Down Expand Up @@ -227,6 +232,10 @@ const Logo14 = ({
color?: string,
rectSize?: number,
}) => {
if (Platform.OS === 'ios') {
return <></>;
}

return (
<Svg
width={size}
Expand Down
21 changes: 11 additions & 10 deletions components/prospect-profile-screen.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import {
ActivityIndicator,
Animated,
Platform,
Pressable,
SafeAreaView,
ScrollView,
StyleProp,
StyleSheet,
TextStyle,
View,
ViewStyle,
SafeAreaView,
} from 'react-native';
import {
useCallback,
Expand Down Expand Up @@ -729,10 +730,10 @@ const Body = ({
{data?.gender &&
<Basic icon={faVenusMars}>{data.gender}</Basic>}

{data?.orientation &&
{data?.orientation && Platform.OS !== 'ios' &&
<Basic icon="person">{data.orientation}</Basic>}

{data?.relationship_status &&
{data?.relationship_status && Platform.OS !== 'ios' &&
<Basic icon="heart">{data.relationship_status}</Basic>}

{data?.occupation &&
Expand All @@ -741,17 +742,17 @@ const Body = ({
{data?.education &&
<Basic icon="school">{data.education}</Basic>}

{data?.has_kids === 'Yes' &&
{data?.has_kids === 'Yes' && Platform.OS !== 'ios' &&
<Basic icon="people">Has kids</Basic>}
{data?.has_kids === 'No' &&
{data?.has_kids === 'No' && Platform.OS !== 'ios' &&
<Basic icon="people">Doesn't have kids</Basic>}

{data?.wants_kids === 'Yes' &&
{data?.wants_kids === 'Yes' && Platform.OS !== 'ios' &&
<Basic icon="people">Wants kids</Basic>}
{data?.wants_kids === 'No' &&
{data?.wants_kids === 'No' && Platform.OS !== 'ios' &&
<Basic icon="people">Doesn't want kids</Basic>}

{data?.looking_for &&
{data?.looking_for && Platform.OS !== 'ios' &&
<Basic icon="eye">Looking for {data.looking_for.toLowerCase()}</Basic>}

{data?.smoking === 'Yes' &&
Expand All @@ -770,9 +771,9 @@ const Body = ({
{data?.religion &&
<Basic icon={faHandsPraying}>{data.religion}</Basic>}

{data?.long_distance === 'Yes' &&
{data?.long_distance === 'Yes' && Platform.OS !== 'ios' &&
<Basic icon="globe">Open to long distance</Basic>}
{data?.long_distance === 'No' &&
{data?.long_distance === 'No' && Platform.OS !== 'ios' &&
<Basic icon="globe">Not open to long distance</Basic>}

{data?.star_sign &&
Expand Down
22 changes: 13 additions & 9 deletions components/quiz-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
Animated,
Dimensions,
ImageBackground,
Platform,
Pressable,
View,
} from 'react-native';
Expand Down Expand Up @@ -363,8 +364,11 @@ const NonInteractiveQuizCard = ({children, ...props}) => {
{showTutorial && questionNumber === 1 &&
<DefaultText style={{fontSize: adjustedFontSize * 0.8}}>
👋 Welcome to Duolicious Q&A, where we pick your brain in the
quest to unearth your perfect match! Let's start with an easy
one:
quest to
{Platform.OS === 'ios' ?
' find your matches! ' :
' unearth your perfect match! '}
Let's start with an easy one:
{'\n\n'}
</DefaultText>
}
Expand All @@ -377,36 +381,36 @@ const NonInteractiveQuizCard = ({children, ...props}) => {
}
{showTutorial && questionNumber === 3 &&
<DefaultText style={{fontSize: adjustedFontSize * 0.8}}>
You're on a roll! Next question...
Youre on a roll! Next question...
{'\n\n'}
</DefaultText>
}
{showTutorial && questionNumber === 4 &&
<DefaultText style={{fontSize: adjustedFontSize * 0.8}}>
Some questions seem pretty silly, but we promise they help us
figure out who's right for you. Our smartypants AI told us so.
figure out whos right for you. Our smartypants AI told us so.
{'\n\n'}
</DefaultText>
}
{showTutorial && questionNumber === 5 &&
<DefaultText style={{fontSize: adjustedFontSize * 0.8}}>
...But if a question is too silly (or controversial, or you're
...But if a question is too silly (or controversial, or youre
just on the fence), then you can always skip by swiping down.
{'\n\n'}
</DefaultText>
}
{showTutorial && questionNumber === 6 &&
<DefaultText style={{fontSize: adjustedFontSize * 0.8}}>
If you've got an extra-spicy hot take, you can also answer
privately. Just uncheck "answer publicly". We'll keep your
privately. Just uncheck answer publicly. Well keep your
answer hidden, but still use it to sort the folders from the
scrunchers.
{'\n\n'}
</DefaultText>
}
{showTutorial && questionNumber === 7 &&
<DefaultText style={{fontSize: adjustedFontSize * 0.8}}>
Looks like you've got the hang of it. We're gonna zip it and
Looks like youve got the hang of it. Were gonna zip it and
let you find your match{'\u00A0'}💑. Happy swiping!
{'\n\n'}
</DefaultText>
Expand All @@ -415,13 +419,13 @@ const NonInteractiveQuizCard = ({children, ...props}) => {
{showTutorial && questionNumber === 1 &&
<DefaultText style={{fontSize: adjustedFontSize * 0.8}}>
{'\n\n'}
Drag this card left for "no", or right for "yes"
Drag this card left for “no”, or right for yes
</DefaultText>
}
{showTutorial && questionNumber === 2 &&
<DefaultText style={{fontSize: adjustedFontSize * 0.8}}>
{'\n\n'}
(Left is "no", right is "yes")
(Left is “no”, right is yes)
</DefaultText>
}
{showTutorial && questionNumber === 3 &&
Expand Down
32 changes: 18 additions & 14 deletions components/traits-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { DuoliciousTopNavBar } from './top-nav-bar';
import { referrerId } from '../App';
import { api } from '../api/api';
import { useFocusEffect } from '@react-navigation/native';
import { filteredTraits } from '../data/filtered-traits';

const sideMargins: StyleProp<ViewStyle> = {
marginLeft: 10,
Expand Down Expand Up @@ -156,20 +157,23 @@ const TraitsTab = () => {
<ShareNotice personId={data.person_id}/>
}

{data.personality.map((trait) =>
<Chart
key={JSON.stringify(trait)}
dimensionName={trait.trait_min_label ? undefined : trait.trait_name}
minLabel={trait.trait_min_label}
maxLabel={trait.trait_max_label}
name1={null}
percentage1={trait.person_percentage ?? undefined}
name2={undefined}
percentage2={undefined}
>
{trait.trait_description}
</Chart>
)}
{data.personality
.filter((trait) => !filteredTraits.includes(trait.trait_name))
.map((trait) =>
<Chart
key={JSON.stringify(trait)}
dimensionName={trait.trait_min_label ? undefined : trait.trait_name}
minLabel={trait.trait_min_label}
maxLabel={trait.trait_max_label}
name1={null}
percentage1={trait.person_percentage ?? undefined}
name2={undefined}
percentage2={undefined}
>
{trait.trait_description}
</Chart>
)
}
</ScrollView>
</SafeAreaView>
);
Expand Down
5 changes: 4 additions & 1 deletion components/welcome-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ const WelcomeScreen_ = (numUsers: number) => ({navigation}) => {
fontFamily: 'MontserratBlack',
}}
>
Cute dates & dank memes await...
{Platform.OS === 'ios' ?
'Meet new people & chat' :
'Cute dates & dank memes await...'
}
</DefaultText>
{(Platform.OS === 'web' || height > 500) &&
<DefaultText
Expand Down
11 changes: 11 additions & 0 deletions data/filtered-traits.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const filteredTraits = [
'Emotional Openness in Relationships',
'Love Focus',
'Preference for Monogamy',
'Sex Focus',
'Traditionalism about Love',
];

export {
filteredTraits,
};
Loading

0 comments on commit 8fc0a5f

Please sign in to comment.