-
Notifications
You must be signed in to change notification settings - Fork 5k
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
First time flow updates #6192
Conversation
a15c406
to
68cdc38
Compare
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.
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?
app/_locales/en/messages.json
Outdated
"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." |
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 "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.
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.
Done in e7b8ea021
test/e2e/beta/run-all.sh
Outdated
@@ -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' |
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.
Why are we disabling these tests?
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.
Fixed in ac872717b
@@ -131,20 +131,26 @@ export default class ImportWithSeedPhrase extends PureComponent { | |||
return !passwordError && !confirmPasswordError && !seedPhraseError | |||
} | |||
|
|||
toggleTermsCheck = () => { | |||
this.setState({ |
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.
We should prefer the updater
function argument here. That is,
this.setState((prevState) => ({
termsChecked: !prevState.termsChecked,
})
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.
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 |
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 we extract this into a message string?
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.
Done in e7b8ea021
@@ -111,12 +112,29 @@ export default class NewAccount extends PureComponent { | |||
history.push(INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE) | |||
} | |||
|
|||
toggleTermsCheck = () => { | |||
this.setState({ |
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.
We should prefer the updater
function argument here. That is,
this.setState((prevState) => ({
termsChecked: !prevState.termsChecked,
})
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.
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 |
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 we extract this into a message string?
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.
Done in e7b8ea021
className="first-time-flow__button" | ||
onClick={() => history.push(INITIALIZE_NOTICE_ROUTE)} | ||
onClick={async () => { |
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.
Why is this handler async
?
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.
Fixed in ac872717b
history.push(DEFAULT_ROUTE) | ||
}} | ||
> | ||
{ 'All Done' } |
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.
Can we inline all of the strings in this component? Or maybe we should even extract them into message strings?
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.
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' |
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.
Nitpick: can we split this import onto multiple lines?
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.
Fixed in ac872717b
{ 'Import Wallet' } | ||
</div> | ||
<div className="select-action__button-text-small"> | ||
{ 'Import your existing wallet using a 12 word seed phrase' } |
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 we extract the messages in this component into message strings?
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.
Done in e7b8ea021
@whymarrh noticed related code removed in 275f7c247 |
app/_locales/en/messages.json
Outdated
"message": "You passed the test - keep your seedphrase safe, it's your responsibility!" | ||
}, | ||
"endOfFlowMessage2": { | ||
"message": "Tips on storing it safely " |
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.
Nitpick: trailing space
app/_locales/en/messages.json
Outdated
"message": "Tips on storing it safely " | ||
}, | ||
"endOfFlowMessage3": { | ||
"message": "• Save a backup in multiple places" |
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.
Nit: can we factor out the bullet?
app/_locales/en/messages.json
Outdated
"message": "• Save a backup in multiple places" | ||
}, | ||
"endOfFlowMessage4": { | ||
"message": "• Never tell anyone" |
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.
Nit: can we factor out the bullet?
app/_locales/en/messages.json
Outdated
"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." |
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.
Nit: can we factor out the bullet?
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.
Nit: also s/Metamask/MetaMask/
app/_locales/en/messages.json
Outdated
"message": "• Never tell anyone" | ||
}, | ||
"endOfFlowMessage5": { | ||
"message": "If you need to back it up again, you can find them in Settings -> Security." |
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.
Nit: s/find them/find it/
I think? Or maybe s/back it up/back them up/
if that works?
app/_locales/en/messages.json
Outdated
"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!" |
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.
Nit: should we drop "spontaneously"? Below we have yourUniqueAccountImageDescription3
plainly saying never.
51fb72b
to
5771a6f
Compare
fixes #6163
Final design decisions pending. Tests will be updated once design decisions finalized.