Skip to content

Adding recovery phrase video to onboarding process#10717

Merged
ryanml merged 2 commits intodevelopfrom
seed-phrase-video
Apr 13, 2021
Merged

Adding recovery phrase video to onboarding process#10717
ryanml merged 2 commits intodevelopfrom
seed-phrase-video

Conversation

@ryanml
Copy link
Copy Markdown
Contributor

@ryanml ryanml commented Mar 25, 2021

Related: #10244

Screen Shot 2021-03-25 at 2 47 23 AM

Manual testing steps:

  • Clean install MetaMask
  • Select the "Create Account Route"
  • Confirm after creating a password you are directed to the seed phrase video page
  • Confirm that clicking next further continues on to the reveal seed phrase page
  • Confirm that this component is not shown in the "Import Account flow" on fresh install"

@ryanml ryanml requested a review from a team as a code owner March 25, 2021 09:49
@ryanml ryanml self-assigned this Mar 25, 2021
@ryanml ryanml requested a review from shanejonas March 25, 2021 09:49
@kumavis
Copy link
Copy Markdown
Member

kumavis commented Mar 25, 2021

😎 😎 😎

@kumavis
Copy link
Copy Markdown
Member

kumavis commented Mar 25, 2021

note: video is delivered as part of extension, adds ~3mb (seems reasonable)

@kumavis
Copy link
Copy Markdown
Member

kumavis commented Mar 25, 2021

how to intlize video? is it possible to include and specify alternate audio tracks?

@ryanml
Copy link
Copy Markdown
Contributor Author

ryanml commented Mar 25, 2021

how to intlize video? is it possible to include and specify alternate audio tracks?

@kumavis see https://consensys.slack.com/archives/GETEW1V4M/p1616604943116400 for relevant discussion, I think we'll follow up on this

@ryanml ryanml force-pushed the seed-phrase-video branch 2 times, most recently from c2d4231 to 88a1873 Compare March 25, 2021 10:42
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [88a1873]
Page Load Metrics (604 ± 26 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint438158115
domContentLoaded4777486025326
load4787506045326
domInteractive4777476025326

return (
<DragDropContextProvider backend={HTML5Backend}>
<div className="first-time-flow__wrapper">
<div className={`first-time-flow__wrapper ${introClass}`}>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When we modify the rest of the onboarding flow to follow the new designs, we can just bake rules directly in to first-time-flow__wrapper. Presently, it doesn't play so nicely with the new video screen

@danjm danjm requested a review from rachelcope March 25, 2021 17:23
@ryanml ryanml force-pushed the seed-phrase-video branch from 88a1873 to f0c6beb Compare March 25, 2021 20:26
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [f0c6beb]
Page Load Metrics (690 ± 36 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint448060105
domContentLoaded5798366897536
load5798376907436
domInteractive5788366877536

rachelcope
rachelcope previously approved these changes Mar 25, 2021
Copy link
Copy Markdown

@rachelcope rachelcope left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

Looks awesome, a few change reqs but overall very excited about this landing.

// Routes
import { INITIALIZE_SEED_PHRASE_ROUTE } from '../../../../helpers/constants/routes';

export default class SeedPhraseIntro extends PureComponent {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[REQ] We don't want to extend the pattern of using class components and splitting into containers/components. Could you refactor this into a functional component?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Force of habit ;) Can do!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done


return (
<div className="seed-phrase-intro__sidebar">
<div className="seed-phrase-intro__sidebar-block">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Try to use <Box> for some of these divs. Box is a layout component with various props for controlling size/spacing/layout.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Using box where it seems to make sense now

</div>
</div>
<div className="seed-phrase-intro__sidebar-block">
<div className="seed-phrase-intro__sidebar-title">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Try using <Typography> and semantic html tags like heading tags/p tags/span tags where appropriate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done!

&__sidebar {
padding: 15px;
border-radius: 8px;
border: 1px solid #d6d9dc;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't use hex codes, match them to the color from the design system colors file. In this case $ui-2. https://github.com/MetaMask/metamask-extension/blob/12c614cc14fa9a146170e1989726deb758da310b/ui/app/css/design-system/colors.scss#L78-L110

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

}
}

&__title {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This class, for example, can be expressed with Typography

<Typography color={COLORS.BLACK} variant={TYPOGRAPHY.H1} boxProps={{ marginTop: 0, marginBottom: 4 }} >

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, and this rule removed as a result

Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

Oops, was meant to hit req changes ;P

@ryanml ryanml dismissed stale reviews from ghost and rachelcope via 963d4ea April 6, 2021 01:22
@ryanml ryanml force-pushed the seed-phrase-video branch from f0c6beb to 963d4ea Compare April 6, 2021 01:22
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [963d4ea]
Page Load Metrics (521 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint43655063
domContentLoaded3155975198742
load3165985218742
domInteractive3155965188742

@ryanml ryanml force-pushed the seed-phrase-video branch from 963d4ea to e0438df Compare April 11, 2021 00:48
@ryanml
Copy link
Copy Markdown
Contributor Author

ryanml commented Apr 11, 2021

Changes pushed cc: @brad-decker

@ryanml ryanml force-pushed the seed-phrase-video branch 2 times, most recently from db60d3d to b2a29b5 Compare April 11, 2021 01:04
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [b2a29b5]
Page Load Metrics (631 ± 72 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint48856294
domContentLoaded37880563015072
load37980663114972
domInteractive37880463015072

brad-decker
brad-decker previously approved these changes Apr 12, 2021
Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

LGTM, just a question

</ul>
</Box>
<Box marginBottom={4}>
<span className="seed-phrase-intro__sidebar-title">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question: Why could the sidebar-title class items not be converted into Typography components?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

seed-phrase-intro__sidebar-title css removed and elements converted to use the Typography component 👍

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [512393b]
Page Load Metrics (571 ± 48 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint478457115
domContentLoaded34865956910148
load35066057110048
domInteractive34865856910148

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [a61a66a]
Page Load Metrics (585 ± 45 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint46705774
domContentLoaded3766855849545
load3786865859445
domInteractive3766855849545

Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

LGTM!

@ryanml ryanml merged commit 9e918b6 into develop Apr 13, 2021
@ryanml ryanml deleted the seed-phrase-video branch April 13, 2021 22:29
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants