Skip to content

Commit

Permalink
Add scroll view to import screen (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesemashko authored Apr 23, 2020
1 parent 0f9c0c4 commit bf09704
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 124 deletions.
6 changes: 4 additions & 2 deletions app/views/Import.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState } from 'react';
import {
Dimensions,
Linking,
ScrollView,
StyleSheet,
TouchableOpacity,
View,
Expand Down Expand Up @@ -65,7 +66,7 @@ const ImportScreen = props => {
<NavigationBarWrapper
title={languages.t('label.import_title')}
onBackPress={goBack}>
<View style={styles.main}>
<ScrollView style={styles.main}>
<View style={styles.subHeaderTitle}>
<Typography style={styles.sectionDescription}>
{languages.t('label.import_step_1')}
Expand Down Expand Up @@ -107,7 +108,7 @@ const ImportScreen = props => {
</Typography>
) : null}
</View>
</View>
</ScrollView>
</NavigationBarWrapper>
);
};
Expand All @@ -125,6 +126,7 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
fontSize: 22,
padding: 5,
paddingBottom: 20,
},
main: {
flex: 1,
Expand Down
247 changes: 125 additions & 122 deletions app/views/__tests__/__snapshots__/Import.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Array [
Import Locations
</Text>
</View>
<View
<RCTScrollView
style={
Object {
"alignSelf": "center",
Expand All @@ -106,156 +106,159 @@ Array [
}
}
>
<View
style={
Object {
"fontSize": 22,
"fontWeight": "bold",
"padding": 5,
"textAlign": "center",
}
}
>
<Text
style={
Object {
"fontFamily": "IBMPlexSans",
"fontSize": 16,
"fontWeight": "normal",
"lineHeight": 24,
"marginTop": 12,
"writingDirection": "ltr",
}
}
use="body1"
>
Adding location data from Google will give you a head start on building your recent locations.
</Text>
<Text
style={
Object {
"fontFamily": "IBMPlexSans",
"fontSize": 16,
"fontWeight": "normal",
"lineHeight": 24,
"marginTop": 12,
"writingDirection": "ltr",
}
}
use="body1"
>
Before you can import, you must first 'Take out' your location data from Google.
</Text>
<Text
style={
Object {
"fontFamily": "IBMPlexSans",
"fontSize": 16,
"fontWeight": "normal",
"lineHeight": 24,
"marginTop": 12,
"writingDirection": "ltr",
}
}
use="body1"
>
Visit Google Takeout and export your Location History using following settings:
1. Delivery method: "Add to Drive"
2. Frequency: "Export once"
3. File type & size: ".zip" and "1GB"
4. Google sends an email when the export is ready
5. Return here to import locations. Import options:
- Import from Google Drive
- Download from browser, then import from local phone files. Make sure to be on WiFi network as files can be big.
</Text>
<View>
<View
accessible={true}
focusable={true}
isTVSelectable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignSelf": "center",
"backgroundColor": "#4051DB",
"borderRadius": 12,
"height": 52,
"justifyContent": "center",
"marginTop": 30,
"opacity": 1,
"width": 589.9499999999999,
"fontSize": 22,
"fontWeight": "bold",
"padding": 5,
"paddingBottom": 20,
"textAlign": "center",
}
}
testID="google-takeout-link"
>
<Text
style={
Object {
"color": "#FFF",
"fontFamily": "IBMPlexSans-SemiBold",
"fontSize": 14,
"fontFamily": "IBMPlexSans",
"fontSize": 16,
"fontWeight": "normal",
"letterSpacing": 0,
"lineHeight": 19,
"textAlign": "center",
"lineHeight": 24,
"marginTop": 12,
"writingDirection": "ltr",
}
}
use="body1"
>
VISIT GOOGLE TAKEOUT
Adding location data from Google will give you a head start on building your recent locations.
</Text>
</View>
<View
accessible={true}
focusable={true}
isTVSelectable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignSelf": "center",
"backgroundColor": "#4051DB",
"borderRadius": 12,
"height": 52,
"justifyContent": "center",
"marginTop": 30,
"opacity": 1,
"width": 589.9499999999999,
<Text
style={
Object {
"fontFamily": "IBMPlexSans",
"fontSize": 16,
"fontWeight": "normal",
"lineHeight": 24,
"marginTop": 12,
"writingDirection": "ltr",
}
}
}
testID="google-takeout-import-btn"
>
use="body1"
>
Before you can import, you must first 'Take out' your location data from Google.
</Text>
<Text
style={
Object {
"color": "#FFF",
"fontFamily": "IBMPlexSans-SemiBold",
"fontSize": 14,
"fontFamily": "IBMPlexSans",
"fontSize": 16,
"fontWeight": "normal",
"letterSpacing": 0,
"lineHeight": 19,
"textAlign": "center",
"lineHeight": 24,
"marginTop": 12,
"writingDirection": "ltr",
}
}
use="body1"
>
IMPORT LOCATIONS
Visit Google Takeout and export your Location History using following settings:
1. Delivery method: "Add to Drive"
2. Frequency: "Export once"
3. File type & size: ".zip" and "1GB"
4. Google sends an email when the export is ready
5. Return here to import locations. Import options:
- Import from Google Drive
- Download from browser, then import from local phone files. Make sure to be on WiFi network as files can be big.
</Text>
<View
accessible={true}
focusable={true}
isTVSelectable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignSelf": "center",
"backgroundColor": "#4051DB",
"borderRadius": 12,
"height": 52,
"justifyContent": "center",
"marginTop": 30,
"opacity": 1,
"width": 589.9499999999999,
}
}
testID="google-takeout-link"
>
<Text
style={
Object {
"color": "#FFF",
"fontFamily": "IBMPlexSans-SemiBold",
"fontSize": 14,
"fontWeight": "normal",
"letterSpacing": 0,
"lineHeight": 19,
"textAlign": "center",
"writingDirection": "ltr",
}
}
use="body1"
>
VISIT GOOGLE TAKEOUT
</Text>
</View>
<View
accessible={true}
focusable={true}
isTVSelectable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignSelf": "center",
"backgroundColor": "#4051DB",
"borderRadius": 12,
"height": 52,
"justifyContent": "center",
"marginTop": 30,
"opacity": 1,
"width": 589.9499999999999,
}
}
testID="google-takeout-import-btn"
>
<Text
style={
Object {
"color": "#FFF",
"fontFamily": "IBMPlexSans-SemiBold",
"fontSize": 14,
"fontWeight": "normal",
"letterSpacing": 0,
"lineHeight": 19,
"textAlign": "center",
"writingDirection": "ltr",
}
}
use="body1"
>
IMPORT LOCATIONS
</Text>
</View>
</View>
</View>
</View>
</RCTScrollView>
</RCTSafeAreaView>,
]
`;

0 comments on commit bf09704

Please sign in to comment.