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

[Wallet] Various onboarding fixes #4213

Merged
merged 8 commits into from
Jun 25, 2020
Merged

Conversation

jeanregisser
Copy link
Contributor

@jeanregisser jeanregisser commented Jun 25, 2020

Description

  • Fix insufficient fund error briefly shown while fetching the balance after enter the invide code
  • Hide back button when no back action is possible
  • Tweak VerificationLoadingScreen and Interstitial with new colors and fonts
  • Update onboarding colors from latest design changes
  • Fix nav bar visible in the onboarding success screen

Tested

Yes ;-)

Related issues

Backwards compatibility

Yes

- Fix insufficient fund error briefly shown while fetching the balance after enter the invide code
- Hide back button when no back action is possible
- Tweak VerificationLoadingScreen and Interstitial with new colors and fonts
@jeanregisser jeanregisser requested a review from a team June 25, 2020 15:21
@@ -43,7 +44,7 @@ class VerificationInterstitialScreen extends React.Component<WithTranslation> {
<AnimatedCircle />
<AnimatedCircle />
</View>
<Text style={fontStyles.h1}>{t('interstitial.header')}</Text>
<Text style={fontStyles.h2}>{t('interstitial.header')}</Text>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Define in stylesheet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarikbellamine There's not reason to redefine this in the stylesheet if we don't deviate from the predefined value in fontStyles.

@@ -19,7 +20,7 @@ const AnimatedCircle = () => (
)

class VerificationInterstitialScreen extends React.Component<WithTranslation> {
static navigationOptions = { gestureEnabled: false, header: null }
static navigationOptions = noHeaderGestureDisabled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does defining navigation options like this still work as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, tested successfully.

Copy link
Contributor

@tarikbellamine tarikbellamine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! Left small questions but think this is pretty much good to go once the tests are passing

Copy link
Contributor

@jmrossy jmrossy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! A few small comments below :)

const { t } = useTranslation(Namespaces.onboarding)
const userBalance = useSelector((state) => state.stableToken.balance)
const balanceIsSufficient = isUserBalanceSufficient(userBalance, VERIFICATION_FEE_ESTIMATE)
// For now only show error if user has pressed start
// with the idea being that by the time the user is done reading the screen the balance will already be known
const showError = hasPressedStart && !balanceIsSufficient
const dispatch = useDispatch()
const headerHeight = useHeaderHeight()
const insets = useSafeArea()

function onPressStart() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: These should be arrow functions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍

@@ -43,7 +44,7 @@ class VerificationInterstitialScreen extends React.Component<WithTranslation> {
<AnimatedCircle />
<AnimatedCircle />
</View>
<Text style={fontStyles.h1}>{t('interstitial.header')}</Text>
<Text style={fontStyles.h2}>{t('interstitial.header')}</Text>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarikbellamine There's not reason to redefine this in the stylesheet if we don't deviate from the predefined value in fontStyles.

@@ -123,8 +126,8 @@ class VerificationLoadingScreen extends React.Component<Props> {
<View style={styles.buttonCancelContainer}>
<CancelButton onCancel={this.onCancel} />
</View>
<DevSkipButton nextScreen={Screens.VerificationInterstitialScreen} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember if this is my bug or someone else's but this screen shouldn't have a DevSkipButton. It won't work as expected with verification ongoing in the background. If devs want to skip they should just choose skip on the education screen

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense yes, removing then 👍

@jeanregisser jeanregisser added the automerge Have PR merge automatically when checks pass label Jun 25, 2020
@mergify mergify bot merged commit 1db7e5b into master Jun 25, 2020
@mergify mergify bot deleted the jeanregisser/onboarding-polish branch June 25, 2020 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nothing happen when user taps on "<" from Select language screen after launching the fresh installed app
3 participants