feat(Onboarding) UI update and basic text input verification#24
feat(Onboarding) UI update and basic text input verification#24spoonprogram wants to merge 1 commit intomainfrom
Conversation
nappalion
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
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