Browse Source

Make onboarding steps scrollable to handle screen edge cases

master
meriadec 7 years ago
parent
commit
ae84bc84ed
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 3
      src/components/Onboarding/helperComponents.js
  2. 6
      src/components/Onboarding/steps/Analytics.js
  3. 5
      src/components/Onboarding/steps/GenuineCheck.js
  4. 6
      src/components/Onboarding/steps/SelectDevice.js
  5. 5
      src/components/Onboarding/steps/SetPassword.js

3
src/components/Onboarding/helperComponents.js

@ -4,6 +4,7 @@ import styled from 'styled-components'
import { radii } from 'styles/theme' import { radii } from 'styles/theme'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import GrowScroll from 'components/base/GrowScroll'
import IconSensitiveOperationShield from 'icons/illustrations/SensitiveOperationShield' import IconSensitiveOperationShield from 'icons/illustrations/SensitiveOperationShield'
// GENERAL // GENERAL
@ -16,6 +17,8 @@ export const Title = styled(Box).attrs({
text-align: center; text-align: center;
` `
export const StepContainerInner = styled(GrowScroll).attrs({ pb: 6, align: 'center' })``
export const Description = styled(Box).attrs({ export const Description = styled(Box).attrs({
ff: 'Museo Sans|Light', ff: 'Museo Sans|Light',
fontSize: 5, fontSize: 5,

6
src/components/Onboarding/steps/Analytics.js

@ -6,7 +6,7 @@ import { connect } from 'react-redux'
import { saveSettings } from 'actions/settings' import { saveSettings } from 'actions/settings'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import CheckBox from 'components/base/CheckBox' import CheckBox from 'components/base/CheckBox'
import { Title, Description, FixedTopContainer } from '../helperComponents' import { Title, Description, FixedTopContainer, StepContainerInner } from '../helperComponents'
import OnboardingFooter from '../OnboardingFooter' import OnboardingFooter from '../OnboardingFooter'
import type { StepProps } from '..' import type { StepProps } from '..'
@ -51,7 +51,7 @@ class Analytics extends PureComponent<StepProps, State> {
return ( return (
<FixedTopContainer> <FixedTopContainer>
<Box grow alignItems="center"> <StepContainerInner>
<Title>{t('onboarding:analytics.title')}</Title> <Title>{t('onboarding:analytics.title')}</Title>
<Description>{t('onboarding:analytics.desc')}</Description> <Description>{t('onboarding:analytics.desc')}</Description>
<Box mt={5}> <Box mt={5}>
@ -74,7 +74,7 @@ class Analytics extends PureComponent<StepProps, State> {
</Box> </Box>
</Container> </Container>
</Box> </Box>
</Box> </StepContainerInner>
<OnboardingFooter <OnboardingFooter
horizontal horizontal
align="center" align="center"

5
src/components/Onboarding/steps/GenuineCheck.js

@ -26,6 +26,7 @@ import {
Description, Description,
IconOptionRow, IconOptionRow,
FixedTopContainer, FixedTopContainer,
StepContainerInner,
OnboardingFooterWrapper, OnboardingFooterWrapper,
} from '../helperComponents' } from '../helperComponents'
@ -157,7 +158,7 @@ class GenuineCheck extends PureComponent<StepProps, State> {
return ( return (
<FixedTopContainer> <FixedTopContainer>
<Box grow alignItems="center"> <StepContainerInner>
<Title>{t('onboarding:genuineCheck.title')}</Title> <Title>{t('onboarding:genuineCheck.title')}</Title>
{onboarding.isLedgerNano ? ( {onboarding.isLedgerNano ? (
<Description>{t('onboarding:genuineCheck.descNano')}</Description> <Description>{t('onboarding:genuineCheck.descNano')}</Description>
@ -249,7 +250,7 @@ class GenuineCheck extends PureComponent<StepProps, State> {
)} )}
</CardWrapper> </CardWrapper>
</Box> </Box>
</Box> </StepContainerInner>
<OnboardingFooter <OnboardingFooter
horizontal horizontal
align="center" align="center"

6
src/components/Onboarding/steps/SelectDevice.js

@ -11,7 +11,7 @@ import Box from 'components/base/Box'
import IconCheckCirle from 'icons/Check' import IconCheckCirle from 'icons/Check'
import IconLedgerNano from 'icons/illustrations/LedgerNano' import IconLedgerNano from 'icons/illustrations/LedgerNano'
import IconLedgerBlue from 'icons/illustrations/LedgerBlue' import IconLedgerBlue from 'icons/illustrations/LedgerBlue'
import { Title, Inner, FixedTopContainer } from '../helperComponents' import { Title, Inner, FixedTopContainer, StepContainerInner } from '../helperComponents'
import OnboardingFooter from '../OnboardingFooter' import OnboardingFooter from '../OnboardingFooter'
import type { StepProps } from '..' import type { StepProps } from '..'
@ -35,7 +35,7 @@ class SelectDevice extends PureComponent<StepProps, {}> {
const { t, onboarding, jumpStep } = this.props const { t, onboarding, jumpStep } = this.props
return ( return (
<FixedTopContainer> <FixedTopContainer>
<Box grow alignItems="center"> <StepContainerInner>
<Box mb={5}> <Box mb={5}>
<Title>{t('onboarding:selectDevice.title')}</Title> <Title>{t('onboarding:selectDevice.title')}</Title>
</Box> </Box>
@ -63,7 +63,7 @@ class SelectDevice extends PureComponent<StepProps, {}> {
</DeviceContainer> </DeviceContainer>
</Inner> </Inner>
</Box> </Box>
</Box> </StepContainerInner>
<OnboardingFooter <OnboardingFooter
horizontal horizontal
t={t} t={t}

5
src/components/Onboarding/steps/SetPassword.js

@ -20,6 +20,7 @@ import {
DisclaimerBox, DisclaimerBox,
FixedTopContainer, FixedTopContainer,
OnboardingFooterWrapper, OnboardingFooterWrapper,
StepContainerInner,
} from '../helperComponents' } from '../helperComponents'
type State = { type State = {
@ -96,7 +97,7 @@ class SetPassword extends PureComponent<StepProps, State> {
return ( return (
<FixedTopContainer> <FixedTopContainer>
<Box grow alignItems="center"> <StepContainerInner>
<Fragment> <Fragment>
<Box alignItems="center"> <Box alignItems="center">
<Title>{t('onboarding:setPassword.title')}</Title> <Title>{t('onboarding:setPassword.title')}</Title>
@ -120,7 +121,7 @@ class SetPassword extends PureComponent<StepProps, State> {
<DisclaimerBox mt={7} disclaimerNotes={disclaimerNotes} /> <DisclaimerBox mt={7} disclaimerNotes={disclaimerNotes} />
</Box> </Box>
</Fragment> </Fragment>
</Box> </StepContainerInner>
<OnboardingFooterWrapper> <OnboardingFooterWrapper>
<Button padded outlineGrey onClick={() => prevStep()}> <Button padded outlineGrey onClick={() => prevStep()}>

Loading…
Cancel
Save