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

Bugfix: wizard design qa #1131

Merged
merged 5 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/components/UI/OnboardingWizard/Step3/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Platform, Text, View, StyleSheet } from 'react-native';
import { Platform, Text, View, StyleSheet, Dimensions } from 'react-native';
import Coachmark from '../Coachmark';
import setOnboardingWizardStep from '../../../../actions/wizard';
import { colors, fontStyles } from '../../../../styles/common';
Expand All @@ -21,6 +21,7 @@ const styles = StyleSheet.create({
},
accountLabelContainer: {
flex: 1,
width: Dimensions.get('window').width,
alignItems: 'center',
backgroundColor: colors.transparent
}
Expand Down
19 changes: 16 additions & 3 deletions app/components/UI/OnboardingWizard/Step4/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { View, Text, StyleSheet } from 'react-native';
import { View, Text, StyleSheet, TouchableWithoutFeedback } from 'react-native';
import Coachmark from '../Coachmark';
import setOnboardingWizardStep from '../../../../actions/wizard';
import { strings } from '../../../../../locales/i18n';
import onboardingStyles from './../styles';
import { fontStyles } from '../../../../styles/common';
import { fontStyles, colors } from '../../../../styles/common';

const styles = StyleSheet.create({
main: {
Expand All @@ -17,6 +17,14 @@ const styles = StyleSheet.create({
position: 'absolute',
left: 0,
right: 0
},
hamburger: {
backgroundColor: colors.transparent,
height: 50,
width: 50
},
hamburgerContainer: {
maxWidth: 50
}
});

Expand Down Expand Up @@ -52,7 +60,7 @@ class Step4 extends PureComponent {
ref.current &&
ref.current.measure((fx, fy, width, height, px, py) => {
this.setState({
viewTop: py
viewTop: py - 50
});
});
};
Expand Down Expand Up @@ -91,6 +99,11 @@ class Step4 extends PureComponent {
return (
<View style={[styles.main, { top: this.state.viewTop }]}>
<View style={styles.coachmarkContainer}>
<View style={styles.hamburgerContainer}>
<TouchableWithoutFeedback style={styles.hamburger} onPress={this.onNext}>
<View style={styles.hamburger} />
</TouchableWithoutFeedback>
</View>
<Coachmark
title={strings('onboarding_wizard.step4.title')}
content={this.content()}
Expand Down
7 changes: 6 additions & 1 deletion app/components/UI/OnboardingWizard/Step6/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ const styles = StyleSheet.create({

class Step6 extends PureComponent {
static propTypes = {
/**
* Object that represents the navigator
*/
navigation: PropTypes.object,
/**
* Dispatch set onboarding wizard step
*/
Expand Down Expand Up @@ -56,7 +60,8 @@ class Step6 extends PureComponent {
* Dispatches 'setOnboardingWizardStep' with back step, opening drawer
*/
onBack = () => {
const { setOnboardingWizardStep } = this.props;
const { setOnboardingWizardStep, navigation } = this.props;
navigation && navigation.openDrawer();
setOnboardingWizardStep && setOnboardingWizardStep(5);
};

Expand Down
8 changes: 7 additions & 1 deletion app/components/UI/OnboardingWizard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ class OnboardingWizard extends PureComponent {
3: <Step3 coachmarkRef={this.props.coachmarkRef} />,
4: <Step4 coachmarkRef={this.props.coachmarkRef} navigation={this.props.navigation} />,
5: <Step5 coachmarkRef={this.props.coachmarkRef} navigation={this.props.navigation} />,
6: <Step6 coachmarkRef={this.props.coachmarkRef} onClose={this.closeOnboardingWizard} />
6: (
<Step6
coachmarkRef={this.props.coachmarkRef}
navigation={this.props.navigation}
onClose={this.closeOnboardingWizard}
/>
)
};
return steps[step];
};
Expand Down