Skip to content

Commit

Permalink
Merge pull request e-mission#1046 from e-mission/onboarding_routing_s…
Browse files Browse the repository at this point in the history
…ept_2023

πŸ“ˆ πŸ‘” βœ… Dashboard rewrite (complete) + profile logic improvements + initial testing framework!
  • Loading branch information
shankari authored Oct 2, 2023
2 parents 80b4794 + 0f7caef commit 8c12de7
Show file tree
Hide file tree
Showing 46 changed files with 2,707 additions and 2,461 deletions.
2 changes: 0 additions & 2 deletions package.cordovabuild.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
"angular": "1.6.7",
"angular-animate": "1.6.7",
"angular-local-storage": "^0.7.1",
"angular-nvd3": "^1.0.7",
"angular-sanitize": "1.6.7",
"angular-simple-logger": "^0.1.7",
"angular-translate": "^2.18.1",
Expand Down Expand Up @@ -158,7 +157,6 @@
"moment-timezone": "^0.5.43",
"ng-i18next": "^1.0.7",
"npm": "^9.6.3",
"nvd3": "^1.8.6",
"phonegap-plugin-barcodescanner": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner#v8.1.0",
"prop-types": "^15.8.1",
"react": "^18.2.*",
Expand Down
2 changes: 0 additions & 2 deletions package.serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"angular": "1.6.7",
"angular-animate": "1.6.7",
"angular-local-storage": "^0.7.1",
"angular-nvd3": "^1.0.7",
"angular-sanitize": "1.6.7",
"angular-simple-logger": "^0.1.7",
"angular-translate": "^2.18.1",
Expand Down Expand Up @@ -83,7 +82,6 @@
"moment-timezone": "^0.5.43",
"ng-i18next": "^1.0.7",
"npm": "^9.6.3",
"nvd3": "^1.8.6",
"prop-types": "^15.8.1",
"react": "^18.2.*",
"react-chartjs-2": "^5.2.0",
Expand Down
12 changes: 0 additions & 12 deletions www/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
max-height: 50px;
}

/* nvd3 styles */
@import 'nvd3/build/nv.d3.css';

.fill-container {
display: block;
position: relative;
Expand Down Expand Up @@ -746,15 +743,6 @@ timestamp-badge[light-bg] {
padding: 5% 10%;
}

svg {
display: block;
}
#chart, #chart svg {
margin-right: 10px;
}
.nvd3, nv-noData {
font-weight: 300 !important;
}
.metric-datepicker {
/*height: 33px;*/
display: flex; /* establish flex container */
Expand Down
55 changes: 31 additions & 24 deletions www/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"nuke-all": "Nuke all buffers and cache",
"test-notification": "Test local notification",
"check-log": "Check log",
"log-title" : "Log",
"check-sensed-data": "Check sensed data",
"sensed-title": "Sensed Data: Transitions",
"collection": "Collection",
"sync": "Sync",
"button-accept": "I accept",
Expand Down Expand Up @@ -101,9 +103,11 @@
"less-than": " less than ",
"less": " less ",
"week-before": "vs. week before",
"this-week": "this week",
"pick-a-date": "Pick a date",
"trips": "trips",
"hours": "hours",
"minutes": "minutes",
"custom": "Custom"
},

Expand Down Expand Up @@ -140,42 +144,43 @@
"no-travel-hint": "To see more, change the filters above or go record some travel!"
},

"user-gender": "Gender",
"gender-male": "Male",
"gender-female": "Female",
"user-height": "Height",
"user-weight": "Weight",
"user-age": "Age",

