Skip to content

Commit

Permalink
Update design for metametrics opt-in screen
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Feb 15, 2019
1 parent 3d5aeae commit e88068d
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 71 deletions.
2 changes: 2 additions & 0 deletions ui/app/components/pages/first-time-flow/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

@import './seed-phrase/index';

@import './metametrics-opt-in/index';

.first-time-flow {
width: 100%;
background-color: $white;
Expand Down
111 changes: 111 additions & 0 deletions ui/app/components/pages/first-time-flow/metametrics-opt-in/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
.metametrics-opt-in {
position: relative;
width: 100%;

&__main {
display: flex;
flex-direction: column;
margin-left: 26.26%;
margin-right: 28%;
color: black;

@media screen and (max-width: 575px) {
justify-content: center;
margin-left: 2%;
margin-right: 2%;
}

.app-header__logo-container {
margin-top: 3%;
}
}

&__title {
position: relative;
margin-top: 20px;

font-family: Roboto;
font-style: normal;
font-weight: normal;
line-height: normal;
font-size: 42px;
}

&__body-graphic {
margin-top: 25px;

.fa-bar-chart {
color: #C4C4C4;
}
}

&__description {
font-family: Roboto;
font-style: normal;
font-weight: normal;
line-height: 21px;
font-size: 16px;
margin-top: 12px;
}

&__committments {
display: flex;
flex-direction: column;
}

&__row {
display: flex;
margin-top: 8px;

.fa-check {
margin-right: 12px;
color: #1ACC56;
}

.fa-times {
margin-right: 12px;
color: #D0021B;
}
}

&__bold {
font-weight: bold;
}

&__break-row {
margin-top: 30px;
}

&__body {
position: relative;
display: flex;
max-width: 730px;
flex-direction: column;
}

&__body-text {
max-width: 548px;
margin-left: 16px;
margin-right: 16px;
}

&__footer {
margin-top: 26px;

.page-container__footer {
border-top: none;
max-width: 535px;
margin-bottom: 15px;

button {
height: 44px;
min-height: 44px;
margin-right: 16px;
}

header {
padding: 0px;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import Breadcrumbs from '../../../breadcrumbs'
import PageContainerFooter from '../../../page-container/page-container-footer'
import { INITIALIZE_CREATE_PASSWORD_ROUTE } from '../../../../routes'

export default class MetaMetricsOptIn extends Component {
Expand All @@ -14,86 +14,109 @@ export default class MetaMetricsOptIn extends Component {
metricsEvent: PropTypes.func,
}

constructor (props) {
super(props)

this.state = {
participateInMetaMetricsSelection: null,
}
}

render () {
const { participateInMetaMetricsSelection } = this.state


return (
<div className="first-view-main-wrapper">
<div className="first-view-main">
<div className="metametrics-opt-in unique-image">
<div className="unique-image__title">Would you to participate in analytics?</div>
<div className="unique-image__body-text">
By doing so, you will help us make MetaMask better for everyone.
We will never track personal or identifying data.
yadda, yadda, yadda
<div className="metametrics-opt-in">
<div className="metametrics-opt-in__main">
<div className="app-header__logo-container">
<img
className="app-header__metafox-logo app-header__metafox-logo--horizontal"
src="/images/logo/metamask-logo-horizontal.svg"
height={30}
/>
<img
className="app-header__metafox-logo app-header__metafox-logo--icon"
src="/images/logo/metamask-fox.svg"
height={42}
width={42}
/>
</div>
<div className="metametrics-opt-in__body-graphic">
<i className="fa fa-bar-chart fa-5x" />
</div>
<div className="metametrics-opt-in__title">Help Us Improve MetaMask</div>
<div className="metametrics-opt-in__body">
<div className="metametrics-opt-in__description">
MetaMask would like to gather some usage data to better understand how our users interact with the extension and inform futue development.
This data will be used to continually improve the usability and user experience of our product. If you care about the usability of the ethereum
ecosystem, please consider allowing these basic analytics.
</div>
<div className="settings-page__content-item">
<div className="settings-page__content-item-col">
<div className="settings-tab__radio-buttons">
<div className="settings-tab__radio-button">
<input
type="radio"
id="metametrics-opt-in"
onChange={() => this.setState({ participateInMetaMetricsSelection: true })}
checked={Boolean(participateInMetaMetricsSelection)}
/>
<label
htmlFor="metametrics-opt-in"
className="settings-tab__radio-label"
>
{ 'Opt-in' }
</label>
</div>
<div className="settings-tab__radio-button">
<input
type="radio"
id="metametrics-opt-out"
onChange={() => this.setState({ participateInMetaMetricsSelection: false })}
checked={!participateInMetaMetricsSelection}
/>
<label
htmlFor="metametrics-opt-out"
className="settings-tab__radio-label"
>
{ 'No thanks.' }
</label>
</div>
<div className="metametrics-opt-in__description">
MetaMask will..
</div>

<div className="metametrics-opt-in__committments">
<div className="metametrics-opt-in__row">
<i className="fa fa-check" />
<div className="metametrics-opt-in__row-description">
Always allow you to opt-out via Settings
</div>
</div>
<div className="metametrics-opt-in__row">
<i className="fa fa-check" />
<div className="metametrics-opt-in__row-description">
Send anonymized click & pageview events
</div>
</div>
<div className="metametrics-opt-in__row">
<i className="fa fa-check" />
<div className="metametrics-opt-in__row-description">
Maintain a public aggregate dashboard to educate the community
</div>
</div>
<div className="metametrics-opt-in__row metametrics-opt-in__break-row">
<i className="fa fa-times" />
<div className="metametrics-opt-in__row-description">
<span className="metametrics-opt-in__bold">Never</span> collect keys, addresses, transactions, balances, hashes, or any personal information
</div>
</div>
<div className="metametrics-opt-in__row">
<i className="fa fa-times" />
<div className="metametrics-opt-in__row-description">
<span className="metametrics-opt-in__bold">Never</span> collect your full IP address
</div>
</div>
<div className="metametrics-opt-in__row">
<i className="fa fa-times" />
<div className="metametrics-opt-in__row-description">
<span className="metametrics-opt-in__bold">Never</span> sell data for profit. Ever!
</div>
</div>
</div>
<button
className="first-time-flow__button"
onClick={() => {
this.props.setParticipateInMetaMetrics(this.state.participateInMetaMetricsSelection)
</div>
<div className="metametrics-opt-in__footer">
<PageContainerFooter
onCancel={() => {
this.props.setParticipateInMetaMetrics(false)
.then(() => {
this.context.metricsEvent({
eventOpts: {
category: 'MetaMetricsOptIn',
action: 'userSelectsOptIn',
name: 'userOptedOut',
},
isOptIn: true,
}, {
excludeMetaMetricsId: true,
})
this.props.history.push(INITIALIZE_CREATE_PASSWORD_ROUTE)
})
}}
cancelText={'No Thanks'}
hideCancel={false}
onSubmit={() => {
this.props.setParticipateInMetaMetrics(true)
.then(() => {
if (!this.state.participateInMetaMetricsSelection) {
this.context.metricsEvent({
eventOpts: {
category: 'MetaMetricsOptIn',
action: 'userSelectsOptIn',
name: 'userOptedOut',
},
isOptIn: true,
}, {
excludeMetaMetricsId: true,
})
}
this.props.history.push(INITIALIZE_CREATE_PASSWORD_ROUTE)
})
}}
>
Select and Proceed
</button>
<Breadcrumbs total={4} currentIndex={0} />
submitText={'I agree'}
submitButtonType={'confirm'}
disabled={false}
/>
<div className="metametrics-opt-in__bottom-text">
This data is aggregated and is therefore anonymous for the purposes of General Data Protection Regulation (EU) 2016/679. For more information in relation to our privacy practices, please see our Privacy Policy here.
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit e88068d

Please sign in to comment.