-
Notifications
You must be signed in to change notification settings - Fork 0
feat(Onboarding) UI update and basic text input verification #24
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, it looks good. The base functionality is there, and I like the use of ScrollView for the sliding pages. Not sure if it should connect to the backend yet.
if (localAuthToken) { | ||
const payload = await getUserInfo(localAuthToken); | ||
const token = await AsyncStorage.getItem('token'); | ||
const isFirstTime = await AsyncStorage.getItem('isFirstTime'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should isFirstTime be stored in AsyncStorage? I'm guessing it should be stored on a database somewhere so that the user only needs to do onboarding once. With AsyncStorage, if the user were to log on in another device, they would see the onboarding screen again.
You can remove the AsyncStorage code for now. Luke will add a isNewUser boolean property to google and local login routes.
<View style={styles.slide}> | ||
<Text>When's your birthday?</Text> | ||
<TextInput | ||
style={styles.input} | ||
placeholder= "MM/DD/YYYY" | ||
onChangeText={setBirthday} | ||
value={birthday} | ||
/> | ||
{error2 ? ( | ||
<Text style={styles.error}>*Your Birthday is Required</Text> | ||
) : null | ||
} | ||
</View> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be input validation checking if the correct values are typed in for Birthday (maybe School too?). A date picker would also be a good choice for the Birthday.
<View style={styles.slide}> | ||
<Text>List some of your interest:</Text> | ||
<TextInput | ||
style={styles.input} | ||
placeholder= "Your Interests" | ||
onChangeText={setInterests} | ||
value={interests} | ||
/> | ||
{error3 ? ( | ||
<Text style={styles.error}>*Your Interests are Required</Text> | ||
) : null | ||
} | ||
<TouchableOpacity style={styles.button} onPress={handleSubmit}> | ||
<Text style={styles.buttonText}>Submit</Text> | ||
</TouchableOpacity> | ||
{error4 ? ( | ||
<Text style={styles.error}>*Missing Required Responses</Text> | ||
) : null | ||
} | ||
</View> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the interests, the Twitter reference you posted in the RFC looks good. You can try implementing selecting interests like that with mock data.
<View style={styles.slide}> | ||
<Text>Where do you go to school?</Text> | ||
<TextInput | ||
style={styles.input} | ||
placeholder= "Your School" | ||
onChangeText={setSchool} | ||
value={school} | ||
/> | ||
{error2 ? ( | ||
<Text style={styles.error}>*Your School is Required</Text> | ||
) : null | ||
} | ||
</View> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more optional, but I've seen other websites recommend a list of schools as you type.
<TouchableOpacity style={styles.nextBtn}> | ||
<Text>NEXT</Text> | ||
</TouchableOpacity> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next button doesn't work yet.
<View style={styles.indicator}></View> | ||
<View style={styles.indicator}></View> | ||
<View style={styles.indicator}></View> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The page indicators on the bottom should show you what page you're on (maybe with a change of color or size).
Affect Files:
packages/app/screens/onboarding/OnboardingStack.js
Screens:
Bottom Header:
Textbox Verification System:
Issues:
Fixes:
-Fixed keyboard from pushing up bottom header when selecting a textbox