From 67062f9be775c10a9a728501ce20c7aeb0d2d51d Mon Sep 17 00:00:00 2001 From: Anosha Minai Date: Sun, 29 Jan 2017 19:56:12 -0500 Subject: [PATCH 1/8] current search click status --- RNApp/app/config/routes.js | 30 ++++++++++++++++++++-- RNApp/app/routes/Search/Search.js | 23 ++++++++++++++--- RNApp/app/routes/Search/SearchContainer.js | 1 + 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/RNApp/app/config/routes.js b/RNApp/app/config/routes.js index 3f71040..a16ccb5 100644 --- a/RNApp/app/config/routes.js +++ b/RNApp/app/config/routes.js @@ -3,6 +3,9 @@ import MapView from '../routes/MapView'; import Geolocator from '../routes/Geolocator'; import Search from '../routes/Search'; import About from '../routes/About'; +import Map from '../components/Map'; +import CountryToId from './countryToId'; +import CountryCodes from './countryCodes'; export const routes = { getSearchRoute() { @@ -44,16 +47,39 @@ export const routes = { showNavigationBar: false, }; }, - getGeolocationRoute() { + getGeolocationRoute(countryName) { return { renderScene(navigator) { - return ; + return ; }, getTitle() { return 'Geolocator'; }, + showNavigationBar: false, + }; + }, + getCountryRoute(countryName) { + // console.log("country name !!!!! "); + // console.log(countryName) + countryIso3Code = CountryToId[countryName].toUpperCase(); + var countryIso2Code = ""; + + for (code in CountryCodes) { + if (CountryCodes[code] == countryIso3Code) { + countryIso2Code = code; + } + } + return { + renderScene(navigator) { + return ; + }, + + getTitle() { + return 'Country'; + }, + showNavigationBar: false, }; }, diff --git a/RNApp/app/routes/Search/Search.js b/RNApp/app/routes/Search/Search.js index 1f7b58a..6397568 100644 --- a/RNApp/app/routes/Search/Search.js +++ b/RNApp/app/routes/Search/Search.js @@ -9,6 +9,7 @@ import CountryCodes from './../../config/countryCodes'; import Countries from './../../config/countries'; import CountryToId from './../../config/countryToId'; import images from './../../config/images'; +import Routes from '../../config/routes'; class Search extends React.Component { @@ -33,10 +34,13 @@ componentDidMount() { for (var countryName in CountryToId){ var countryCode = CountryToId[countryName]; i = i + 1; - newArr.push( - - - + + var tile = this.makeTile(countryName, images.countryIcons[countryCode], () => this.navigate(), i); + // + // this.navigate(titleText)}/> + // + + newArr.push(tile ); } this.setState({allTilesArr: newArr}); @@ -62,6 +66,17 @@ componentDidMount() { this.populateTiles(searchTermVal); } + navigate() { + console.log(this.props.titleText); + // this.props.navigator.push(Routes.getCountryRoute("Iran")) + } + + makeTile(countryName, imageDir, onPressFunc, i) { + return + + + } + render() { return ( diff --git a/RNApp/app/routes/Search/SearchContainer.js b/RNApp/app/routes/Search/SearchContainer.js index 5a79a83..8bdf450 100644 --- a/RNApp/app/routes/Search/SearchContainer.js +++ b/RNApp/app/routes/Search/SearchContainer.js @@ -5,6 +5,7 @@ import Routes from '../../config/routes'; const SearchContainer = (props) => { return ( props.navigator.push(Routes.getDetailsRoute())} /> ); From c0e1d08d7187146f701f380361b0bc5899e5ef93 Mon Sep 17 00:00:00 2001 From: Anosha Minai Date: Tue, 31 Jan 2017 22:18:08 -0500 Subject: [PATCH 2/8] current status --- RNApp/app/components/Tile/Tile.js | 9 +++++---- RNApp/app/routes/Search/Search.js | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/RNApp/app/components/Tile/Tile.js b/RNApp/app/components/Tile/Tile.js index 7b5fcbe..24915cc 100644 --- a/RNApp/app/components/Tile/Tile.js +++ b/RNApp/app/components/Tile/Tile.js @@ -7,6 +7,7 @@ import images from './../../config/images'; const Tile = (props) => { const { titleText, figureText, detailText, image, tileType, onPress } = props; + return ( {/* Main tile view */} @@ -32,9 +33,9 @@ const Tile = (props) => { {/* Tile image (e.g. map of Iran) */} - @@ -64,7 +65,7 @@ Tile.defaultProps = { image: images.countryIcons.usa, // eslint-disable-next-line no-console tileType: 'data', - onPress: () => console.log('Button Pressed'), + onPress: () => console.log('Button Pressed').bind(this), }; export default Tile; diff --git a/RNApp/app/routes/Search/Search.js b/RNApp/app/routes/Search/Search.js index 6397568..6ae405b 100644 --- a/RNApp/app/routes/Search/Search.js +++ b/RNApp/app/routes/Search/Search.js @@ -35,11 +35,12 @@ componentDidMount() { var countryCode = CountryToId[countryName]; i = i + 1; - var tile = this.makeTile(countryName, images.countryIcons[countryCode], () => this.navigate(), i); + var tile = this.makeTile(countryName, images.countryIcons[countryCode], () => this.getCountryName(), i); // // this.navigate(titleText)}/> // + newArr.push(tile ); } @@ -66,14 +67,21 @@ componentDidMount() { this.populateTiles(searchTermVal); } - navigate() { + getCountryName() { + console.log("hi im here"); console.log(this.props.titleText); - // this.props.navigator.push(Routes.getCountryRoute("Iran")) + var country = "Iran"; + this.navigate(country) + } + + navigate(country) { + // console.log(this.props.titleText); + this.props.navigator.push(Routes.getCountryRoute(country)) } makeTile(countryName, imageDir, onPressFunc, i) { return - + } From 6796f64c75f96b99d99408f917aafebfd4d3ae48 Mon Sep 17 00:00:00 2001 From: Anosha Minai Date: Wed, 1 Feb 2017 22:08:57 -0500 Subject: [PATCH 3/8] search click navigate --- RNApp/app/components/Tile/Tile.js | 12 +++++++++--- RNApp/app/routes/Search/Search.js | 24 +++++------------------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/RNApp/app/components/Tile/Tile.js b/RNApp/app/components/Tile/Tile.js index 24915cc..0f4c6ec 100644 --- a/RNApp/app/components/Tile/Tile.js +++ b/RNApp/app/components/Tile/Tile.js @@ -3,13 +3,18 @@ import { Text, TouchableOpacity, View, Image} from 'react-native'; import { tileTypes, tileColors } from './styles'; import styles from './styles'; import images from './../../config/images'; +import Routes from '../../config/routes'; const Tile = (props) => { const { titleText, figureText, detailText, image, tileType, - onPress } = props; + onPress, navigator } = props; + + var navigate = () => { + props.navigator.push(Routes.getCountryRoute(props.titleText)); + } return ( - + {/* Main tile view */} @@ -55,6 +60,7 @@ Tile.propTypes = { image: React.PropTypes.number, tileType: React.PropTypes.string, onPress: React.PropTypes.func, + navigator: React.PropTypes.object, }; // TODO: replace with different default values @@ -65,7 +71,7 @@ Tile.defaultProps = { image: images.countryIcons.usa, // eslint-disable-next-line no-console tileType: 'data', - onPress: () => console.log('Button Pressed').bind(this), + onPress: () => console.log("Button Pressed"), }; export default Tile; diff --git a/RNApp/app/routes/Search/Search.js b/RNApp/app/routes/Search/Search.js index 6ae405b..2f0955e 100644 --- a/RNApp/app/routes/Search/Search.js +++ b/RNApp/app/routes/Search/Search.js @@ -35,11 +35,7 @@ componentDidMount() { var countryCode = CountryToId[countryName]; i = i + 1; - var tile = this.makeTile(countryName, images.countryIcons[countryCode], () => this.getCountryName(), i); - // - // this.navigate(titleText)}/> - // - + var tile = this.makeTile(countryName, images.countryIcons[countryCode], i); newArr.push(tile ); @@ -67,21 +63,9 @@ componentDidMount() { this.populateTiles(searchTermVal); } - getCountryName() { - console.log("hi im here"); - console.log(this.props.titleText); - var country = "Iran"; - this.navigate(country) - } - - navigate(country) { - // console.log(this.props.titleText); - this.props.navigator.push(Routes.getCountryRoute(country)) - } - - makeTile(countryName, imageDir, onPressFunc, i) { + makeTile(countryName, imageDir, i) { return - + } @@ -104,4 +88,6 @@ Search.propTypes = { handleSearchTermUpdateHa: React.PropTypes.func, }; + + export default Search; From b6ee1513fa885c6cedfcb2aa04d0dda7a482681b Mon Sep 17 00:00:00 2001 From: Anosha Minai Date: Thu, 2 Feb 2017 11:05:50 -0500 Subject: [PATCH 4/8] added tile click to search term view --- RNApp/app/routes/Search/Search.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RNApp/app/routes/Search/Search.js b/RNApp/app/routes/Search/Search.js index 2f0955e..dee47f0 100644 --- a/RNApp/app/routes/Search/Search.js +++ b/RNApp/app/routes/Search/Search.js @@ -47,10 +47,10 @@ componentDidMount() { if (countryName.includes(searchTermVal)) { var countryCode = CountryToId[countryName]; i = i + 1; - newArr.push( - - - + + var tile = this.makeTile(countryName, images.countryIcons[countryCode], i); + + newArr.push(tile ); } } From 83d57b5724bfb6afc3ca98a5f0775bfe93373ffd Mon Sep 17 00:00:00 2001 From: Suzanne Knop Date: Thu, 2 Feb 2017 23:22:46 -0500 Subject: [PATCH 5/8] added back button functionality --- RNApp/app/components/Map/Map.js | 3 ++- RNApp/app/components/Tile/Tile.js | 4 ++-- RNApp/app/components/TopBar/TopBar.js | 24 +++++++++++++++++++----- RNApp/app/components/TopBar/styles.js | 9 ++++++--- RNApp/app/config/routes.js | 4 +--- RNApp/app/routes/MapView/MapView.js | 3 ++- 6 files changed, 32 insertions(+), 15 deletions(-) diff --git a/RNApp/app/components/Map/Map.js b/RNApp/app/components/Map/Map.js index 0c18ff1..e5365cd 100644 --- a/RNApp/app/components/Map/Map.js +++ b/RNApp/app/components/Map/Map.js @@ -92,7 +92,7 @@ class Map extends Component { return ( - + @@ -119,6 +119,7 @@ Map.propTypes = { country: React.PropTypes.string, iso2Code: React.PropTypes.string, back: React.PropTypes.bool, + navigator: React.PropTypes.object, }; export default Map; diff --git a/RNApp/app/components/Tile/Tile.js b/RNApp/app/components/Tile/Tile.js index 0f4c6ec..7c2bc38 100644 --- a/RNApp/app/components/Tile/Tile.js +++ b/RNApp/app/components/Tile/Tile.js @@ -10,8 +10,8 @@ const Tile = (props) => { onPress, navigator } = props; var navigate = () => { - props.navigator.push(Routes.getCountryRoute(props.titleText)); - } + props.navigator.push(Routes.getCountryRoute(props.titleText)); + } return ( diff --git a/RNApp/app/components/TopBar/TopBar.js b/RNApp/app/components/TopBar/TopBar.js index 07cd659..485249b 100644 --- a/RNApp/app/components/TopBar/TopBar.js +++ b/RNApp/app/components/TopBar/TopBar.js @@ -1,24 +1,36 @@ import React from 'react'; import { Text, TouchableOpacity, View } from 'react-native'; import styles from './styles'; +import Routes from '../../config/routes'; const TopBar = (props) => { + const onPress = () => { + props.navigator.push(Routes.getSearchRoute()) + }; + const getBackButton = () => { if (props.back) { return ( - + + + + {props.title} + + ); } else { - return; + return ( + + {props.title} + + ); } }; return ( {getBackButton()} - - {props.title} - + ); @@ -26,6 +38,8 @@ const TopBar = (props) => { TopBar.propTypes = { title: React.PropTypes.string, + back: React.PropTypes.bool, + navigator: React.PropTypes.object, }; diff --git a/RNApp/app/components/TopBar/styles.js b/RNApp/app/components/TopBar/styles.js index 8c57bdf..65fa3f1 100644 --- a/RNApp/app/components/TopBar/styles.js +++ b/RNApp/app/components/TopBar/styles.js @@ -11,15 +11,18 @@ export default StyleSheet.create({ height: 50, }, topbarText: { - fontSize: 25, + fontSize: 25, fontWeight:'bold', color:'white', textAlign:'center', }, + topbarTextWithBack: { + marginLeft: 25, + }, topbarTextWrapper: { flex:0, width:Dimensions.get('window').width, - alignItems:'center' + alignItems:'center', }, back: { position:'absolute', @@ -27,7 +30,7 @@ export default StyleSheet.create({ alignSelf:'flex-start', width:50, height:50, + top:-10, }, - }); \ No newline at end of file diff --git a/RNApp/app/config/routes.js b/RNApp/app/config/routes.js index a16ccb5..7f14504 100644 --- a/RNApp/app/config/routes.js +++ b/RNApp/app/config/routes.js @@ -61,8 +61,6 @@ export const routes = { }; }, getCountryRoute(countryName) { - // console.log("country name !!!!! "); - // console.log(countryName) countryIso3Code = CountryToId[countryName].toUpperCase(); var countryIso2Code = ""; @@ -73,7 +71,7 @@ export const routes = { } return { renderScene(navigator) { - return ; + return ; }, getTitle() { diff --git a/RNApp/app/routes/MapView/MapView.js b/RNApp/app/routes/MapView/MapView.js index 40c355a..bbdae7a 100644 --- a/RNApp/app/routes/MapView/MapView.js +++ b/RNApp/app/routes/MapView/MapView.js @@ -9,7 +9,7 @@ const MapView = (props) => { return (
- + ); }; @@ -17,6 +17,7 @@ const MapView = (props) => { MapView.propTypes = { country: React.PropTypes.string, back: React.PropTypes.bool, + navigator: React.PropTypes.object, }; export default MapView; From 3a7a954127d034f30c462d6f9c4728775953757b Mon Sep 17 00:00:00 2001 From: Suzanne Knop Date: Fri, 3 Feb 2017 00:38:18 -0500 Subject: [PATCH 6/8] Added back arrow image --- RNApp/app/components/TopBar/TopBar.js | 18 +++++++++------ RNApp/app/components/TopBar/styles.js | 22 ++++++++++++++----- RNApp/app/config/images.js | 1 + RNApp/app/images/back.png | Bin 0 -> 11187 bytes RNApp/app/routes/MapView/MapViewContainer.js | 2 +- 5 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 RNApp/app/images/back.png diff --git a/RNApp/app/components/TopBar/TopBar.js b/RNApp/app/components/TopBar/TopBar.js index 485249b..f682856 100644 --- a/RNApp/app/components/TopBar/TopBar.js +++ b/RNApp/app/components/TopBar/TopBar.js @@ -1,18 +1,24 @@ import React from 'react'; -import { Text, TouchableOpacity, View } from 'react-native'; +import { Text, TouchableOpacity, View, Image} from 'react-native'; import styles from './styles'; import Routes from '../../config/routes'; +import images from '../../config/images'; const TopBar = (props) => { const onPress = () => { - props.navigator.push(Routes.getSearchRoute()) + props.navigator.push(Routes.getSearchRoute()); }; - + const getBackButton = () => { if (props.back) { return ( - + + + {props.title} @@ -28,11 +34,9 @@ const TopBar = (props) => { }; return ( - + {getBackButton()} - - ); }; diff --git a/RNApp/app/components/TopBar/styles.js b/RNApp/app/components/TopBar/styles.js index 65fa3f1..843df0d 100644 --- a/RNApp/app/components/TopBar/styles.js +++ b/RNApp/app/components/TopBar/styles.js @@ -15,9 +15,10 @@ export default StyleSheet.create({ fontWeight:'bold', color:'white', textAlign:'center', + zIndex:0, }, topbarTextWithBack: { - marginLeft: 25, + marginLeft: 10, }, topbarTextWrapper: { flex:0, @@ -25,12 +26,23 @@ export default StyleSheet.create({ alignItems:'center', }, back: { - position:'absolute', - backgroundColor: colors.countryArrow, + position:'absolute', + backgroundColor: colors.countryMain, alignSelf:'flex-start', width:50, height:50, - top:-10, - }, + alignItems: 'center', + top: -10, + justifyContent:'center', + zIndex: 1, + }, + backArrow: { + tintColor: 'white', + zIndex:1, + width:40, + height:40, + top:0, + left:0, + } }); \ No newline at end of file diff --git a/RNApp/app/config/images.js b/RNApp/app/config/images.js index 8395685..a393e6e 100644 --- a/RNApp/app/config/images.js +++ b/RNApp/app/config/images.js @@ -11,6 +11,7 @@ const images = { profileHeader: require('../images/header-image.png'), avatarPlaceholder: require('../images/avatar-placeholder.png'), worldMap: require('../images/world-map.png'), + backArrow: require('../images/back.png'), countryIcons: { afg: require('../images/country-icons/afg.png'), ago: require('../images/country-icons/ago.png'), diff --git a/RNApp/app/images/back.png b/RNApp/app/images/back.png new file mode 100644 index 0000000000000000000000000000000000000000..3c0586b3b9861213c9efef7c818c664a86656981 GIT binary patch literal 11187 zcmeHMYgANMmOh1|yo?kmGK@;`5Fb>V!bkf;EMoDBh{Q&zFs3Y-Xap58K2oEiSM6va zuQ;}ZR?zC67}E+CvP#!Q>ZTZ?rt79mnQfRh+hEW|8lnt_6${J~(1vbGS{OI< zj*s8SIkUTlhgjf|XKv!F8->_xz(39Hsc&9|hlAgUT^K7wO^Nr9E8IcNJINHAX8WSE z?ZU||>0_F{T$q;X8+$}Le%$)yZ|tM)y=LC(-(ry}-dZdl7yh7j%qiZ_9p9QW zn>)63R;m`yo>4nCEoME}t6wwP^I$^5&$u>sESU$rLa$y0eFb2FQ(rAqz{#TdvM;bSwK6 zbds+$p8BiZEd2ezuKAE{`io$93fhhIbKV~hY!k4p(>rd?HtD4#^s&;^kWpfHH)udm zT4GOs1OXi~-l`GRZrxtMwj%qCzta}m=oYAGG&e?Cz!4uDh;?bl$VFOUgaN}4*1i8L zP#=V&Dl4)z9S4zE6lpd!bYy_T0v%ozV%Y#Wag?LOK8=x&!Pp3YpafRfnk+zBjFMsg z&Ra+9?x~7OTF1x)P`QG(3KJVTR)+={wdn9C_Vn_z|zG0l#m26J>!3n$Q|EeNI+zUiaf2JAU*Z z3P5~><<~ZxiBKxZ4LA{@ydo?(522d;o$$W|#gm^74Jf!PjgioR`dZmB5*kpGQ@Zge z0VOzKW*{~Lbu%y-1{Mm4z`!Cpurmzon*Tpf6mu`_`Jul5QAqH#wH3;_MvfbM_oHKV z{onrgM+1kSffL=|>9qUkjp6FrP&03B-w*R+R^OV9NA1A>nDg}@@w9ncYy0iqs-6)2 z-Mi~{w)Y-cw=*di-)e2zR+#?n`o4Q1&*O@#qLwSCtx^8}^DL`c9&JzG^7yCkn~o?l zE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({WO+fT+a zLDQp}+ts6*(>zhl?K;c-#Ni^cE3Ri0aBEaXKDTBZXDxaD?^w&w`neWL2vn^#XF|yn zIXfXiuY7fvt`_fS?uF0iuv48mPA2D;RWaF>yGAvgRT|Ia&#tP@M3t~o@Xv_L { return ( - + ); }; From 4dfe21c68d8817abe370185794dd1a7e39224106 Mon Sep 17 00:00:00 2001 From: Suzanne Knop Date: Fri, 3 Feb 2017 00:58:32 -0500 Subject: [PATCH 7/8] Back button saves the search state --- RNApp/app/components/TopBar/TopBar.js | 2 +- RNApp/app/components/TopBar/styles.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/RNApp/app/components/TopBar/TopBar.js b/RNApp/app/components/TopBar/TopBar.js index f682856..3709abc 100644 --- a/RNApp/app/components/TopBar/TopBar.js +++ b/RNApp/app/components/TopBar/TopBar.js @@ -6,7 +6,7 @@ import images from '../../config/images'; const TopBar = (props) => { const onPress = () => { - props.navigator.push(Routes.getSearchRoute()); + props.navigator.pop(); }; const getBackButton = () => { diff --git a/RNApp/app/components/TopBar/styles.js b/RNApp/app/components/TopBar/styles.js index 843df0d..b24ff44 100644 --- a/RNApp/app/components/TopBar/styles.js +++ b/RNApp/app/components/TopBar/styles.js @@ -15,7 +15,6 @@ export default StyleSheet.create({ fontWeight:'bold', color:'white', textAlign:'center', - zIndex:0, }, topbarTextWithBack: { marginLeft: 10, @@ -34,12 +33,9 @@ export default StyleSheet.create({ alignItems: 'center', top: -10, justifyContent:'center', - zIndex: 1, - }, backArrow: { tintColor: 'white', - zIndex:1, width:40, height:40, top:0, From c6a1cb9aa852fb821aaa2a98f1d488617eac9ba6 Mon Sep 17 00:00:00 2001 From: Nancy Wong Date: Mon, 6 Feb 2017 21:21:10 -0500 Subject: [PATCH 8/8] Prevent clicking on non-country tiles --- RNApp/app/components/Map/Map.js | 4 ++-- RNApp/app/components/Tile/Tile.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RNApp/app/components/Map/Map.js b/RNApp/app/components/Map/Map.js index 4e0fe75..d0606aa 100644 --- a/RNApp/app/components/Map/Map.js +++ b/RNApp/app/components/Map/Map.js @@ -139,7 +139,7 @@ class Map extends Component { @@ -151,7 +151,7 @@ class Map extends Component { tiles.push( diff --git a/RNApp/app/components/Tile/Tile.js b/RNApp/app/components/Tile/Tile.js index 80b50e6..089bd2c 100644 --- a/RNApp/app/components/Tile/Tile.js +++ b/RNApp/app/components/Tile/Tile.js @@ -11,7 +11,9 @@ const Tile = (props) => { onPress, navigator, containsGraph, data, containsPercentage, percentage } = props; var navigate = () => { + if (tileType == 'country') { props.navigator.push(Routes.getCountryRoute(props.titleText)); + } } return (