"main-metrics":{
"dashboard": "Dashboard",
"summary": "My Summary",
"chart": "Chart",
"change-data": "Change dates:",
"distance": "My Distance",
"trips": "My Trips",
"duration": "My Duration",
"distance": "Distance",
"trips": "Trips",
"duration": "Duration",
"fav-mode": "My Favorite Mode",
"speed": "My Speed",
"footprint": "My Footprint",
"estimated-emissions": "Estimated COβ‚‚ emissions",
"how-it-compares": "Ballpark comparisons",
"optimal": "Optimal (perfect mode choice for all my trips):",
"average": "Average for group:",
"avoided": "COβ‚‚ avoided (vs. all 'taxi'):",
"optimal": "Optimal (perfect mode choice for all my trips)",
"average": "Group Avg.",
"worst-case": "Worse Case",
"label-to-squish": "Label trips to collapse the range into a single number",
"range-uncertain-footnote": "Β²Due to the uncertainty of unlabeled trips, estimates may fall anywhere within the shown range. Label more trips for richer estimates.",
"lastweek": "My last week value:",
"us-2030-goal": "US 2030 Goal Estimate:",
"us-2050-goal": "US 2050 Goal Estimate:",
"calories": "My Calories",
"calibrate": "Calibrate",
"us-2030-goal": "2030 GuidelineΒΉ",
"us-2050-goal": "2050 GuidelineΒΉ",
"us-goals-footnote": "ΒΉGuidelines based on US decarbonization goals, scaled to per-capita travel-related emissions.",
"past-week" : "Past Week",
"prev-week" : "Prev. Week",
"no-summary-data": "No summary data",
"mean-speed": "My Average Speed",
"equals-cookies_one": "Equals at least {{count}} homemade chocolate chip cookie",
"equals-cookies_other": "Equals at least {{count}} homemade chocolate chip cookies",
"equals-icecream_one": "Equals at least {{count}} half cup vanilla ice cream",
"equals-icecream_other": "Equals at least {{count}} half cups vanilla ice cream",
"equals-bananas_one": "Equals at least {{count}} banana",
"equals-bananas_other": "Equals at least {{count}} bananas"
"user-totals": "My Totals",
"group-totals": "Group Totals",
"active-minutes": "Active Minutes",
"weekly-active-minutes": "Weekly minutes of active travel",
"daily-active-minutes": "Daily minutes of active travel",
"active-minutes-table": "Table of active minutes metrics",
"weekly-goal": "Weekly GoalΒ³",
"weekly-goal-footnote": "Β³Weekly goal based on CDC recommendation of 150 minutes of moderate activity per week.",
"labeled": "Labeled",
"unlabeled": "UnlabeledΒ²",
"footprint-label": "Footprint (kg COβ‚‚)"
},

"main-inf-scroll" : {
Expand Down Expand Up @@ -360,7 +365,9 @@
"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}}"
"while-loading-specific-week": "Error while loading travel for the week of {{day}}",
"while-log-messages": "While getting messages from the log ",
"while-max-index" : "While getting max index "
},
"consent-text": {
"title":"NREL OPENPATH PRIVACY POLICY/TERMS OF USE",
Expand Down
2 changes: 0 additions & 2 deletions www/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import './js/survey/input-matcher.js';
import './js/survey/multilabel/infinite_scroll_filters.js';
import './js/survey/multilabel/multi-label-ui.js';
import './js/diary.js';
import './js/recent.js';
import './js/diary/services.js';
import './js/survey/external/launch.js';
import './js/survey/enketo/answer.js';
Expand All @@ -40,7 +39,6 @@ import './js/survey/enketo/infinite_scroll_filters.js';
import './js/survey/enketo/enketo-trip-button.js';
import './js/survey/enketo/enketo-demographics.js';
import './js/survey/enketo/enketo-add-note-button.js';
import './js/metrics.js';
import './js/control/general-settings.js';
import './js/control/emailService.js';
import './js/control/uploadService.js';
Expand Down
3 changes: 2 additions & 1 deletion www/js/appTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const AppTheme = {
level4: '#e0f0ff', // lch(94% 50 250)
level5: '#d6ebff', // lch(92% 50 250)
},
success: '#38872e', // lch(50% 55 135)
success: '#00a665', // lch(60% 55 155)
warn: '#f8cf53', //lch(85% 65 85)
danger: '#f23934' // lch(55% 85 35)
},
roundness: 5,
Expand Down
41 changes: 41 additions & 0 deletions www/js/components/ActionMenu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from "react";
import { Modal } from "react-native";
import { Dialog, Button, useTheme } from "react-native-paper";
import { useTranslation } from "react-i18next";
import { settingStyles } from "../control/ProfileSettings";

const ActionMenu = ({vis, setVis, title, actionSet, onAction, onExit}) => {

const { t } = useTranslation();
const { colors } = useTheme();

return (
<Modal visible={vis} onDismiss={() => setVis(false)}
transparent={true}>
<Dialog visible={vis}
onDismiss={() => setVis(false)}
style={settingStyles.dialog(colors.elevation.level3)}>
<Dialog.Title>{title}</Dialog.Title>
<Dialog.Content>
{actionSet?.map((e) =>
<Button key={e.text}
onPress={() => {
onAction(e);
setVis(false);
}}>
{e.text}
</Button>
)}
</Dialog.Content>
<Dialog.Actions>
<Button onPress={() => {setVis(false);
onExit();}}>{
t('general-settings.cancel')}
</Button>
</Dialog.Actions>
</Dialog>
</Modal>
)
}

export default ActionMenu;
Loading

0 comments on commit 8c12de7

Please sign in to comment.