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

First time flow updates #6192

Merged
merged 16 commits into from
Feb 27, 2019
Merged

First time flow updates #6192

merged 16 commits into from
Feb 27, 2019

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Feb 20, 2019

fixes #6163

Final design decisions pending. Tests will be updated once design decisions finalized.

peek 2019-02-20 16-52


peek 2019-02-20 13-59


peek 2019-02-20 21-40

@danjm danjm requested a review from whymarrh as a code owner February 20, 2019 20:24
@danjm danjm added the DO-NOT-MERGE Pull requests that should not be merged label Feb 20, 2019
@danjm danjm mentioned this pull request Feb 21, 2019
6 tasks
@danjm danjm force-pushed the onboarding-flow-updates branch from a15c406 to 68cdc38 Compare February 26, 2019 16:28
@metamaskbot
Copy link
Collaborator

Builds ready [68cdc38]: mascara, chrome, firefox, edge, opera

@danjm danjm removed the DO-NOT-MERGE Pull requests that should not be merged label Feb 26, 2019
Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

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

I left a few comments inline. Also, if we're removing the notices should we also remove the components and files (the notices/ directory?) associated with them?

"message": "Be careful with your seed phrase — there have been reports of websites that attempt to imitate MetaMask. MetaMask will never spontaneously ask for your seed phrase!"
},
"protectYourKeysMessage2": {
"message": "Keep your phrase safe. If you see something phishy, or you’re uncertain about a website, email support@metamask.io."
Copy link
Contributor

Choose a reason for hiding this comment

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

Should "phishy" here be "fishy"? Fishy seems like actual word[1][2][3][4] for this context?

Also, do we want to have the period at the end of the sentence following the email address? I don't have a strong opinion either way, but it could be confusing to some users who will inevitably copy and paste the address with a period.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in e7b8ea021

@@ -6,6 +6,6 @@ set -o pipefail

export PATH="$PATH:./node_modules/.bin"

shell-parallel -s 'npm run ganache:start -- -b 2' -x 'sleep 5 && static-server test/e2e/beta/contract-test --port 8080' -x 'sleep 5 && mocha test/e2e/beta/metamask-beta-ui.spec'
# shell-parallel -s 'npm run ganache:start -- -b 2' -x 'sleep 5 && static-server test/e2e/beta/contract-test --port 8080' -x 'sleep 5 && mocha test/e2e/beta/metamask-beta-ui.spec'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we disabling these tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in ac872717b

@@ -131,20 +131,26 @@ export default class ImportWithSeedPhrase extends PureComponent {
return !passwordError && !confirmPasswordError && !seedPhraseError
}

toggleTermsCheck = () => {
this.setState({
Copy link
Contributor

Choose a reason for hiding this comment

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

We should prefer the updater function argument here. That is,

this.setState((prevState) => ({
    termsChecked: !prevState.termsChecked,
})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in ac872717b

{termsChecked ? <i className="fa fa-check fa-2x" /> : null}
</div>
<span className="first-time-flow__checkbox-label">
I agree to the Terms Of Service
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we extract this into a message string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in e7b8ea021

@@ -111,12 +112,29 @@ export default class NewAccount extends PureComponent {
history.push(INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE)
}

toggleTermsCheck = () => {
this.setState({
Copy link
Contributor

Choose a reason for hiding this comment

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

We should prefer the updater function argument here. That is,

this.setState((prevState) => ({
    termsChecked: !prevState.termsChecked,
})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 51fb72b40

{termsChecked ? <i className="fa fa-check fa-2x" /> : null}
</div>
<span className="first-time-flow__checkbox-label">
I agree to the Terms Of Service
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we extract this into a message string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in e7b8ea021

className="first-time-flow__button"
onClick={() => history.push(INITIALIZE_NOTICE_ROUTE)}
onClick={async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this handler async?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in ac872717b

history.push(DEFAULT_ROUTE)
}}
>
{ 'All Done' }
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we inline all of the strings in this component? Or maybe we should even extract them into message strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in e7b8ea021

import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Button from '../../../button'
import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_NOTICE_ROUTE, INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE } from '../../../../routes'
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: can we split this import onto multiple lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in ac872717b

{ 'Import Wallet' }
</div>
<div className="select-action__button-text-small">
{ 'Import your existing wallet using a 12 word seed phrase' }
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we extract the messages in this component into message strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in e7b8ea021

@danjm
Copy link
Contributor Author

danjm commented Feb 27, 2019

@whymarrh noticed related code removed in 275f7c247

@metamaskbot
Copy link
Collaborator

Builds ready [275f7c2]: mascara, chrome, firefox, edge, opera

"message": "You passed the test - keep your seedphrase safe, it's your responsibility!"
},
"endOfFlowMessage2": {
"message": "Tips on storing it safely "
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: trailing space

"message": "Tips on storing it safely "
},
"endOfFlowMessage3": {
"message": "• Save a backup in multiple places"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can we factor out the bullet?

"message": "• Save a backup in multiple places"
},
"endOfFlowMessage4": {
"message": "• Never tell anyone"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can we factor out the bullet?

"message": "If you need to back it up again, you can find them in Settings -> Security."
},
"endOfFlowMessage6": {
"message": "*Metamask cannot recover your seedphrase. Learn more."
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can we factor out the bullet?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: also s/Metamask/MetaMask/

"message": "• Never tell anyone"
},
"endOfFlowMessage5": {
"message": "If you need to back it up again, you can find them in Settings -> Security."
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: s/find them/find it/ I think? Or maybe s/back it up/back them up/ if that works?

"message": "Protect Your Keys!"
},
"protectYourKeysMessage1": {
"message": "Be careful with your seed phrase — there have been reports of websites that attempt to imitate MetaMask. MetaMask will never spontaneously ask for your seed phrase!"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: should we drop "spontaneously"? Below we have yourUniqueAccountImageDescription3 plainly saying never.

@danjm danjm force-pushed the onboarding-flow-updates branch from 51fb72b to 5771a6f Compare February 27, 2019 14:04
@metamaskbot
Copy link
Collaborator

Builds ready [5771a6f]: mascara, chrome, firefox, edge, opera

@whymarrh whymarrh merged commit cb2698d into develop Feb 27, 2019
@whymarrh whymarrh deleted the onboarding-flow-updates branch February 27, 2019 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streamline onboarding flow
3 participants