Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 134
Native Sign Up Various QA Fixes#7607
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
44f611ab21c94633d228394a08b9775a6362a169eff241cdd3580ab3912168eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -17,9 +17,11 @@ import type { CornerRadiusOptions } from '@audius/harmony-native' | ||
| import { useTheme } from '../../foundations/theme' | ||
| type CoverPhotoImage = Image | ImageSourcePropType | null | undefined | ||
| export type CoverPhotoProps = { | ||
| profilePicture?: Image | ImageSourcePropType | null | undefined | ||
| coverPhoto?: Image | ImageSourcePropType | null | undefined | ||
| profilePicture?: CoverPhotoImage | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a little weird calling it CoverPhotoImage, but i guess i get it :) | ||
| coverPhoto?: CoverPhotoImage | ||
| style?: StyleProp<ImageStyle> | ||
| children?: ReactNode | ||
| topCornerRadius?: CornerRadiusOptions | ||
| @@ -51,20 +53,38 @@ export const CoverPhoto = (props: CoverPhotoProps) => { | ||
| const fullHeightStyle = css({ height: '100%' }) | ||
| const getSource = () => { | ||
| // Having .url means its a useable image source | ||
| if (coverPhoto && !isEmpty(coverPhoto)) { | ||
| return { source: coverPhoto } | ||
| let source: Exclude<CoverPhotoImage, number> = { | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks a ton for improving this | ||
| uri: undefined | ||
| } | ||
| let usingProfilePicture = false | ||
| if (typeof source === 'number') { | ||
| return { source, usingProfilePicture } | ||
| } | ||
| if (profilePicture && !isEmpty(profilePicture)) { | ||
| return { source: profilePicture, usingProfilePicture: true } | ||
| source = profilePicture as Exclude<CoverPhotoImage, number> | ||
| usingProfilePicture = true | ||
| } | ||
| if (coverPhoto && !isEmpty(coverPhoto)) { | ||
| source = coverPhoto as Exclude<CoverPhotoImage, number> | ||
| usingProfilePicture = false | ||
| } | ||
| // Android upload format does not quite match the expected format, so we have to drill into 'file' to workaround for android | ||
| if (source && 'file' in source && !('uri' in source)) { | ||
| return { source: source.file, usingProfilePicture } | ||
| } else { | ||
| return { source, usingProfilePicture } | ||
| } | ||
| return { source: { uri: undefined } } | ||
| } | ||
| const { source, usingProfilePicture } = getSource() | ||
| return ( | ||
| <ImageBackground source={source} style={[rootStyle, style]} {...other}> | ||
| <ImageBackground | ||
| source={source as ImageSourcePropType} | ||
| style={[rootStyle, style]} | ||
| {...other} | ||
| > | ||
| {!profilePicture && !coverPhoto ? ( | ||
| <LinearGradient | ||
| colors={['rgba(0, 0, 0, 0.20)', 'rgba(0, 0, 0, 0.00)']} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -306,15 +306,9 @@ export const TextInput = forwardRef( | ||
| direction='row' | ||
| alignItems='center' | ||
| justifyContent='space-between' | ||
| gap='2xs' | ||
| > | ||
| {startAdornmentText && shouldShowAdornments ? ( | ||
| <Text | ||
| variant='label' | ||
| size='l' | ||
| color='subdued' | ||
| style={css({ lineHeight: 0 })} | ||
| > | ||
| <Text variant='title' size='l' color='subdued'> | ||
| {startAdornmentText} | ||
| </Text> | ||
| ) : null} | ||
| @@ -352,12 +346,7 @@ export const TextInput = forwardRef( | ||
| {...other} | ||
| /> | ||
| {endAdornmentText && shouldShowAdornments ? ( | ||
| <Text | ||
| variant='label' | ||
| size='l' | ||
| color='subdued' | ||
| style={css({ lineHeight: 0 })} | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The lineHeight was making the text dissappear on Android | ||
| > | ||
| <Text variant='label' size='l' color='subdued'> | ||
| {endAdornmentText} | ||
| </Text> | ||
| ) : null} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -16,6 +16,7 @@ import { useDispatch, useSelector } from 'react-redux' | ||
| import useAppState from 'app/hooks/useAppState' | ||
| import { useDrawer } from 'app/hooks/useDrawer' | ||
| import { useNavigation } from 'app/hooks/useNavigation' | ||
| import { useFeatureFlag } from 'app/hooks/useRemoteConfig' | ||
| import { useUpdateRequired } from 'app/hooks/useUpdateRequired' | ||
| import { useSyncCodePush } from 'app/screens/root-screen/useSyncCodePush' | ||
| @@ -66,6 +67,7 @@ export const RootScreen = () => { | ||
| const { isEnabled: isSignUpRedesignEnabled } = useFeatureFlag( | ||
| FeatureFlags.SIGN_UP_REDESIGN | ||
| ) | ||
| const { navigate } = useNavigation() | ||
| const { onOpen: openWelcomeDrawer } = useDrawer('Welcome') | ||
| @@ -107,14 +109,19 @@ export const RootScreen = () => { | ||
| if (showHomeStack && startedSignUp && !welcomeModalShown) { | ||
| openWelcomeDrawer() | ||
| setWelcomeModalShown(true) | ||
| // On iOS this will auto-navigate when we un-render sign up but on Android we have to navigate intentionally | ||
| if (navigate) { | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kept getting left on a blank page on Android 💀 Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. odd, sg! | ||
| navigate('HomeStack') | ||
| } | ||
| } | ||
| } | ||
| }, [ | ||
| isSignUpRedesignEnabled, | ||
| openWelcomeDrawer, | ||
| showHomeStack, | ||
| startedSignUp, | ||
| welcomeModalShown | ||
| welcomeModalShown, | ||
| navigate | ||
| ]) | ||
| return ( | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -47,6 +47,8 @@ export const Page = (props: PageProps) => { | ||
| style={[ | ||
| css({ | ||
| zIndex: 1, | ||
| minHeight: | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what I can tell, Android seems to shrink Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that sounds right, unfortunate | ||
| Dimensions.get('window').height - insets.top - insets.bottom, | ||
| paddingBottom: insets.bottom | ||
| }), | ||
| style | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -514,8 +514,10 @@ function* signUp() { | ||
| FeatureFlags.SIGN_UP_REDESIGN | ||
| ) | ||
| if (isNativeMobile && !isSignUpRedesignEnabled) { | ||
| yield* put(requestPushNotificationPermissions()) | ||
| if (isNativeMobile) { | ||
| if (!isSignUpRedesignEnabled) { | ||
| yield* put(requestPushNotificationPermissions()) | ||
| } | ||
Comment on lines
+517
to
+520
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the thing causing crashes on android (the else triggers Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes great find! | ||
| } else { | ||
| // Set the has request browser permission to true as the signon provider will open it | ||
| setHasRequestedBrowserPermission() | ||
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.
Matches pattern on web where we dont show any text since the completion checks handle that