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

Merge 1.4.8 to master #1035

Merged
merged 153 commits into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
389ff41
move settings.auth
Jul 28, 2023
36b4f57
migrated dummy notification function
Jul 28, 2023
0753328
migrate logout feature
Jul 28, 2023
9010213
migrate endForceSync
Jul 28, 2023
b7e52f6
old code, formatting
Jul 28, 2023
1b4b4e6
migrate forceSync
Jul 31, 2023
8d2e961
migrate user data methods
Jul 31, 2023
45d2527
migrate sync settings
Jul 31, 2023
06bb016
migrate invalidate cache
Jul 31, 2023
f277cb0
migrate connect settings
Jul 31, 2023
ca85c8a
migrating refresh
Jul 31, 2023
a978270
fix consent handling on sync handling
Jul 31, 2023
23d9161
migrate parse state
Jul 31, 2023
ee3243b
platform.OS vs window.cordova.platformId
Jul 31, 2023
b6970d9
cleaning up old code, formatting
Jul 31, 2023
aa6459b
migrate uiConfig settings
Jul 31, 2023
27c9e1b
migrate consent check
Aug 1, 2023
13678e0
migrate datePicker
Aug 1, 2023
b579684
eliminate reliance on settings
Aug 1, 2023
b9d4342
introduce new AppStatusModal
Aug 1, 2023
9c93a09
cleaning up, comments, polishing
Aug 1, 2023
bbb38e9
update datepicker to use locale
Aug 1, 2023
26d13b7
make appModal conditional closing
Aug 1, 2023
4efcbca
Merge remote-tracking branch 'upstream/framework_migration_prep' into…
Aug 2, 2023
e2aa3a5
fix logout fncn
Aug 2, 2023
7604c33
converting app status checks
Aug 7, 2023
6880c5a
set up timing
Aug 9, 2023
1482f28
eliminate userData in Profile
Aug 11, 2023
e217665
formatting
Aug 15, 2023
a19e551
defaults for icons
Aug 15, 2023
4a056a2
remove calorie button
Aug 15, 2023
d4c4eeb
formatting on alerts
Aug 15, 2023
5662c79
single list, single refresh button
Aug 16, 2023
e8fd2c8
fix lag in overallStatus
Aug 16, 2023
b0f23ae
format AlertBar
Aug 16, 2023
d9201c7
add descNumLines to permissionItems
Aug 16, 2023
39d634a
make permissions scrollable
Aug 16, 2023
1fe2595
explain permissions
Aug 16, 2023
0d4a73b
cleaning up imports and unused code
Aug 16, 2023
792da5e
cleanup AppStatusModal
Aug 16, 2023
a5179bf
refactor to pass check
Aug 16, 2023
419cfe0
add colors to icons
Aug 16, 2023
870862d
resolve key error
Aug 17, 2023
98aad83
change, don't mutate
Aug 17, 2023
6d5e732
replace ionicPlatform for React AppState resume
Aug 18, 2023
36590bb
add SettingsScope parameter to AppStatusModal
Aug 18, 2023
e410fff
code formatting changes and updating comments
Aug 18, 2023
e28e90c
only set desc to error if error exists
Aug 18, 2023
5d5ec65
internationalize title to open explanations
Aug 18, 2023
56cdd83
remove old geofence code
Aug 19, 2023
7ab437d
merge upstream branch to sync this working branch
Aug 21, 2023
0095d23
improve QR sharing
Aug 21, 2023
17e88eb
fix image sharing
Aug 21, 2023
5db4b30
add use of AlertBars for Error
Aug 21, 2023
bbc8aab
use AppStatusModal to show if bad permissions
Aug 21, 2023
09bc7f8
move opCode to the top of the Modal
Aug 21, 2023
335d004
remove old getAngularService call
Aug 21, 2023
de1aa0e
add copy OPCode and add Profile Appbar
Aug 21, 2023
abde8ac
typing the useStates, remove comments
Aug 21, 2023
ce5510e
Reactify the Privacy Policy Popup
Aug 22, 2023
4d6a3ec
update share text
Aug 23, 2023
82e9478
update formatting on Privacy Modal
Aug 23, 2023
880535f
Revert "update share text"
Aug 23, 2023
ab10c44
download settings controls during 'setup native'
JGreenlee Aug 23, 2023
e0dbda5
add serve-prod script to package.serve.json
JGreenlee Aug 23, 2023
a8faaca
remove share
Aug 24, 2023
cc87d0c
add @types/react to devDependencies
JGreenlee Aug 23, 2023
7eedb92
tidy: remove unused imports, fix typings
JGreenlee Aug 25, 2023
3f892a0
fetch local labelOptions without caching
JGreenlee Aug 29, 2023
4bcb85b
rename 'co2PerMeter' to 'kgCo2PerKm'
JGreenlee Aug 29, 2023
54b308f
define BaseModes in diaryHelper
JGreenlee Aug 29, 2023
d6c04dc
diaryHelper: rename 'percentages' to detectedModes
JGreenlee Aug 29, 2023
c3afa3b
include labelOptions in LabelTabContext
JGreenlee Aug 29, 2023
b6d7bfb
fix types for LabelOptions
JGreenlee Aug 29, 2023
1141ea2
create <ModesIndicator>
JGreenlee Aug 29, 2023
80cea74
add baseModes to label options
JGreenlee Aug 29, 2023
79a9ee6
fix mode indicator for user-defined modes
JGreenlee Aug 29, 2023
6eb0800
refactor getBaseMode functions
JGreenlee Aug 29, 2023
cbf9602
update map trajectory colors when trip is labeled
JGreenlee Aug 29, 2023
a426834
allow ModesIndicator to wrap if many modes
JGreenlee Aug 29, 2023
a13bcac
fix labeled mode not showing if detected=UNKNOWN
JGreenlee Aug 30, 2023
c04fa5b
refactor compositeTrip2Geojson-> useGeojsonForTrip
JGreenlee Aug 30, 2023
781726c
use 'useGeojsonForTrip', toggle labeled/detected
JGreenlee Aug 30, 2023
dd16709
reorganize js/diary folder
JGreenlee Aug 30, 2023
158da78
replace links with guidance to NREL site
Aug 30, 2023
78d971f
resolve undefined error
Aug 30, 2023
eb37ae6
update comment about samsung
Aug 30, 2023
38e21ca
refactor LabelDetailsScreen into smaller components
JGreenlee Aug 30, 2023
95d875e
MultiLabelButtonGroup: support inline buttons
JGreenlee Aug 30, 2023
851d0b4
reorder LabelDetailsScreen
JGreenlee Aug 30, 2023
f07365a
support labeled mode on TripSectionsDetails
JGreenlee Aug 30, 2023
ae48f06
rename OverallTripDescriptives, TripSectionsDescriptives
JGreenlee Aug 30, 2023
d8ffec5
add "Overall" title to OverallTripDescriptives
JGreenlee Aug 30, 2023
a2adde7
adjust styles, text on label details screen
JGreenlee Aug 30, 2023
3c9b6dc
trip details descriptives: labeled text under icon
JGreenlee Aug 30, 2023
7dc227c
check mode_studied instead of program_or_study
JGreenlee Aug 30, 2023
1e67c88
labelOptions: use 'value' instead of 'key'
JGreenlee Aug 30, 2023
32274bc
> check mode_studied instead of program_or_study
JGreenlee Aug 31, 2023
e0a0a44
add ToggleSwitch for LabelDetailsScreen
JGreenlee Aug 31, 2023
a558436
make inferred labels yellow instead of orange
JGreenlee Aug 31, 2023
7fed43e
i18n cleanup
JGreenlee Aug 31, 2023
2639359
remove unused HTML templates
JGreenlee Aug 31, 2023
de75f4b
skip checking inferred.value != "other"
JGreenlee Aug 31, 2023
eadc652
add MOPED to base modes
JGreenlee Aug 31, 2023
c3432a0
Merge branch 'aria_and_fall_2023_rewrite' of https://github.com/e-mis…
JGreenlee Aug 31, 2023
8a2dbad
optional chaining to to prevent undefined failures
Aug 31, 2023
b7e442f
remove unused scope variables
Aug 31, 2023
265b659
add back `ion-view`
Aug 31, 2023
04410e9
Merge branch 'profile_logic_migration' of https://github.com/Abby-Whe…
JGreenlee Aug 31, 2023
95202a9
embed <profile-settings> directly in main.js
JGreenlee Aug 31, 2023
98f0a67
fix settingsScope
JGreenlee Aug 31, 2023
fa68aec
update styling of PopOpCode
Sep 1, 2023
a9fdcde
add logout text
Sep 1, 2023
728a472
up the dialog margins
Sep 1, 2023
3f039a9
Merge pull request #1022 from JGreenlee/update-scripts
shankari Sep 5, 2023
deb7fc3
diy debouncing - accuracy toggle fix
Sep 5, 2023
f707504
remove unused code
Sep 5, 2023
d6637a6
Merge pull request #1023 from JGreenlee/label-ux-and-cleanup
shankari Sep 5, 2023
6fe8235
Merge remote-tracking branch 'upstream/label_dashboard_profile_sept_2…
Sep 5, 2023
f57a35b
Merge branch 'label_dashboard_profile_sept_2023' into profile_logic_m…
Abby-Wheelis Sep 5, 2023
362a306
refactor AppStatusModal
Sep 7, 2023
441b650
fix start_loc / end_loc missing on draft trips
JGreenlee Sep 8, 2023
cbf50ac
Merge branch 'label_dashboard_profile_sept_2023' of https://github.co…
JGreenlee Sep 8, 2023
c73446a
add labelKeyToReadable and readableLabelToKey
JGreenlee Sep 8, 2023
3d8cf13
trim whitespace around custom labels
JGreenlee Sep 8, 2023
1f4288c
add AppStatusModal to LabelTab
Sep 8, 2023
3238dbb
handle errors better
JGreenlee Sep 8, 2023
24c5856
filter draft trips that are <100m and <5 min
JGreenlee Sep 8, 2023
98128e5
fix enketo trip survey responses on details screen
JGreenlee Sep 8, 2023
813c6c9
fix label details screen for draft trips
JGreenlee Sep 8, 2023
0034a88
fix ModesIndicator showing on draft trips
JGreenlee Sep 8, 2023
5cc599c
add maxWidth to DiaryButton; refactor
JGreenlee Sep 8, 2023
923da27
fix TripSectionsDescriptives of unlabeled draft trips
JGreenlee Sep 8, 2023
ae10fd8
implement 'draft' theme flavor on draft details
JGreenlee Sep 8, 2023
5cabed3
theme: adjust 'draft' flavor for trip details page
JGreenlee Sep 8, 2023
b0a24ea
only 1 modal
Sep 9, 2023
78e97c7
remove unneeded argument
Sep 9, 2023
a6a5581
if android, do nothing on copy
Sep 9, 2023
91b24d2
only show copy button on ios
Sep 9, 2023
6abaae5
Merge pull request #1009 from Abby-Wheelis/profile_logic_migration
shankari Sep 9, 2023
951f9df
Merge branch 'label_dashboard_profile_sept_2023' into label_fixes_sep…
shankari Sep 9, 2023
afa2d79
Merge pull request #1026 from JGreenlee/label_fixes_sept2023
shankari Sep 9, 2023
0184847
remove setTime action from notifs
Sep 11, 2023
ada4d7c
notif display not updating
Sep 11, 2023
426c440
remove unused code
Sep 11, 2023
3435e12
update android app disable instructions
Sep 11, 2023
99c5a0e
move appVersion out of dev zone
Sep 11, 2023
4088959
make beginning of study the earliest dump date
Sep 11, 2023
b3c45c3
update opcode Modal
Sep 11, 2023
52bb52b
Merge pull request #1028 from Abby-Wheelis/profile-cleanup
shankari Sep 12, 2023
53911a2
Merge branch 'master' into label_dashboard_profile_sept_2023
shankari Sep 23, 2023
8c24387
fix diaryHelper tests: update to refactored fns
JGreenlee Sep 23, 2023
c341e35
Merge pull request #1036 from JGreenlee/fix-diaryhelper-tests
shankari Sep 23, 2023
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
2 changes: 2 additions & 0 deletions package.cordovabuild.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"url": "git+https://github.com/e-mission/e-mission-phone.git"
},
"scripts": {
"setup-native": "./bin/download_settings_controls.js",
"build": "npx webpack --config webpack.prod.js && npx cordova build",
"build-dev": "npx webpack --config webpack.dev.js && npx cordova build",
"build-dev-android": "npx webpack --config webpack.dev.js && npx cordova build android",
Expand All @@ -26,6 +27,7 @@
"@babel/preset-typescript": "^7.21.4",
"@ionic/cli": "6.20.8",
"@types/luxon": "^3.3.0",
"@types/react": "^18.2.20",
"babel-loader": "^9.1.2",
"babel-plugin-angularjs-annotate": "^0.10.0",
"babel-plugin-optional-require": "^0.3.1",
Expand Down
3 changes: 3 additions & 0 deletions package.serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"scripts": {
"setup-serve": "./bin/download_settings_controls.js && ./bin/setup_autodeploy.js",
"serve": "webpack --config webpack.dev.js && concurrently -k \"phonegap --verbose serve\" \"webpack --config webpack.dev.js --watch\"",
"serve-prod": "webpack --config webpack.prod.js && concurrently -k \"phonegap --verbose serve\" \"webpack --config webpack.prod.js --watch\"",
"serve-only": "phonegap --verbose serve",
"test": "npx jest"
},
Expand All @@ -23,7 +24,9 @@
"@babel/preset-typescript": "^7.21.4",
"@ionic/cli": "6.20.8",
"@types/luxon": "^3.3.0",
"@types/react": "^18.2.20",
"babel-loader": "^9.1.2",
"babel-plugin-angularjs-annotate": "^0.10.0",
"babel-plugin-optional-require": "^0.3.1",
"concurrently": "^8.0.1",
"cordova": "^11.1.0",
Expand Down
2 changes: 2 additions & 0 deletions setup/setup_shared_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ cp setup/google-services.fake.for_ci.json google-services.json
echo "Setting up all npm packages"
npm install

npm run setup-native

# By default, node doesn't fail if any of the steps fail. This makes it hard to
# use in a CI environment, and leads to people reporting the node error rather
# than the underlying error. One solution is to pass in a command line argument to node
Expand Down
30 changes: 14 additions & 16 deletions www/__tests__/diaryHelper.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { getFormattedSectionProperties, getFormattedDate, motionTypeOf, isMultiDay, getFormattedDateAbbr, getFormattedTimeRange, getPercentages } from "../js/diary/diaryHelper";
import { useImperialConfig } from "../js/config/useImperialConfig";
import { getFormattedDate, isMultiDay, getFormattedDateAbbr, getFormattedTimeRange, getDetectedModes, getBaseModeByKey, modeColors } from "../js/diary/diaryHelper";

it('returns a formatted date', () => {
expect(getFormattedDate("2023-09-18T00:00:00-07:00")).toBe("Mon September 18, 2023");
Expand All @@ -19,10 +18,10 @@ it('returns a human readable time range', () => {
expect(getFormattedTimeRange("", "2023-09-18T00:00:00-09:30")).toBeFalsy();
});

it("returns a MotionType object", () => {
expect(motionTypeOf("WALKING")).toEqual({ name: "WALKING", icon: "walk", color: '#0068a5' });
expect(motionTypeOf("MotionTypes.WALKING")).toEqual({ name: "WALKING", icon: "walk", color: '#0068a5' });
expect(motionTypeOf("I made this type up")).toEqual({ name: "UNKNOWN", icon: "help", color: '#484848'});
it("returns a Base Mode for a given key", () => {
expect(getBaseModeByKey("WALKING")).toEqual({ name: "WALKING", icon: "walk", color: modeColors.blue });
expect(getBaseModeByKey("MotionTypes.WALKING")).toEqual({ name: "WALKING", icon: "walk", color: modeColors.blue });
expect(getBaseModeByKey("I made this type up")).toEqual({ name: "UNKNOWN", icon: "help", color: modeColors.grey });
});

it('returns true/false is multi day', () => {
Expand All @@ -41,25 +40,24 @@ let myFakeTrip2 = {sections: [
{ "sensed_mode_str": "BICYCLING", "distance": 715.3078629361006 }
]};

let myFakePcts = [
let myFakeDetectedModes = [
{ mode: "BICYCLING",
icon: "bike",
color: '#007e46',
color: modeColors.green,
pct: 89 },
{ mode: "WALKING",
icon: "walk",
color: '#0068a5',
color: modeColors.blue,
pct: 11 }];

let myFakePcts2 = [
let myFakeDetectedModes2 = [
{ mode: "BICYCLING",
icon: "bike",
color: '#007e46',
color: modeColors.green,
pct: 100 }];

it('returns the percetnages by mode for a trip', () => {
expect(getPercentages(myFakeTrip)).toEqual(myFakePcts);
expect(getPercentages(myFakeTrip2)).toEqual(myFakePcts2);
expect(getPercentages({})).toEqual({});
it('returns the detected modes, with percentages, for a trip', () => {
expect(getDetectedModes(myFakeTrip)).toEqual(myFakeDetectedModes);
expect(getDetectedModes(myFakeTrip2)).toEqual(myFakeDetectedModes2);
expect(getDetectedModes({})).toEqual([]); // empty trip, no sections, no modes
})

6 changes: 1 addition & 5 deletions www/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,12 @@
position: relative;
}

.fill-container div[class*='css-'] {
.fill-container > div[class*='css-'] {
height: 100%;
width: 100%;
position: absolute;
}

.fill-container div[class*='css-'] > div[class*='css-'] {
position: static;
}

/* Without this, the LabelTab does not fill the entire height of the screen.
It has something to do with React Navigation's NavigationContainer.
This should not be necessary once the entire app's routing has been
Expand Down
79 changes: 73 additions & 6 deletions www/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"app-version": "App Version",
"reminders-time-of-day": "Time of Day for Reminders ({{time}})",
"upcoming-notifications": "Upcoming Notifications",
"dummy-notification" : "Dummy Notification in 5 Seconds"
"dummy-notification" : "Dummy Notification in 5 Seconds",
"log-out": "Log Out"
},

"general-settings":{
Expand All @@ -65,9 +66,6 @@
"consent-found": "Consent found!",
"consented-to": "Consented to protocol {{protocol_id}}, {{approval_date}}",
"consented-ok": "OK",
"share-message": "Join me in making transportation greener and healthier \nDownload the emission app:",
"share-subject": "Emission - UC Berkeley Research Project",
"share-url": "https://bic2cal.eecs.berkeley.edu/#download",
"qrcode": "My OPcode",
"qrcode-share-title": "You can save your OPcode to login easily in the future!"
},
Expand Down Expand Up @@ -130,6 +128,10 @@
"select-mode-scroll": "Mode (👇 for more)",
"select-replaced-mode-scroll": "Replaces (👇 for more)",
"select-purpose-scroll": "Purpose (👇 for more)",
"delete-entry-confirm": "Are you sure you wish to delete this entry?",
"detected": "Detected:",
"labeled-mode": "Labeled Mode",
"detected-modes": "Detected Modes",
"today": "Today",
"no-more-travel": "No more travel to show",
"show-more-travel": "Show More Travel",
Expand Down Expand Up @@ -224,6 +226,7 @@
"fix": "Fix",
"refresh":"Refresh",
"overall-description": "This app works in the background to automatically build a travel diary for you. Make sure that all the settings below are green so that the app can work properly!",
"explanation-title": "What are these used for?",
"overall-loc-name": "Location",
"overall-loc-description": "We use the background location permission to track your location in the background, even when the app is closed. Reading background locations removes the need to turn tracking on and off, making the app easier to use and preventing battery drain.",
"locsettings": {
Expand Down Expand Up @@ -271,7 +274,8 @@
"name": "Unused apps disabled",
"description": {
"android-disable-lt-12": "On the app settings page, go to 'Permissions' and ensure that the app permissions will not be automatically reset.",
"android-disable-gte-12": "On the app settings page, turn off 'Remove permissions and free up space.'",
"android-disable-12": "On the app settings page, turn off 'Remove permissions and free up space.'",
"android-disable-gte-13": "On the app settings page, turn off 'Pause app activity if unused.'",
"ios": "Please allow."
}
},
Expand Down Expand Up @@ -350,6 +354,69 @@
"invalid-subgroup-no-default": "Invalid OPcode {{token}}, no subgroups, expected 'default' subgroup",
"unable-download-config": "Unable to download study config",
"invalid-opcode-format": "Invalid OPcode format",
"error-loading-config-app-start": "Error loading config on app start"
"error-loading-config-app-start": "Error loading config on app start",
"survey-missing-formpath": "Error while fetching resources in config: survey_info.surveys has a survey without a formPath"
},
"errors": {
"while-populating-composite": "Error while populating composite trips",
"while-loading-another-week": "Error while loading travel of {{when}} week",
"while-loading-specific-week": "Error while loading travel for the week of {{day}}"
},
"consent-text": {
"title":"NREL OPENPATH PRIVACY POLICY/TERMS OF USE",
"introduction":{
"header":"Introduction and Purpose",
"what-is-openpath":"This data is being collected through OpenPATH, an NREL open-sourced platform. The smart phone application, NREL OpenPATH (“App”), combines data from smartphone sensors, semantic user labels and a short demographic survey.",
"what-is-NREL":"NREL is a national laboratory of the U.S. Department of Energy, Office of Energy Efficiency and Renewable Energy, operated by Alliance for Sustainable Energy, LLC under Prime Contract No. DE-AC36-08GO28308. This Privacy Policy applies to the App provided by Alliance for Sustainable Energy, LLC. This App is provided solely for the purposes of collecting travel behavior data for the {{program_or_study}} and for research to inform public policy. None of the data collected by the App will never be sold or used for any commercial purposes, including advertising.",
"if-disagree":"IF YOU DO NOT AGREE WITH THE TERMS OF THIS PRIVACY POLICY, PLEASE DELETE THE APP"
},
"why":{
"header":"Why we collect this information"
},
"what":{
"header":"What information we collect",
"no-pii":"The App will never ask for any Personally Identifying Information (PII) such as name, email, address, or phone number.",
"phone-sensor":"It collects phone sensor data pertaining to your location (including background location), accelerometer, device-generated activity and mode recognition, App usage time, and battery usage. The App will create a “travel diary” based on your background location data to determine your travel patterns and location history.",
"labeling":"It will also ask you to periodically annotate these sensed trips with semantic labels, such as the trip mode, purpose, and replaced mode.",
"demographics":"It will also request sociodemographic information such as your approximate age, gender, and household type. The sociodemographic factors can be used to understand the influence of lifestyle on travel behavior, as well as generalize the results to a broader population.",
"open-source-data":"For the greatest transparency, the App is based on an open source platform, NREL’s OpenPATH. you can inspect the data that OpenPATH collects in the background at",
"open-source-analysis":"the analysis pipeline at",
"open-source-dashboard":"and the dashboard metrics at",
"on-nrel-site": "For the greatest transparency, the App is based on an open source platform, NREL’s OpenPATH. you can inspect the data that OpenPATH collects in the background, the analysis pipeline, and the dashboard metrics through links on the NREL OpenPATH website."
},
"opcode":{
"header":"How we associate information with you",
"not-autogen":"Program administrators will provide you with a 'opcode' that you will use to log in to the system. This long random string will be used for all further communication with the server. If you forget or lose your opcode, you may request it by providing your name and/or email address to the program administrator. Please do not contact NREL staff with opcode retrieval requests since we do not have access to the connection between your name/email and your opcode. The data that NREL automatically collects (phone sensor data, semidemographic data, etc.) will only be associated with your 'opcode'",
"autogen":"You are logging in with a randomly generated 'opcode' that has been generated by the platform. This long random string will used for all further communication with the server. Only you know the opcode that is associated with you. There is no “Forgot password” option, and NREL staff cannot retrieve your opcode, even if you provide your name or email address. This means that, unless you store your opcode in a safe place, you will not have access to your prior data if you switch phones or uninstall and reinstall the App."
},
"who-sees":{
"header":"Who gets to see the information",
"public-dash":"Aggregate metrics derived from the travel patterns will be made available on a public dashboard to provide transparency into the impact of the program. These metrics will focus on information summaries such as counts, distances and durations, and will not display individual travel locations or times.",
"individual-info":"Individual labeling rates and trip level information will only be made available to:",
"program-admins":"🧑 Program administrators from {{deployment_partner_name}} to {{raw_data_use}}, and",
"nrel-devs":"💻 NREL OpenPATH developers for debugging",
"TSDC-info":"The data will also be periodically archived in NREL’s Transportation Secure Data Center (TSDC) after a delay of 3 to 6 months. It will then be made available for legitimate research through existing, privacy-preserving TSDC operating procedures. Further information on the procedures is available",
"on-website":" on the website ",
"and-in":"and in",
"this-pub":" this publication ",
"and":"and",
"fact-sheet":" fact sheet",
"on-nrel-site": " through links on the NREL OpenPATH website."
},
"rights":{
"header":"Your rights",
"app-required":"You are required to track your travel patterns using the App as a condition of participation in the Program. If you wish to withdraw from the Program, you should contact the program administrator, {{program_admin_contact}} to discuss termination options. If you wish to stay in the program but not use the app, please contact your program administrator to negotiate an alternative data collection procedure before uninstalling the app. If you uninstall the app without approval from the program administrator, you may not have access to the benefits provided by the program.",
"app-not-required":"Participation in the {{program_or_study}} is completely voluntary. You have the right to decline to participate or to withdraw at any point in the Study without providing notice to NREL or the point of contact. If you do not wish to participate in the Study or to discontinue your participation in the Study, please delete the App.",
"destroy-data-pt1":"If you would like to have your data destroyed, please contact K. Shankari ",
"destroy-data-pt2":" requesting deletion. You must include your token in the request for deletion. Because we do not connect your identity with your token, we cannot delete your information without obtaining the token as part of the deletion request. We will then destroy all data associated with that deletion request, both in the online and archived datasets."
},
"questions":{
"header":"Questions",
"for-questions":"If you have any questions about the data collection goals and results, please contact the primary point of contact for the study, {{program_admin_contact}}. If you have any technical questions about app operation, please contact NREL’s K. Shankari (k.shankari@nrel.gov)."
},
"consent":{
"header":"Consent",
"press-button-to-consent":"Please select the button below to indicate that you have read and agree to this Privacy Policy, consent to the collection of your information, and want to participate in the {{program_or_study}}."
}
}
}
16 changes: 12 additions & 4 deletions www/js/appTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ const AppTheme = {
primary: '#0080b9', // lch(50% 50 250)
primaryContainer: '#90ceff', // lch(80% 40 250)
onPrimaryContainer: '#001e30', // lch(10% 50 250)
secondary: '#f2795c', // lch(65% 60 40)
secondaryContainer: '#ffb39e', // lch(80% 45 40)
secondary: '#c08331', // lch(60% 55 70)
secondaryContainer: '#fcefda', // lch(95% 12 80)
onSecondaryContainer: '#45392e', // lch(25% 10 65)
background: '#edf1f6', // lch(95% 3 250) - background of label screen, other screens still have this as CSS .pane
surface: '#fafdff', // lch(99% 30 250)
surfaceVariant: '#e0f0ff', // lch(94% 50 250) - background of DataTable
surfaceDisabled: '#c7e0f7', // lch(88% 15 250)
onSurfaceDisabled: '#3a4955', // lch(30% 10 250)
elevation: {
level0: 'transparent',
level1: '#fafdff', // lch(99% 30 250)
Expand All @@ -23,6 +26,8 @@ const AppTheme = {
level4: '#e0f0ff', // lch(94% 50 250)
level5: '#d6ebff', // lch(92% 50 250)
},
success: '#38872e', // lch(50% 55 135)
danger: '#f23934' // lch(55% 85 35)
},
roundness: 5,
};
Expand Down Expand Up @@ -57,12 +62,15 @@ const flavorOverrides = {
},
}
},
draft: { // for draft TripCards; a greyish color scheme
draft: { // for TripCards and LabelDetailsScreen of draft trips; a greyish color scheme
colors: {
primary: '#616971', // lch(44 6 250)
primaryContainer: '#b6bcc2', // lch(76 4 250)
background: '#eef1f4', // lch(95 2 250)
surface: '#eef1f4', // lch(95 2 250)
surfaceDisabled: '#c7cacd', // lch(81 2 250)
elevation: {
level1: '#dbddde', // lch(88 1 250)
level1: '#e1e3e4', // lch(90 1 250)
level2: '#d2d5d8', // lch(85 2 250)
},
}
Expand Down
41 changes: 41 additions & 0 deletions www/js/appstatus/ExplainPermissions.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from "react";
import { Modal, ScrollView, useWindowDimensions, View } from "react-native";
import { Button, Dialog, Text } from 'react-native-paper';
import { useTranslation } from "react-i18next";

const ExplainPermissions = ({ explanationList, visible, setVisible }) => {
const { t } = useTranslation();
const { height: windowHeight } = useWindowDimensions();

return (
<Modal visible={visible}
onDismiss={() => setVisible(false)} >
<Dialog visible={visible}
onDismiss={() => setVisible(false)} >
<Dialog.Title>{t('intro.appstatus.explanation-title')}</Dialog.Title>
<Dialog.Content style={{maxHeight: windowHeight/1.5, paddingBottom: 0}}>
<ScrollView>
{explanationList?.map((li) =>
<View key={li.name}>
<Text variant="headlineSmall" key={li.name}>
{li.name}
</Text>
<Text variant="bodyMedium">
{li.desc}
</Text>
</View>
)}
</ScrollView>
</Dialog.Content>
<Dialog.Actions>
<Button
onPress={() => setVisible(false)}>
{t('join.close')}
</Button>
</Dialog.Actions>
</Dialog>
</Modal>
);
};

export default ExplainPermissions;
Loading
Loading