From 3511d58c11545e90e65ec672d4ac0b190f9e0fdb Mon Sep 17 00:00:00 2001 From: Sam Stowers Date: Tue, 24 Mar 2020 17:43:03 -0500 Subject: [PATCH 1/4] quality of life improvements --- app/views/LocationTracking.js | 12 ++- app/views/Overlap.js | 16 ++-- package.json | 1 + yarn.lock | 154 +++++++++++++++++++++++++++++++++- 4 files changed, 166 insertions(+), 17 deletions(-) diff --git a/app/views/LocationTracking.js b/app/views/LocationTracking.js index 75d957d6d9..82dcf1b432 100644 --- a/app/views/LocationTracking.js +++ b/app/views/LocationTracking.js @@ -75,8 +75,8 @@ class LocationTracking extends Component { } overlap() { - this.props.navigation.navigate('OverlapScreen', {}) - } + this.props.navigation.navigate('OverlapScreen', {}); + } willParticipate = () => { SetStoreData('PARTICIPATE', 'true').then(() => LocationServices.start()); @@ -175,8 +175,12 @@ class LocationTracking extends Component { {languages.t('label.stop_logging')} - this.overlap()} style={styles.startLoggingButtonTouchable} > - {languages.t('label.overlap')} + this.overlap()} + style={styles.startLoggingButtonTouchable}> + + {languages.t('label.overlap')} + ) : ( diff --git a/app/views/Overlap.js b/app/views/Overlap.js index 0bf687107c..ccd0a1347b 100644 --- a/app/views/Overlap.js +++ b/app/views/Overlap.js @@ -1,3 +1,4 @@ +/* eslint-disable prettier/prettier */ import React, { Component } from 'react'; @@ -151,8 +152,7 @@ class OverlapScreen extends Component { downloadAndPlot = async () => { // Downloads the file on the disk and loads it into memory try { - this.setState({'showButton': {'disabled': true, - 'text': 'Loading Public Trace'}}); + this.setState({'showButton': {'disabled': true, 'text': 'Loading Public Trace'}}); RNFetchBlob .config({ // add this option that makes response data to be stored as a file, @@ -302,6 +302,7 @@ class OverlapScreen extends Component { this.downloadAndPlot()} disabled={this.state.showButton.disabled}> + {/* If no overlap found, change button text to say so. Temporary solution, replace with something more robust */} {languages.t(this.state.showButton.text)} {languages.t('label.overlap_para_1')} @@ -321,11 +322,8 @@ const styles = StyleSheet.create({ backgroundColor: colors.WHITE }, headerTitle: { - textAlign: 'center', - fontWeight: "bold", - fontSize: 38, - - padding: 0 + fontSize: 24, + fontFamily:'OpenSans-Bold', }, subHeaderTitle: { textAlign: 'center', @@ -392,10 +390,6 @@ const styles = StyleSheet.create({ height: 18, width: 18.48 }, - headerTitle:{ - fontSize: 24, - fontFamily:'OpenSans-Bold' - }, sectionDescription: { fontSize: 16, lineHeight: 24, diff --git a/package.json b/package.json index 4780313b31..feb6c922a2 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "eslint": "^6.8.0", "jest": "^25.1.0", "metro-react-native-babel-preset": "^0.58.0", + "prettier": "1.17.0", "react-native-version": "^4.0.0", "react-test-renderer": "16.9.0" }, diff --git a/yarn.lock b/yarn.lock index 6fd46e4e6d..149c92cfe7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1292,6 +1292,11 @@ abab@^2.0.0: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -2072,11 +2077,21 @@ commander@^2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== +common-tags@^1.4.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" + integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -2122,6 +2137,14 @@ concat-stream@^1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" +config-chain@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" + integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + connect@^3.6.5: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" @@ -2345,6 +2368,11 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +detect-indent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd" + integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -2381,6 +2409,11 @@ domexception@^1.0.1: dependencies: webidl-conversions "^4.0.2" +dottie@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.2.tgz#cc91c0726ce3a054ebf11c55fbc92a7f266dd154" + integrity sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg== + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -2389,6 +2422,16 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +editorconfig@^0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" + integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g== + dependencies: + commander "^2.19.0" + lru-cache "^4.1.5" + semver "^5.6.0" + sigmund "^1.0.1" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -3417,6 +3460,11 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + inquirer@^3.0.6: version "3.3.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" @@ -4205,6 +4253,17 @@ jetifier@^1.6.2: resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.5.tgz#ea87324a4230bef20a9651178ecab978ee54a8cb" integrity sha512-T7yzBSu9PR+DqjYt+I0KVO1XTb1QhAfHnXV5Nd3xpbXM6Xg4e3vP60Q4qkNU8Fh6PHC2PivPUNN3rY7G2MxcDQ== +js-beautify@^1.7.4: + version "1.10.3" + resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.10.3.tgz#c73fa10cf69d3dfa52d8ed624f23c64c0a6a94c1" + integrity sha512-wfk/IAWobz1TfApSdivH5PJ0miIHgDoYb1ugSqHcODPmaYu46rYe5FVuIEkhjg8IQiv6rDNPyhsqbsohI/C2vQ== + dependencies: + config-chain "^1.1.12" + editorconfig "^0.15.3" + glob "^7.1.3" + mkdirp "~0.5.1" + nopt "~4.0.1" + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4464,6 +4523,11 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash.flattendeep@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= + lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -4479,6 +4543,11 @@ lodash.unescape@4.0.1: resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= + lodash@4.17.15, lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5, lodash@^4.3.0: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" @@ -4514,7 +4583,7 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4 dependencies: js-tokens "^3.0.0 || ^4.0.0" -lru-cache@^4.0.1: +lru-cache@^4.0.1, lru-cache@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -4938,6 +5007,11 @@ minimist@^1.1.1, minimist@^1.2.0: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -4953,6 +5027,13 @@ mkdirp@^0.5.1: dependencies: minimist "0.0.8" +mkdirp@~0.5.1: + version "0.5.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512" + integrity sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw== + dependencies: + minimist "^1.2.5" + morgan@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz#0a8d16734a1d9afbc824b99df87e738e58e2da59" @@ -5076,6 +5157,14 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" +nopt@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + normalize-package-data@^2.3.2: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -5297,6 +5386,11 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + os-locale@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" @@ -5320,6 +5414,14 @@ os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -5380,6 +5482,19 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-reflect@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-reflect/-/p-reflect-2.1.0.tgz#5d67c7b3c577c4e780b9451fc9129675bd99fe67" + integrity sha512-paHV8NUz8zDHu5lhr/ngGWQiW067DK/+IbJ+RfZ4k+s8y4EKyYCz8pGYWjxCg35eHztpJAt+NUgvN4L+GCbPlg== + +p-settle@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-settle/-/p-settle-3.1.0.tgz#6194f4f929364a8843be54ced118389b7b9ee017" + integrity sha512-gkN3UDlyofG81IRhxLnonSIi8BBrwcPlKMJS6tcJRubofyekqQPMdB5LXPrmCkeu/m/YKx5PzkUVQLezda5/JQ== + dependencies: + p-limit "^2.2.0" + p-reflect "^2.0.0" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -5487,6 +5602,11 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +pbxproj-dom@^1.0.11: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pbxproj-dom/-/pbxproj-dom-1.2.0.tgz#1cf4101163bd666eba9eb92a5b8f616ce824ea85" + integrity sha512-K2czrWqA68AR0q1UXz5EBi/zoxcljrkO4RSJX0jPnVn3iyE0HYnYOzaEEDYMpueczkT/Vtdm3SCc3NM+12kMaQ== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -5632,6 +5752,11 @@ prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -5743,6 +5868,7 @@ react-native-maps@0.27.1: version "0.27.1" resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.27.1.tgz#2f10cd417bb2fd938c9e015b1c9b6d9b1a44b97f" integrity sha512-HygBkZBecTnIVRYrSiLRAvu4OmXOYso/A7c6Cy73HkOh9CgGV8Ap5eBea24tvmFGptjj5Hg8AJ94/YbmWK1Okw== + react-native-popup-menu@^0.15.7: version "0.15.7" resolved "https://registry.yarnpkg.com/react-native-popup-menu/-/react-native-popup-menu-0.15.7.tgz#ddffa8aa6e5d7d11533947921e9bdf94cd7fc7d0" @@ -5772,6 +5898,25 @@ react-native-share@^3.1.0: resolved "https://registry.yarnpkg.com/react-native-share/-/react-native-share-3.1.1.tgz#db6bd75318c747fee565f8cc012dd0a846cecca9" integrity sha512-3BwSo3lhrUlqqx0LxHF5tyKc927UI6N6pu+o2+agdYjtfdVLeUeyYIjkdYGobcIvviTr4qcr9FJ0AfUCSHvlGQ== +react-native-version@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/react-native-version/-/react-native-version-4.0.0.tgz#210115fe967daeb5f48303a34eec3a24a2a40ca0" + integrity sha512-OMoSbeDcrE5JnmeilkZXYsXnk98/I2hZe/z68NZ+nel3LkixJIOh1AnAxsqW1Cq20Nmyz3bV4PpEYxilKAy9xg== + dependencies: + chalk "^3.0.0" + commander "^4.0.0" + common-tags "^1.4.0" + detect-indent "^6.0.0" + dottie "^2.0.0" + js-beautify "^1.7.4" + lodash.flattendeep "^4.4.0" + lodash.uniq "^4.5.0" + p-settle "^3.0.0" + pbxproj-dom "^1.0.11" + plist "^3.0.1" + resolve-from "^5.0.0" + semver "^7.0.0" + react-native-webview@^8.1.2: version "8.1.2" resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-8.1.2.tgz#c2ddb1e82d1c294f8f68a13be5d0536f7808f377" @@ -6223,7 +6368,7 @@ semver@^6.0.0, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.1.1: +semver@^7.0.0, semver@^7.1.1: version "7.1.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== @@ -6338,6 +6483,11 @@ shortid@^2.2.15: dependencies: nanoid "^2.1.0" +sigmund@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" From a192b175ddfe8945ec918eb0ad9db3121b2e88f8 Mon Sep 17 00:00:00 2001 From: Sam Stowers Date: Tue, 24 Mar 2020 17:56:09 -0500 Subject: [PATCH 2/4] Add dynamic button text for trace overlap results --- app/views/Overlap.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/views/Overlap.js b/app/views/Overlap.js index ccd0a1347b..a607571a97 100644 --- a/app/views/Overlap.js +++ b/app/views/Overlap.js @@ -39,6 +39,8 @@ const base64 = RNFetchBlob.base64 const public_data = "https://docs.google.com/spreadsheets/d/1itaohdPiAeniCXNlntNztZ_oRvjh0HsGuJXUJWET008/export?format=csv" const show_button_text = "Show Me Trace Overlap"; +const overlap_true_button_text = "Trace Overlap Found"; +const no_overlap_button_text = "No Trace Overlap Found"; const INITIAL_REGION = { latitude: 36.56, longitude: 20.39, @@ -176,8 +178,15 @@ class OverlapScreen extends Component { console.log(Object.keys(parsedRecords).length); this.plotCircles(parsedRecords) .then(() => { - this.setState({'showButton': {'disabled': false, - 'text': show_button_text}}); + // if no overlap, alert user via button text + // this is a temporary fix, make it more robust later + if (Object.keys(parsedRecords).length !== 0) { + this.setState({'showButton': {'disabled': false, + 'text': overlap_true_button_text}}); + } else { + this.setState({'showButton': {'disabled': false, + 'text': no_overlap_button_text}}); + } }); }); }) From 3b9a88d8b7d47d01a9def6b4780115e9928d3f67 Mon Sep 17 00:00:00 2001 From: Sam Stowers Date: Tue, 24 Mar 2020 18:19:12 -0500 Subject: [PATCH 3/4] Reenabled Prettier in Overlap.js but didn't format --- app/views/Overlap.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/Overlap.js b/app/views/Overlap.js index a607571a97..7af467db8c 100644 --- a/app/views/Overlap.js +++ b/app/views/Overlap.js @@ -1,4 +1,3 @@ -/* eslint-disable prettier/prettier */ import React, { Component } from 'react'; From 5809b54d0363d013a9eab453012bf09081319084 Mon Sep 17 00:00:00 2001 From: Sam Stowers Date: Tue, 24 Mar 2020 18:39:23 -0500 Subject: [PATCH 4/4] Add translation for overlap button text and title --- app/locales/en/index.js | 6 +++--- app/locales/en/overlap.json | 7 +++++-- app/views/Overlap.js | 8 ++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/locales/en/index.js b/app/locales/en/index.js index deec7ca2a7..4cba49d83d 100644 --- a/app/locales/en/index.js +++ b/app/locales/en/index.js @@ -1,9 +1,9 @@ import intro from './intro.json'; import locationTracking from './locationTracking.json'; -import importFile from './import.json' -import exportFile from './exportscreen.json' +import importFile from './import.json'; +import exportFile from './exportscreen.json'; import licensesFile from './licensesscreen.json'; -import overlapFile from './overlap.json' +import overlapFile from './overlap.json'; export default { ...intro, diff --git a/app/locales/en/overlap.json b/app/locales/en/overlap.json index 9942c4b33d..7f857cfd04 100644 --- a/app/locales/en/overlap.json +++ b/app/locales/en/overlap.json @@ -1,4 +1,7 @@ { - "overlap_para_1":"This map shows where your private location trail overlaps with public data from a variety of sources, including official reports from WHO, Ministries of Health, and Chinese local, provincial, and national health authorities. If additional data are available from reliable online reports, they are included.", - "show_overlap": "SHOW ME TRACE OVERLAP", + "overlap_title": "Check Overlap", + "overlap_para_1": "This map shows where your private location trail overlaps with public data from a variety of sources, including official reports from WHO, Ministries of Health, and Chinese local, provincial, and national health authorities. If additional data are available from reliable online reports, they are included.", + "show_overlap": "Show Me Trace Overlap", + "overlap_no_results_button_label": "No Trace Overlap Found", + "overlap_found_button_label": "Trace Overlap Found" } \ No newline at end of file diff --git a/app/views/Overlap.js b/app/views/Overlap.js index 7af467db8c..b11089113a 100644 --- a/app/views/Overlap.js +++ b/app/views/Overlap.js @@ -37,9 +37,9 @@ const width = Dimensions.get('window').width; const base64 = RNFetchBlob.base64 const public_data = "https://docs.google.com/spreadsheets/d/1itaohdPiAeniCXNlntNztZ_oRvjh0HsGuJXUJWET008/export?format=csv" -const show_button_text = "Show Me Trace Overlap"; -const overlap_true_button_text = "Trace Overlap Found"; -const no_overlap_button_text = "No Trace Overlap Found"; +const show_button_text = languages.t('label.show_overlap'); +const overlap_true_button_text = languages.t('label.overlap_found_button_label'); +const no_overlap_button_text = languages.t('label.overlap_no_results_button_label'); const INITIAL_REGION = { latitude: 36.56, longitude: 20.39, @@ -282,7 +282,7 @@ class OverlapScreen extends Component { this.backToMain()}> - {languages.t('label.overlap')} + {languages.t('label.overlap_title')}