-
Notifications
You must be signed in to change notification settings - Fork 114
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
📈 👔 ✅ Dashboard rewrite (complete) + profile logic improvements + initial testing framework! #1046
Commits on Jul 12, 2023
-
- replaced normal details view of 'My distance' with chart - next steps - create button to switch between chart and details view in 'my distance' card - Figure out why all data is showing up unlabled - Allow the axis to switch easily - right now, setting isHorizontal doesn't completely switch data, only thedirection of the bars - would be nice to flip data axis and bar axis simultaneously
Configuration menu - View commit details
-
Copy full SHA for b9385e6 - Browse repository at this point
Copy the full SHA b9385e6View commit details -
- one (MetricDetails) is going to be a copy of the original metric details view - the next (MetricsCard) is going to be a container to have both the BarChart component, and the MetricDetails component - Will be a react component, rather than function, and will hold onto the state of whether or not the barchart or metricdetails will be showing - next steps - add a button to switch between the two views
Configuration menu - View commit details
-
Copy full SHA for 26fe4f9 - Browse repository at this point
Copy the full SHA 26fe4f9View commit details -
Added view state to MetricsCard
- allows the card to keep track of whether or not it has a BarChart or MetricDetails child component - next step - Add button
Configuration menu - View commit details
-
Copy full SHA for c05e071 - Browse repository at this point
Copy the full SHA c05e071View commit details -
Added button to switch between components
- next step - format and style button
Configuration menu - View commit details
-
Copy full SHA for 011b858 - Browse repository at this point
Copy the full SHA 011b858View commit details -
Added button and styling to MetricsCard
- button allows switching between the BarChart and the MetricDetails card - button icon switches depending on the card represented
Configuration menu - View commit details
-
Copy full SHA for e36ba87 - Browse repository at this point
Copy the full SHA e36ba87View commit details
Commits on Jul 13, 2023
-
- removed children property from card - removed leftover code from copying from BarChart.tsx to MetricsCard and MetricDetails - Removed unecessary import statements
Configuration menu - View commit details
-
Copy full SHA for 4440e1d - Browse repository at this point
Copy the full SHA 4440e1dView commit details
Commits on Jul 19, 2023
-
Added MetricsCard module to metrics.js
-- also switched main-metrics html so that only the MetricsCard element is held in the ion-slide element, without any extra divs or headers
Configuration menu - View commit details
-
Copy full SHA for 5ca9754 - Browse repository at this point
Copy the full SHA 5ca9754View commit details
Commits on Aug 21, 2023
-
Merge branch 'aria_and_fall_2023_rewrite' of https://github.com/e-mis…
…sion/e-mission-phone into dashboard-rewrite
Configuration menu - View commit details
-
Copy full SHA for f3af351 - Browse repository at this point
Copy the full SHA f3af351View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb4c65c - Browse repository at this point
Copy the full SHA cb4c65cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ef8ce3c - Browse repository at this point
Copy the full SHA ef8ce3cView commit details
Commits on Aug 22, 2023
-
use new MetricsTab instead of main-metrics
The new dashboard will have the MetricsTab component as its entry point - main-metrics.html will no longer be rendered
Configuration menu - View commit details
-
Copy full SHA for 1bd3b62 - Browse repository at this point
Copy the full SHA 1bd3b62View commit details -
Replacing main-metrics, this component represents the entire Dashboard tab and will get metrics data from the server, store it as state, and pass it down to child components like MetricsCard. There is also a date picker at the top (TODO) and a refresh button. The logic for fetching metrics has been modernized into modern JS (async/await) and uses Luxon instead of Moment. I tested to make sure the timestamps of the resulting queries are the same using Luxon as they were with Moment.
Configuration menu - View commit details
-
Copy full SHA for c24da18 - Browse repository at this point
Copy the full SHA c24da18View commit details -
This typing is based on the data we receive from the server. For each metric, we receive an array containing "days" of metric data. Each day has a few props (ts, fmt_time, nUsers, local_dt) plus any number of properties with the `label_` prefix that represent the measurment for a particular label. Having this be type-safe from the start should make it much easier to realized the desired visualizations!
Configuration menu - View commit details
-
Copy full SHA for 7473855 - Browse repository at this point
Copy the full SHA 7473855View commit details -
reformat MetricsCard to work with new MetricsTab
MetricsCard will now accept 'metricDataDays' as a prop and derive the chart data from this. We can employ `useMemo` for this so that iff metricDataDays changes, chartData updates. Prior to this, MetricsCard had an IconButton on the right side allowing users toggle between 'details' and 'graph' view. To be clearer to the user, I have changed this to a SegmentedButtons. This way, users see both their options side by side and can select the desired one. A few colors were added in appTheme.ts - surfaceDisabled and onSurfaceDisabled. These are colors that already exist in the React Native Paper default theme, but we are overriding for our own purposes. In the SegmentedButtons on MetricsCard, the surfaceDisabled color is used for the button that is not checked
Configuration menu - View commit details
-
Copy full SHA for 8753162 - Browse repository at this point
Copy the full SHA 8753162View commit details -
With the new MetricsTab, MetricsDetails will receive 'metricDataDays', sum up the totals for each label, and display these in a 2-column. The display is the same as the old dashboard, but now the logic to sum up the values is here in this component instead of jumbled in with everything else.
Configuration menu - View commit details
-
Copy full SHA for 12d17ce - Browse repository at this point
Copy the full SHA 12d17ceView commit details
Commits on Aug 23, 2023
-
implement datepicker + agg metrics on new dashboard
MetricsDateSelect will allow users to select a date range. It appears as a NavBarButton, like the label screen date picker, and also uses a DatePickerModal. However, this one works differently because users can select a range of days instead of just one. The selected range is stored in LabelTab as `dateRange` - once this range is loaded, all the displayed metrics will update to reflect the new data. `dateRange` is an array of two Luxon DateTime objects, which works well to bridge between the JS Date objects (used by RN Paper Dates) and Unix timestamps (used by e-mission-server / for any network calls)
Configuration menu - View commit details
-
Copy full SHA for 52854c0 - Browse repository at this point
Copy the full SHA 52854c0View commit details -
The chart does not need so much padding - we want to be able to show as much detail as we can. MetricDetails should show with 2 columns, but could use some padding in between. So let's remove all the padding from the card content since its children will have padding anyway.
Configuration menu - View commit details
-
Copy full SHA for 5ebced8 - Browse repository at this point
Copy the full SHA 5ebced8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f32609e - Browse repository at this point
Copy the full SHA f32609eView commit details -
add ActiveMinutesCard to new dashboard
The "active minutes" should display the cumulative duration for modes that are considered "active" - currenty this is just 'walk' and 'bike'; I am not sure if anything else will count. This should include a graph later on, but right now it just lists out the minutes for each mode.
Configuration menu - View commit details
-
Copy full SHA for 470b4e0 - Browse repository at this point
Copy the full SHA 470b4e0View commit details -
rename UserMetrics type to MetricsData
The same type will be used for both user metrics and aggregate metrics, so its naming should be more generic.
Configuration menu - View commit details
-
Copy full SHA for f93ba1e - Browse repository at this point
Copy the full SHA f93ba1eView commit details -
add @types/react to devDependencies
This adds type definitions for the React hooks and makes some of the annoying typing errors go away. I don't know why the React package doesn't have types built-in, but this is how you get them.
Configuration menu - View commit details
-
Copy full SHA for 6026918 - Browse repository at this point
Copy the full SHA 6026918View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb60ad5 - Browse repository at this point
Copy the full SHA eb60ad5View commit details -
unify MetricDetails and MetricsCard
It's not really necessary for MetricDetails to be its own component - it is actually simpler to just include these few lines of code in MetricsCard. Then MetricsCard will handle the memoized computation either way, whether it's `chartData` or `metricSumValues` that is needed (depending on whether 'graph' or 'details' is active)
Configuration menu - View commit details
-
Copy full SHA for 18eafef - Browse repository at this point
Copy the full SHA 18eafefView commit details -
It was incorporated into MetricsCard and is no longer a standalone component
Configuration menu - View commit details
-
Copy full SHA for db06256 - Browse repository at this point
Copy the full SHA db06256View commit details -
Merge branch 'aria_and_fall_2023_rewrite' of https://github.com/e-mis…
…sion/e-mission-phone into dashboard-rewrite
Configuration menu - View commit details
-
Copy full SHA for 9f46973 - Browse repository at this point
Copy the full SHA 9f46973View commit details
Commits on Aug 24, 2023
-
generalize format functions in useImperialConfig
It is useful to have the format function (which handles rounding to 2 or 3 sig figs) generic enough to work for any unit. We can also have it use Intl.NumberFormat to work better with other languages (other languages might use commas and periods differently, or have a different decimal marking altogether)
Configuration menu - View commit details
-
Copy full SHA for cf4f0e6 - Browse repository at this point
Copy the full SHA cf4f0e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 964da4b - Browse repository at this point
Copy the full SHA 964da4bView commit details -
show units correctly on MetricsCards
Using a prop passed to MetricsCard called unitFormatFn, we will format the raw numerical values as human-readable strings in the correct unit of measurement.
Configuration menu - View commit details
-
Copy full SHA for c417879 - Browse repository at this point
Copy the full SHA c417879View commit details -
support aggregate metrics on MetricsCard
Added a second pair of SegmentedButtons to allow toggling between 'user' and 'aggregate' metrics. So now there are two toggles - instead of repeating all that SegmentedButtons code, I extracted it out into a new ToggleSwitch component, which is a generic wrapper around SegmentedButtons for our particular uses. Each MetricsCard now accepts both userMetricsDays and aggMetricsDays, instead of just one metricDataDays, and it determines which to use based on the value of the toggleswitch - "populationMode"
Configuration menu - View commit details
-
Copy full SHA for 7a3a6c6 - Browse repository at this point
Copy the full SHA 7a3a6c6View commit details -
fix MetricsCard not always updating details view
viewMode was not in the dependency array, so if it was changed in isolation, metricSumValues would not recompute.
Configuration menu - View commit details
-
Copy full SHA for b04aab7 - Browse repository at this point
Copy the full SHA b04aab7View commit details -
fix vertical scrolling on new Dashboard tab
I noticed that when the content was tall enough to allow vertical scrolling, you could not scroll to see the bottom even though the content was in a ScrollView. Upon inspection, the new Dashboard tab was growing infinitely tall, past the bottom of its Angular parent container. We've had this happen a couple times before when embedding React components into Angular views. The way we get around this is with a CSS class called 'fill-container'. I modified it slightly to only affect the *direct* child, not all grand- and great-grand-children. Without this modification, the entire tab would be hidden from view.
Configuration menu - View commit details
-
Copy full SHA for b6dfb4f - Browse repository at this point
Copy the full SHA b6dfb4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d0763cd - Browse repository at this point
Copy the full SHA d0763cdView commit details -
update BarChart for categorical data & flat inputs
We have been showing time-based data on the BarChart, where one of the axes (depending if horizontal or vertical) has values as Unix timestamps. We'd like this component to also work with categorical data, so we will have a boolean prop `timeAxis` to say whether it should be timestamps (true) or categories (false). Also, the way BarChart receives input data has been changed. ChartJS accepts input, categorized by 'datasets' which have their own label. For us, this correlates to the different labeled modes. However, the metrics we get from the server lend themselves better to a 'flattened' structure - we receive an array of days, and what labels were for that day; we don't receive an array of labels with what their value was on each day. So we would have to flip this data around in each place that the BarChart was used. Instead, it's simpler for BarChart to accept a flattened structure - and we can do the flipping here in BarChart before the flipped data is fed into ChartJS. And to better keep track of all this, let's introduce typings for the input, flat 'records' and for the resulting, flipped 'chartData'.
Configuration menu - View commit details
-
Copy full SHA for d074cab - Browse repository at this point
Copy the full SHA d074cabView commit details -
in MetricsCard, pass records to BarChart
BarChart was reworked to accept a 'flat' array of records instead of a deep structure tailored for ChartJS. The flattened structure is more congruent with the userMetricsDays / aggMetricsDays that comes upstream from LabelTab. The BarChart component now handles tailoring this to a format that ChartJS can work with.
Configuration menu - View commit details
-
Copy full SHA for 6780dae - Browse repository at this point
Copy the full SHA 6780daeView commit details -
styling tweaks and refactoring
-move some common styles to a common location MetricsTab -shorten height of MetricsCard title bar -remove top/bottom borders of ToggleSwitch buttons
Configuration menu - View commit details
-
Copy full SHA for 4e7b054 - Browse repository at this point
Copy the full SHA 4e7b054View commit details
Commits on Aug 25, 2023
-
add chart to ActiveMinutesCard
Considering the most recent two weeks for which days of metric data have been loaded, we calculate the total weekly time spend a) walking and b) biking. We store these totals as weeklyActiveMinutesRecords to be included in a vertical, categorical BarChart. `flex: 1` was added to the BarChart component (if it is vertical), as well as to the card content. This allows the "Active Minutes" chart to grow as tall as the Card and display the bar chart more effectively. Also add i18n key for "active minutes"
Configuration menu - View commit details
-
Copy full SHA for 8f8d229 - Browse repository at this point
Copy the full SHA 8f8d229View commit details
Commits on Aug 26, 2023
-
Bulk of the work here is data formatting to use FootprintHelper, done in two main steps parseDataFromMetrics takes in the userData of one metric at a time from the server and gathers "mode bins" resulting in an array of objects with "key"(mode) and "values"(array of arrays of values, one array per day with times and value of the mode) THEN generateSummaryFromData takes each of those binned modes, and aggregates down to a single value - either with sum or avg The 'distance' mode from this summary is digestible to FootprintHelper, used so far to get low and high estimates lots TODO - splitting into "current" and "prev" weeks, agg metrics, goals ...
Abby Wheelis committedAug 26, 2023 Configuration menu - View commit details
-
Copy full SHA for 4aa123a - Browse repository at this point
Copy the full SHA 4aa123aView commit details
Commits on Aug 28, 2023
-
BarChart: support stacked bars
BarCharts will be stacked by default for: -Active minutes ('walk' and 'bike' minutes stacked together) -MetricsCard charts - but they will be toggleable by a checkbox, so they can be either unstacked/stacked. Stacked looks a lot cleaner, especially with a lot of modes showing, so it will be the default. In BarChart.tsx, getChartHeight was modified to account for stacked charts - if labels are stacked on the chart, then the chart height doesn't depend on how many labels are showing and we can just use a constant for the height of each bar (36 was a comfy height).
Configuration menu - View commit details
-
Copy full SHA for db5c005 - Browse repository at this point
Copy the full SHA db5c005View commit details -
show date ranges for weeks on ActiveMinutesCard
To make it clearer what data is being used to calculate week-wise metrics, "Past week" and "Previous week" should be annotated with the specific dates they encompass. For this to not clutter the chart, I wanted these to be on a newline, like this: Past Week 8/21-8/27 ChartJS doesn't support this by itself - `\n` is just rendered as a space - but we can remedy this by adding a callback function under ChartJS options > 'scales' > 'ticks' that splits a label into an array if it has `\n`.
Configuration menu - View commit details
-
Copy full SHA for 23a479c - Browse repository at this point
Copy the full SHA 23a479cView commit details -
readable labels on new dashboard
the dashboard works with the label keys "e.g. 'walk', 'drove_alone'. To show these as readable text we can repurpose a function from `confirmHelper.ts` which is used for "other" text. Let's rename it to be more generic, make it work with more than just 1 underscore, and export it so we can use it on the dashboard too,
Configuration menu - View commit details
-
Copy full SHA for c480d67 - Browse repository at this point
Copy the full SHA c480d67View commit details -
`unitFormatFn` should be used on the chart so the values appear in the listed unit and not the raw value. (e.g., '3 miles' instead of '4828 meters')
Configuration menu - View commit details
-
Copy full SHA for 9e40252 - Browse repository at this point
Copy the full SHA 9e40252View commit details -
refactor new dashboard into Carousel
The horizontal ScrollView requires a few tricks to get the scrolling to snap correctly while managing the card widths and margins. Let's extract this logic to a reusable "Carousel" component so we can use it multiple times without MetricsTab getting too cluttered.
Configuration menu - View commit details
-
Copy full SHA for fde2283 - Browse repository at this point
Copy the full SHA fde2283View commit details -
Configuration menu - View commit details
-
Copy full SHA for 167e3d1 - Browse repository at this point
Copy the full SHA 167e3d1View commit details -
card now retrieves and stores user data for past and previous weeks, worst-case emissions, and US goals used filterToRecentWeeks from metricsHelper.ts to separate user data into the last two weeks, and display data for both if the range is 2 weeks or more worst-case carbon is calculated with a method in FootPrintHelper called on the total distance for the most recent week
Abby Wheelis committedAug 28, 2023 Configuration menu - View commit details
-
Copy full SHA for 76ebb17 - Browse repository at this point
Copy the full SHA 76ebb17View commit details -
add percent change to carbon card
if there is a previous week, we use current and previous to calculate a percent change over the two and display it to the user
Abby Wheelis committedAug 28, 2023 Configuration menu - View commit details
-
Copy full SHA for 8972b51 - Browse repository at this point
Copy the full SHA 8972b51View commit details -
using bar chart, we are able to present the carbon metrics to the user visually. There will be two colors on the graph, one for "certain" and one for "uncertain" to display the range -- graph in rough draft stage currently, want to add baselines and adjust colors also tweaked the labeling in BarChart in response to an error thrown when there were more x axis than labels -- this change shows correct x axis labels for both cards that rely on these categories
Abby Wheelis committedAug 28, 2023 Configuration menu - View commit details
-
Copy full SHA for 9c8e884 - Browse repository at this point
Copy the full SHA 9c8e884View commit details -
comment out "average speed" card
"Average speed" needs to be handled differently because it is not mathematically correct to average it across days without considering differences in distance and duration between those days. (described in e-mission/e-mission-docs#961) We can comment this out; maybe revisit later
Configuration menu - View commit details
-
Copy full SHA for 8839613 - Browse repository at this point
Copy the full SHA 8839613View commit details -
dashboard: initial load 15 days ago to yesterday
Let's change the initial loaded range so that we get 2 full weeks of data. This is so that the weekwise comparisons can show "past week" and "previous week" - if we only had 13 days we could only show "past week" and not the full "previous week"
Configuration menu - View commit details
-
Copy full SHA for 7643895 - Browse repository at this point
Copy the full SHA 7643895View commit details -
using the lineAnnotations attribute, adding the goal lines to the Carbon data graph
Abby Wheelis committedAug 28, 2023 Configuration menu - View commit details
-
Copy full SHA for 35cd467 - Browse repository at this point
Copy the full SHA 35cd467View commit details
Commits on Aug 29, 2023
-
Right component of the CarbonFootprintCard is now an indication of change over past two weeks The element is only visible when there is a change to show, is red when carbon increasing and yellow when carbon decreasing, and shows ranges when labeling leaves doubt The new ChangeIndicator component accepts an array of numbers of length 1 or 2 to display change as a single value or a range. This new component separates the logic and styling, and could be used on another card later if desired.
Abby Wheelis committedAug 29, 2023 Configuration menu - View commit details
-
Copy full SHA for 0fa637d - Browse repository at this point
Copy the full SHA 0fa637dView commit details -
change the boolean for isHorizonal to true and flip x and y values (since x and y are flipped to turn horizontal)
Abby Wheelis committedAug 29, 2023 Configuration menu - View commit details
-
Copy full SHA for f4179f3 - Browse repository at this point
Copy the full SHA f4179f3View commit details -
remove unused code, unused imports, and development log statements also refactored userCarbonRecords useMemo to handle the graph records, old UserCarbon was used for text-based display in initial draft
Abby Wheelis committedAug 29, 2023 Configuration menu - View commit details
-
Copy full SHA for 3d0c910 - Browse repository at this point
Copy the full SHA 3d0c910View commit details -
support split-line labels in horizontal BarChart
incorporating a patch from @JGreenlee to allow the labels to split lines when the graph is horizontal
Abby Wheelis committedAug 29, 2023 Configuration menu - View commit details
-
Copy full SHA for c93961b - Browse repository at this point
Copy the full SHA c93961bView commit details -
made updates to en.json and CarbonCard to enable i18n translation of labels, titles, etc. "(kg Co2)" is now the only hard-coded string here
Abby Wheelis committedAug 29, 2023 Configuration menu - View commit details
-
Copy full SHA for 9e8aebc - Browse repository at this point
Copy the full SHA 9e8aebcView commit details -
using aggMetrics and the same data processing functions, group average is shown alongside user specific metrics We might need to consider hiding this if it is too far out (I'm thinking of nrel-commute, for example, where about 5/6 trips are unlabeled)
Abby Wheelis committedAug 29, 2023 Configuration menu - View commit details
-
Copy full SHA for 5aad944 - Browse repository at this point
Copy the full SHA 5aad944View commit details -
adjust styling of ChangeIdicator
remove accidental import, and adjust to better match the wireframe
Abby Wheelis committedAug 29, 2023 Configuration menu - View commit details
-
Copy full SHA for e6370c0 - Browse repository at this point
Copy the full SHA e6370c0View commit details
Commits on Aug 30, 2023
-
in ChangeIndicator, discovered an error where negative values showed prefixed by -- instead of - added abs calls to prevent this double negative
Abby Wheelis committedAug 30, 2023 Configuration menu - View commit details
-
Copy full SHA for 258721c - Browse repository at this point
Copy the full SHA 258721cView commit details -
When we override the callback in any manner, we're responsible for all formatting of the ticks https://www.chartjs.org/docs/latest/axes/labelling.html overriding to "undefined" meant that the default tick formatter was never called, and the time ticks were unformatted By bumping the timeAxis switch up a level, we prevent overriding the default time ticks, and the dates are shown in an intuitive way
Abby Wheelis committedAug 30, 2023 Configuration menu - View commit details
-
Copy full SHA for 8151d7f - Browse repository at this point
Copy the full SHA 8151d7fView commit details -
when switching from 2+ weeks to a date range < 2 weeks, we should take the change indicator off the card, we accomplish this by setting the emissionsChange to "{}" in the case of NaN, we want to display the change as infinite, since it's a result of dividing by a 0 value for the previous week
Abby Wheelis committedAug 30, 2023 Configuration menu - View commit details
-
Copy full SHA for 4c44a00 - Browse repository at this point
Copy the full SHA 4c44a00View commit details -
eliminate create range function
This range is no longer needed, as we can use the {low, high} object without converting it
Abby Wheelis committedAug 30, 2023 Configuration menu - View commit details
-
Copy full SHA for 8cc6d7f - Browse repository at this point
Copy the full SHA 8cc6d7fView commit details -
show certain/uncertain and goal lines
show group bar with user metrics for "seeing how you stack up" add goal lines in yellow and red to show that "less is more"
Abby Wheelis committedAug 30, 2023 Configuration menu - View commit details
-
Copy full SHA for 9b128b7 - Browse repository at this point
Copy the full SHA 9b128b7View commit details
Commits on Aug 31, 2023
-
make ToggleSwitch more generic
This is basically just a wrapper around SegmentedButtons; let's type it as such and still allow any other SegmentedButtonsprops to be passed through
Configuration menu - View commit details
-
Copy full SHA for 8fc1c65 - Browse repository at this point
Copy the full SHA 8fc1c65View commit details -
move ToggleSwitch to /js/components
So it may be used on other screens in the future
Configuration menu - View commit details
-
Copy full SHA for c468478 - Browse repository at this point
Copy the full SHA c468478View commit details -
match ToggleSwitch props to SegmentedButtonProps
Now this is a perfect wrapper around SegmentedButton, accepting exactly the same props and just applying a different default style. This should aid in reusing this component on other screens.
Configuration menu - View commit details
-
Copy full SHA for 29a0ab1 - Browse repository at this point
Copy the full SHA 29a0ab1View commit details -
revert extra functions in metricsHelper.ts
These functions were committed by accident in c468478 and did not belong there
Configuration menu - View commit details
-
Copy full SHA for d2a8dc5 - Browse repository at this point
Copy the full SHA d2a8dc5View commit details -
ActiveMinutesCard -> WeeklyActiveMinutesCard
refactoring this and putting it in a Carousel in preparation of creating a new card component to place in the carousel
Configuration menu - View commit details
-
Copy full SHA for d9f478b - Browse repository at this point
Copy the full SHA d9f478bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4613f80 - Browse repository at this point
Copy the full SHA 4613f80View commit details -
The LineChart has only a few differences from BarChart - there is no 'stacked' or 'annotations', but we must consider a few new properties: 'borderColor' 'borderWidth' and 'tension' for the lines between points
Configuration menu - View commit details
-
Copy full SHA for 8a605e0 - Browse repository at this point
Copy the full SHA 8a605e0View commit details -
add DailyActiveMinutesCard to MetricsTab
This component has a line chart showing (up to) the last 14 days, with active minutes for each day on the Y axis. There are separate lines for bike and walk.
Configuration menu - View commit details
-
Copy full SHA for 2aea2e5 - Browse repository at this point
Copy the full SHA 2aea2e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 691c206 - Browse repository at this point
Copy the full SHA 691c206View commit details -
add weekly minutes goal, fix lone "0"
-adds the CDC recommended 150 minutes, positioned centered -the 'overall' totals should show if activeModesDurations exists and has a length greater than 0 - if we don't include the '>' operator the expression may evaluate as the number 0, which would be rendered as text
Configuration menu - View commit details
-
Copy full SHA for 41ba903 - Browse repository at this point
Copy the full SHA 41ba903View commit details -
allow gaps in daily active minutes line chart
It's actually important to push records for every day on this chart, even if the values are undefined or otherwise falsy. For example, most people don't bike every day - so we need to show gaps in the line graph on the days they don't, and the only way to do that is to pass falsy values through.
Configuration menu - View commit details
-
Copy full SHA for 20b457a - Browse repository at this point
Copy the full SHA 20b457aView commit details -
Merge remote-tracking branch 'origin/dashboard-rewrite' into dashboar…
…d-rewrite Needed to resolve merge conflicts in order to preserve local changes
Abby Wheelis committedAug 31, 2023 Configuration menu - View commit details
-
Copy full SHA for 6504bae - Browse repository at this point
Copy the full SHA 6504baeView commit details -
added parameter to BarChart to allow for a "meter" chart -- with a green/yellow/red scale changing at specified "middle" and "high" values, dashed lines for uncertainty appear when labeled "dash_key" changed "goal" for "guideline" to further emphasize NOT exceeding it, shortened for better formatting added keys for "labeled" and "unlabeled", replaced what was hard-coded as "certain" and "uncertain"
Abby Wheelis committedAug 31, 2023 Configuration menu - View commit details
-
Copy full SHA for bcc1010 - Browse repository at this point
Copy the full SHA bcc1010View commit details -
when the dashed guidelines are the same colors as the bars - and they cross- the line disappears By darkening the lines slightly, we preserve their visibility when the two objects cross e-mission/e-mission-docs#961 (comment)
Abby Wheelis committedAug 31, 2023 Configuration menu - View commit details
-
Copy full SHA for 71adf57 - Browse repository at this point
Copy the full SHA 71adf57View commit details -
this import should have been a part of 71adf57
Abby Wheelis committedAug 31, 2023 Configuration menu - View commit details
-
Copy full SHA for 950b163 - Browse repository at this point
Copy the full SHA 950b163View commit details -
adding an explanatory footnote to the Carbon card, so users know what the goals mean e-mission/e-mission-docs#961 (comment)
Abby Wheelis committedAug 31, 2023 Configuration menu - View commit details
-
Copy full SHA for 09d4711 - Browse repository at this point
Copy the full SHA 09d4711View commit details
Commits on Sep 1, 2023
-
With all the charting features we've added, this file has gotten fairly long and messy. To keep things tidy, let's extract some of these functions to a separate file called charting.ts. In the process, let's ensure the BarChart is properly typed. Upon reading documentation, I found out that we can type the chart data by using ChartData<'bar', {Z}> where Z is the values that each data point has (in our case, x and y values, which can be number | string) This makes all the type definitions line up - before this, we had a lot of different type warnings because TypeScript didn't understand our data structure.
Configuration menu - View commit details
-
Copy full SHA for a9b311a - Browse repository at this point
Copy the full SHA a9b311aView commit details
Commits on Sep 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d48d333 - Browse repository at this point
Copy the full SHA d48d333View commit details -
for accessibility purposes, the information should be available in ways other than the graph, so that it is easier for a screen reader to successfully navigate the page
Abby Wheelis committedSep 5, 2023 Configuration menu - View commit details
-
Copy full SHA for 0f4a4e9 - Browse repository at this point
Copy the full SHA 0f4a4e9View commit details
Commits on Sep 6, 2023
-
move carbon footprint text to dedicated card
e-mission/e-mission-docs#961 (comment) -> implementing this suggestion isolate the text to a dedicated card, and place the "meter" card and "text" card in a carousel, now we have three rows, each a carousel. also isolated data management functions shared across the two cards into `metricsHelper.ts` The two cards keeps information easily accessible to those using a screen reader, while maintaining focus on the "meter" card and not cluttering the screen
Abby Wheelis committedSep 6, 2023 Configuration menu - View commit details
-
Copy full SHA for 15ed685 - Browse repository at this point
Copy the full SHA 15ed685View commit details -
Abby Wheelis committed
Sep 6, 2023 Configuration menu - View commit details
-
Copy full SHA for 1c3b532 - Browse repository at this point
Copy the full SHA 1c3b532View commit details -
Update the color scheme to correspond to the colors used on the label screen to represent each mode Otherwise duplicated colors are handled by darkening or lightening the base color for subsequent modes of the same "base" storing the modeColors with useMemo means they will only update when chartDatasets change (preventing bog-down issue encountered in development)
Abby Wheelis committedSep 6, 2023 Configuration menu - View commit details
-
Copy full SHA for b377933 - Browse repository at this point
Copy the full SHA b377933View commit details
Commits on Sep 7, 2023
-
remove extraneous commented code
this was committed by accident as an artifact of some earlier experimentation
Configuration menu - View commit details
-
Copy full SHA for e2b6b99 - Browse repository at this point
Copy the full SHA e2b6b99View commit details -
- use 'forEach' as it is a bit more concise than the traditional for loop - instead of formatLabelForSearch, we can borrow a function from confirmHelper that does exactly this and was just sitting around waiting to be used. Let's also ensure this function follows the same process as its opponent function `labelKeyToReadable`, but in reverse, and unify their naming scheme and add descriptions. This function can also be used in MultilabelButtonGroup because we do the same formatting there.
Configuration menu - View commit details
-
Copy full SHA for 4143bf0 - Browse repository at this point
Copy the full SHA 4143bf0View commit details -
chartData itself depends on modeColors, and nothing else uses modeColors. modeColors and chartData both depend on the same thing (chartDatasets) and should update whenever it does. So we can just have modeColors be computed inside of the body of chartData. And to ensure we have labelOptions defined, we'll add that to the dependency array, returning blank data if it isn't defined
Configuration menu - View commit details
-
Copy full SHA for e0c7d82 - Browse repository at this point
Copy the full SHA e0c7d82View commit details -
slim the Carousel card margins
The gap between cards should not be bigger than the gap before the first card / after the last card. To get this effect, the first and last card need full size margins, while the inner margins can be half that. Overall this gives us slimmer margins that are uniform.
Configuration menu - View commit details
-
Copy full SHA for 40a9b5e - Browse repository at this point
Copy the full SHA 40a9b5eView commit details -
decrease Y axis font size on BarChart
in an effort to give some more space to the chart itself e-mission/e-mission-docs#961 (comment)
Configuration menu - View commit details
-
Copy full SHA for 96ee1c6 - Browse repository at this point
Copy the full SHA 96ee1c6View commit details -
it seems more comprehensible when organized this way
Configuration menu - View commit details
-
Copy full SHA for 3335086 - Browse repository at this point
Copy the full SHA 3335086View commit details -
React warns us about the missing 'key' prop if we don't put a key whenever we iterate and repeat components, so a `key` was added to this View. The way the brackets were arranged on line 89 was actually causing a single space " " to be rendered, which React was also warning us about in the console.
Configuration menu - View commit details
-
Copy full SHA for 50c5292 - Browse repository at this point
Copy the full SHA 50c5292View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cb062a - Browse repository at this point
Copy the full SHA 3cb062aView commit details -
style US decarbonization goals text as footnote
This description is basically a footnote - why not formally represent it as such? We'll use small text and a superscript ¹ to mark the footnote.
Configuration menu - View commit details
-
Copy full SHA for aad133e - Browse repository at this point
Copy the full SHA aad133eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ef6860 - Browse repository at this point
Copy the full SHA 3ef6860View commit details -
make Carousel cards slightly wider
We want these cards as wide as possible to show all the info we have without it seeming cramped. But we cannot go too wide or the bleeding edge won't show. Here is a good balance.
Configuration menu - View commit details
-
Copy full SHA for ac59d00 - Browse repository at this point
Copy the full SHA ac59d00View commit details -
mistakenly, the previous and past weeks were showing the same "certain" value I noticed that even with a 43% change the bars looked the same, and was able to catch and fix my mistake
Abby Wheelis committedSep 7, 2023 Configuration menu - View commit details
-
Copy full SHA for 9976516 - Browse repository at this point
Copy the full SHA 9976516View commit details
Commits on Sep 8, 2023
-
adjust color-by-mode on dashboard
We want our code used for charting to be fairly generic and not specific to any particular use case. So instead of handling the mode labels and their base modes in charting.ts, we should refactor this so the logic is encapsulated in the appropriate areas of the codebase. To accomplish this, BarChart can accept a function `getColorForLabel` that it will use on each of the labels it finds in `records`. This way, BarChart and charting.ts don't have to specificially deal with the lookup of the base mode colors. The logic that *does* get included in the charting code, because it is needed for visually distinguishing labels on the charts, is the de-duplication function. I refactored this to be more generic as well - not based on fixed 'stops' of darkening/lightening. Instead, it finds how many duplicates there are and evenly distributes them in lightness. So if there are 2, one will be lightened and the other darkened. With an odd number, the middle will stay the same. And the more duplicates, the closer in shade they will be. Darkening was toned down by a scale of .5 because it has a more drastic effect than lightening. The modeColors themselves were also slightly adjusted in diaryHelper.ts - notably, the difference in hue between 'pink' and 'red' was widened. Besides this, everything was made very slightly lighter and the oklch comments were updated to reflect in-gamut saturation values.
Configuration menu - View commit details
-
Copy full SHA for e4cadd2 - Browse repository at this point
Copy the full SHA e4cadd2View commit details
Commits on Sep 9, 2023
-
Merge branch 'label_dashboard_profile_sept_2023' of https://github.co…
…m/e-mission/e-mission-phone into dashboard-rewrite
Configuration menu - View commit details
-
Copy full SHA for 4c1e967 - Browse repository at this point
Copy the full SHA 4c1e967View commit details
Commits on Sep 11, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 44d3185 - Browse repository at this point
Copy the full SHA 44d3185View commit details -
big refactor of BarChart & LineChart
Instead of repeating a bunch of code between BarChart and LineChart, let's refactor this into a common Chart component that works with a type of either 'bar' or 'line'. Then BarChart and LineCharts will simply be composed of a Chart with the appropriate type specified. Any logic specific to BarCharts or LineCharts can be put in the respective files. Currently, LineChart has no specific logic and the only thing BarCharts have specifically is the 'meter' prop.
Configuration menu - View commit details
-
Copy full SHA for 25a5f5a - Browse repository at this point
Copy the full SHA 25a5f5aView commit details -
add base mode colors to DailyActiveMinutesCard
Now that we refactored, the line chart can accept getColorForLabel in the same way that bar charts do.
Configuration menu - View commit details
-
Copy full SHA for 83aa958 - Browse repository at this point
Copy the full SHA 83aa958View commit details -
for react routing, we need to convert this page and the sync settings page maintain access for now by routing to a React page with angular routing using AlertBars for the error messages first draft: scrolling the FlashList is broken and the data doesn't load unless you manually tap refresh
Abby Wheelis committedSep 11, 2023 Configuration menu - View commit details
-
Copy full SHA for c240f79 - Browse repository at this point
Copy the full SHA c240f79View commit details
Commits on Sep 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7f73823 - Browse repository at this point
Copy the full SHA 7f73823View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca8edbe - Browse repository at this point
Copy the full SHA ca8edbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a353f8 - Browse repository at this point
Copy the full SHA 6a353f8View commit details -
The new dashboard has a lot of charts. In consideration of accessibility, we want to also display this information in non-graphical text formats. This cards shows all the metrics for active minutes in the form of a paginated table.
Configuration menu - View commit details
-
Copy full SHA for 62ea9f4 - Browse repository at this point
Copy the full SHA 62ea9f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 17f401c - Browse repository at this point
Copy the full SHA 17f401cView commit details -
Merge remote-tracking branch 'upstream/label_dashboard_profile_sept_2…
…023' into unblock-routing
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for ef6ba26 - Browse repository at this point
Copy the full SHA ef6ba26View commit details -
implement refresh() on MetricsTab
Also, the type of dateRange was changed to `DateTime[]` (since I realized it had been declared using the wrong typing style)
Configuration menu - View commit details
-
Copy full SHA for 8ebc390 - Browse repository at this point
Copy the full SHA 8ebc390View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89e3d64 - Browse repository at this point
Copy the full SHA 89e3d64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 06f7b2d - Browse repository at this point
Copy the full SHA 06f7b2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 72f6437 - Browse repository at this point
Copy the full SHA 72f6437View commit details -
dashboard: use rich mode text, not readable label
The dashboard should show the full text of the mode as defined in the label options - e.g. show "Gas Car Drove Alone", not "Drove Alone". According to #1026 (comment) we shouldn't convert keys like "drove_alone" to readable like "Drove Alone", except in the case of user-defined labels ('other text')
Configuration menu - View commit details
-
Copy full SHA for 9208ec0 - Browse repository at this point
Copy the full SHA 9208ec0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7dbc343 - Browse repository at this point
Copy the full SHA 7dbc343View commit details -
refactor dialogStyle and create Action Menu
instead of making dialogStyle a parameter, export and import the stylesheet where it is used, to maintain consistency and limit parameters Needed something similar to some of the dialogs in ProfileSettings for the SyncLogs -- so create a component `ActionMenu` to show the list of options, replacing the two hard-coded modals (carbon and force state) with an instance of ActionMenu
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for c8ceafe - Browse repository at this point
Copy the full SHA c8ceafeView commit details -
so each has it's own title, add a title parameter
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for b682e53 - Browse repository at this point
Copy the full SHA b682e53View commit details -
make space for annotation at top of chart
If the annotations sit at the top of a horizontal bar chart, they will cover up much of the top bar. We can offset them so they sit higher, and set clip=false so they can show above the chart area, but then they crowd the legend. There isn't a good way to add padding/margin to a ChartJS legend, so we have this workaround in 'plugins'
Configuration menu - View commit details
-
Copy full SHA for 7d2b9dc - Browse repository at this point
Copy the full SHA 7d2b9dcView commit details -
fix footprint calculations using baseModes
The footprint calculations were not using because we were looking up footprints by rich mode and we needed to be looking up by base mode.
Configuration menu - View commit details
-
Copy full SHA for 5fcc5d4 - Browse repository at this point
Copy the full SHA 5fcc5d4View commit details -
the other page that needs conversion is the one that shows sensed data, so convert it as well Resolved scroll issue by getting out of Angular -- using a full screen modal helps us accomplish this
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for 7e55e83 - Browse repository at this point
Copy the full SHA 7e55e83View commit details -
we no longer rely on any of the angular code that controlled the log pages, so we can remove the files and the places they were imported
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for 4c430d2 - Browse repository at this point
Copy the full SHA 4c430d2View commit details -
adjust ChangeIndicator colors and text
-round percentage change to whole numbers because it is less cluttered that way -show % sign on both sides of the range - internationalize 'this week' -use transparency on background/border colors so it does not clash with the colors on the card -make 'success' color less washed-out
Configuration menu - View commit details
-
Copy full SHA for 7d0eb81 - Browse repository at this point
Copy the full SHA 7d0eb81View commit details -
previously, was not loading more when you hit the end of the list, now the list loads more when you reach the end
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for f1f9b57 - Browse repository at this point
Copy the full SHA f1f9b57View commit details -
load the log pages when their visibility changes, this seems cleaner than tying it to the config, since this is unrelated to the config
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for e21cb6e - Browse repository at this point
Copy the full SHA e21cb6eView commit details -
The use of UTC time here was inconsistent with how MetricsDateSelect works - MetricsDateSelect uses the local timezone for date selection. DateTime.utc returns a DateTime object which may be on a different day than the day in the local timezone. MetricsDateSelect works properly for this and the initial load should follow suit.
Configuration menu - View commit details
-
Copy full SHA for 92ad2ee - Browse repository at this point
Copy the full SHA 92ad2eeView commit details -
Abby Wheelis committed
Sep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for 496b353 - Browse repository at this point
Copy the full SHA 496b353View commit details -
I was getting a mysterious "unrecognized selector" error and came to the conclusion that it was because loadStats.currentStart was null on first load, by setting a fallback, the error is resolved
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for fe44ae6 - Browse repository at this point
Copy the full SHA fe44ae6View commit details -
remove infiniteScrollComplete broadcasts
these had been commented out, and by searching the codebase I came to the conclusion that they were for communicating with angular/ionic, which we no longer use unlike other broadcasts, this is not received by other parts of our code, to trigger some action, so we don't need it
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for e50f0a1 - Browse repository at this point
Copy the full SHA e50f0a1View commit details -
I was using react-native Text when I wanted react-native-paper Text
Abby Wheelis committedSep 12, 2023 Configuration menu - View commit details
-
Copy full SHA for fd32aee - Browse repository at this point
Copy the full SHA fd32aeeView commit details
Commits on Sep 13, 2023
-
Adding translations for the user-visible strings to ensure users can access the dev zone, the logs will be in English, but with headers and error messages in selected language participating in debugging will be easier
Abby Wheelis committedSep 13, 2023 Configuration menu - View commit details
-
Copy full SHA for d20bf2e - Browse repository at this point
Copy the full SHA d20bf2eView commit details -
we don't need these show sensed or show logs anymore!
Abby Wheelis committedSep 13, 2023 Configuration menu - View commit details
-
Copy full SHA for f132056 - Browse repository at this point
Copy the full SHA f132056View commit details -
factor out "Locations" and "Motion Type"
these two options are not supported, so we should not present them to the user -- removing them leaves us with one option, so no need for an options menu This reduces the complexity of the sensed data page significantly note about removing options: #1029 (comment)
Abby Wheelis committedSep 13, 2023 Configuration menu - View commit details
-
Copy full SHA for 723c5e7 - Browse repository at this point
Copy the full SHA 723c5e7View commit details -
combine dev-errors into errors
Abby Wheelis committedSep 13, 2023 Configuration menu - View commit details
-
Copy full SHA for d04d5ee - Browse repository at this point
Copy the full SHA d04d5eeView commit details
Commits on Sep 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a3b0c08 - Browse repository at this point
Copy the full SHA a3b0c08View commit details -
re-order "Prev. week" before "Past week", refactor
Order changed on Carbon + Active minutes cards - Prev week comes first to establish a trend. - 'filterToRecentWeeks' refactored into 'segmentDaysByWeeks'. Although it does largely the same thing, the new one is more generic because it works for any number of weeks, not just 2
Configuration menu - View commit details
-
Copy full SHA for b9e1416 - Browse repository at this point
Copy the full SHA b9e1416View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ecfa58 - Browse repository at this point
Copy the full SHA 0ecfa58View commit details -
fix error sometimes if metrics is not defined yet
If metrics is not defined, we can simply skip this and let the function return [] - it will be re-run from upstream once metrics is defined
Configuration menu - View commit details
-
Copy full SHA for 54e6d8b - Browse repository at this point
Copy the full SHA 54e6d8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 907737b - Browse repository at this point
Copy the full SHA 907737bView commit details -
We will now use the same yellow-orange-red gradient for all bars that have a gradient, instead of making a specific gradient for each bar. This allows the gradients on each bar to line up. The gradient will only apply to bars that exceed meter.low. Anything below low is green. Anything in middle is yellow, becoming orange-red as it gets higher. If it goes above high, it will start to become dark red up to high+20. #1018 (comment)
Configuration menu - View commit details
-
Copy full SHA for a3264e2 - Browse repository at this point
Copy the full SHA a3264e2View commit details -
refactor: remove darkenForBorder + fix
We already have a function that serves this purpose, so let's just use it (darkenOrLighten) It turns out that it was actually flipped from what was intended, though -- negative numbers should equate to darkening and positive to lightening. It didn't really matter before because it was used for deduping where one duplicate is always lightened while the other is darkened.
Configuration menu - View commit details
-
Copy full SHA for 67111b8 - Browse repository at this point
Copy the full SHA 67111b8View commit details -
create a React version of ControlCollectionHelper and ControlSync Helper. These hold the logic for interfacing with the plugins, as well as UI elements for editing menus and various alerts / messages The place this is being stored has also changed, we no longer need to import from the other repos These helpers will eliminate the last parts of React routing, and allow us to no longer rely on the broadcast of "control update complete" to ensure the UI stays up to date
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for 5e7a50c - Browse repository at this point
Copy the full SHA 5e7a50cView commit details -
medium accuracy switch was broken, now can be toggled smoothly
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for 9255675 - Browse repository at this point
Copy the full SHA 9255675View commit details -
remove update complete listeners
no longer needed, as refreshCollect settings is called after toggling accuracy, toggling tracking, and when the settings editor is closed
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for 1b8a43c - Browse repository at this point
Copy the full SHA 1b8a43cView commit details -
no longer rely on settingsScope to catch recomputeAppStatus, because we check on resume, this is not needed
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for 9078488 - Browse repository at this point
Copy the full SHA 9078488View commit details -
the debouncing patch for toggleLowAccuracy is no longer needed!
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for e02db4a - Browse repository at this point
Copy the full SHA e02db4aView commit details -
prevent "missing argument errors"
since these arguments are optional, and we render based on their existence, set the default to undefined
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for d55760f - Browse repository at this point
Copy the full SHA d55760fView commit details -
no longer need to debounce, so no need to keep code around
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for 2cb1145 - Browse repository at this point
Copy the full SHA 2cb1145View commit details -
isolate forceSync code to ControlSyncHelper
to start decluttering `ProfileSettings` move the component to the ControlSyncHelper then import it into `Profile Settings` by exporting a component, we can wrap the popups and their states into one place
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for 1189700 - Browse repository at this point
Copy the full SHA 1189700View commit details -
don't store a duplicate copy of the collectConfig
this was one way I attempted to control the ControlSettings, but moved to set/get from a central location (plugin) for one-off changes (toggles) and using the local config, and saving once, when editing with the settings editor modal
Abby Wheelis committedSep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for df78758 - Browse repository at this point
Copy the full SHA df78758View commit details
Commits on Sep 15, 2023
-
if we had dates for the 1st through 15th (15 days), this function would mistakenly return the 8th through 14th and the 1st through 7th. We actually want the 9th through 15th and the 2nd throgh 8th, because it should be relative to the most recent day. To fix this we iterate over the days backwards, not forwards. With this approach we also don't have to reverse the weeks when we return them because they are already with the most recent first.
Configuration menu - View commit details
-
Copy full SHA for fe2dd55 - Browse repository at this point
Copy the full SHA fe2dd55View commit details -
we had figured out that there were some differences e-mission/e-mission-docs#961 (comment) Eventually, we realized this was because the new dashboard was not using the custom labels. This commit adds the methods that check to see if the labels are custom or sensed to `metricsHelper`, checks for custom labels and indicates the need for custom footprint mappings in `CarbonFootprintCard` and the finally reverts back to "rich modes" rather than "base modes" in `metrics-factory` so we use the custom labels
Abby Wheelis committedSep 15, 2023 Configuration menu - View commit details
-
Copy full SHA for f57603c - Browse repository at this point
Copy the full SHA f57603cView commit details -
Merge branch 'dashboard-rewrite' of https://github.com/JGreenlee/e-mi…
…ssion-phone into dashboard-rewrite
Abby Wheelis committedSep 15, 2023 Configuration menu - View commit details
-
Copy full SHA for f9822c5 - Browse repository at this point
Copy the full SHA f9822c5View commit details -
carbon chart: fix border of green, 'low' emissions
this hardcoded value caused the returned color to be the same for both the bar background and the border. The darkening should be based on the parameter allowing the border to use a darkened green while the background is not darkened.
Configuration menu - View commit details
-
Copy full SHA for 388b5d7 - Browse repository at this point
Copy the full SHA 388b5d7View commit details -
add slight borderRadius to Charts
This gives the bar charts a slightly softer feel, more in line with the rest of the UI which is pretty rounded off everywhere.
Configuration menu - View commit details
-
Copy full SHA for 44753f6 - Browse repository at this point
Copy the full SHA 44753f6View commit details -
reorder goal lines + adjust colors
If the scale of the graph is too large, the 2030 and 2050 guidelines labels might overlap. In that case, we should show the 2030 label on top. Also, the colors are kind of hard to see with the bars having their new gradient color scheme. So for the colors of the lines, let's just darken the yellow, and bump up the saturation of both.
Configuration menu - View commit details
-
Copy full SHA for 9cad0ee - Browse repository at this point
Copy the full SHA 9cad0eeView commit details -
found a bug where the text for the group was being calculated off of user metrics!
Abby Wheelis committedSep 15, 2023 Configuration menu - View commit details
-
Copy full SHA for c2c656c - Browse repository at this point
Copy the full SHA c2c656cView commit details -
only show metrics for whole weeks
to avoid showing metrics for partial weeks, check the length before displaying.
Abby Wheelis committedSep 15, 2023 Configuration menu - View commit details
-
Copy full SHA for dd126a7 - Browse repository at this point
Copy the full SHA dd126a7View commit details -
moving endForceSync and forceTransition into their respective helpers
Abby Wheelis committedSep 15, 2023 Configuration menu - View commit details
-
Copy full SHA for 1551eee - Browse repository at this point
Copy the full SHA 1551eeeView commit details -
Abby Wheelis committed
Sep 15, 2023 Configuration menu - View commit details
-
Copy full SHA for 1cfb190 - Browse repository at this point
Copy the full SHA 1cfb190View commit details -
Abby Wheelis committed
Sep 15, 2023 Configuration menu - View commit details
-
Copy full SHA for f012973 - Browse repository at this point
Copy the full SHA f012973View commit details
Commits on Sep 18, 2023
-
Abby Wheelis committed
Sep 18, 2023 Configuration menu - View commit details
-
Copy full SHA for c46e2dc - Browse repository at this point
Copy the full SHA c46e2dcView commit details -
for consistency and readability, re-writing the forceSync to rely on await rather than chained .then statements
Abby Wheelis committedSep 18, 2023 Configuration menu - View commit details
-
Copy full SHA for 7f8ff42 - Browse repository at this point
Copy the full SHA 7f8ff42View commit details -
for readability, switch from chained .then statements to using await calls
Abby Wheelis committedSep 18, 2023 Configuration menu - View commit details
-
Copy full SHA for 2876872 - Browse repository at this point
Copy the full SHA 2876872View commit details -
Configuration menu - View commit details
-
Copy full SHA for de20d3b - Browse repository at this point
Copy the full SHA de20d3bView commit details -
we've moved away from showing "calories burned in active travel" and started to show "minutes spent in active travel" Therefore, we no longer need the keys about calories, calibrating to user date (already left profile) or comparing the calories to food.
Abby Wheelis committedSep 18, 2023 Configuration menu - View commit details
-
Copy full SHA for 8f5fb89 - Browse repository at this point
Copy the full SHA 8f5fb89View commit details
Commits on Sep 19, 2023
-
Merge remote-tracking branch 'upstream/label_dashboard_profile_sept_2…
…023' into dashboard-rewrite
Abby Wheelis committedSep 19, 2023 Configuration menu - View commit details
-
Copy full SHA for edd8624 - Browse repository at this point
Copy the full SHA edd8624View commit details
Commits on Sep 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ab26e18 - Browse repository at this point
Copy the full SHA ab26e18View commit details -
Merge pull request #1029 from Abby-Wheelis/unblock-routing
Profile changes to unblock routing
Configuration menu - View commit details
-
Copy full SHA for e93059f - Browse repository at this point
Copy the full SHA e93059fView commit details -
Merge branch 'dashboard-rewrite' of https://github.com/JGreenlee/e-mi…
…ssion-phone into dashboard-rewrite
Abby Wheelis committedSep 25, 2023 Configuration menu - View commit details
-
Copy full SHA for da20511 - Browse repository at this point
Copy the full SHA da20511View commit details -
Merge upstream, resolved main.js
also tested this code by running in emulator to ensure no errors
Abby Wheelis committedSep 25, 2023 Configuration menu - View commit details
-
Copy full SHA for 4cc97db - Browse repository at this point
Copy the full SHA 4cc97dbView commit details -
update comments about prev vs past week
since we have room in the code, clarify what we mean by referencing "how many days ago" the calculations cover
Abby Wheelis committedSep 25, 2023 Configuration menu - View commit details
-
Copy full SHA for 8c6bdb2 - Browse repository at this point
Copy the full SHA 8c6bdb2View commit details -
not >= 7 day weeks, == 7 day weeks
Abby Wheelis committedSep 25, 2023 Configuration menu - View commit details
-
Copy full SHA for 752674b - Browse repository at this point
Copy the full SHA 752674bView commit details -
update infinity behavior on changeIndicator
if the change is infinite, show that. If the change is infinite, and infinitely uncertain (-inf/+inf) don't show, and otherwise show the finite range
Abby Wheelis committedSep 25, 2023 Configuration menu - View commit details
-
Copy full SHA for bb4fdd0 - Browse repository at this point
Copy the full SHA bb4fdd0View commit details
Commits on Sep 26, 2023
-
Merge pull request #1018 from JGreenlee/dashboard-rewrite
📊 Rewrite of the New Dashboard Tab
Configuration menu - View commit details
-
Copy full SHA for 87b3456 - Browse repository at this point
Copy the full SHA 87b3456View commit details
Commits on Sep 27, 2023
-
register all ChartJS elements as workaround
Described in e-mission/e-mission-docs#986 (comment), we have a production-specific error where the needed ChartJS elements are not recognized as being registered. Likely an incompatibility between ChartJS and Webpack. As a workaround, we will register all of the `registerables`. Unfortunately, we will no longer benefit from tree-shaking with this approach.
Configuration menu - View commit details
-
Copy full SHA for 00d808d - Browse repository at this point
Copy the full SHA 00d808dView commit details -
Merge pull request #1039 from JGreenlee/chartjs-register-workaround
Register all ChartJS elements as workaround
Configuration menu - View commit details
-
Copy full SHA for c190794 - Browse repository at this point
Copy the full SHA c190794View commit details
Commits on Sep 28, 2023
-
fix: handle undetermined state of appstatus checks
In AppStatusModal, we listen for the value of overallStatus and if it is false, we trigger the permissions popup. But there is an issue where the AppStatusModal sometimes shows up even if all the checks are green. This is because it can take some time for the checks to initialize and return back their value. During this time, we want to have a sort of 'undetermined' state for overallStatus, so that we don't show the popup prematurely. We'll do this by allowing overallStatus to be either true/false OR undefined. If there are no checks yet, overallStatus will be undefined and we won't show the popup yet. Once the checks are initialized, we'll be able to determine the status and it will return true or false. For the individual checks themselves, they also need to be able to report an 'undetermined' state. If their statusStates are false by default, and are false before they have actually been determined, then overallStatus will also be false while the check is still ongoing. So we should remove the initial 'false' condition from the few checks that had it, allowing the initial to be 'undefined', and when we iterate through the checks, we will explicitly check if `statusState === false` instead of just checking if `!statusState`. Result of this is that AppStatusModal only shows if any permissions are broken. Tested by loading the app, with all of the correct permissions, 20 times both before and after the change. Before the change, 2 of the attempts resulted in the AppStatusModal incorrectly appearing. After the change, the AppStatusModal did not appear on any of the 20 attempts. After this, I disallowed the Location permission and the modal did still appear as expected.
Configuration menu - View commit details
-
Copy full SHA for 8b6c316 - Browse repository at this point
Copy the full SHA 8b6c316View commit details -
on some occasions, the checkList was failing to be initialized. Upon investigation, this turned out to be because platform and osver were "" and 0, respectively. The underlying issue is that they were held in useState, which is updated asyncronously. useRef is more appropriate here, as the platform and osver only need to be set once, and are not anticipated to change. The access changed, as useRef variables are read and set from "var.current" Before these changes, roughly 1/3 of the time, the platform and osver were not set yet, and so the checks were not set up as the platform was interpreted as not valid. After the change, the platform and osver are always set properly in time to call createChecklist. I also updated the useEffect that calls the createChecklist to do so if checkList does not exist or has a length of 0, rather than the else that I had before.
Abby Wheelis committedSep 28, 2023 Configuration menu - View commit details
-
Copy full SHA for 8e061a0 - Browse repository at this point
Copy the full SHA 8e061a0View commit details -
export modeColors so it can be used in tests
Something I noticed while adding new tests - modeColors is used in diaryHelper.test.ts, but it isn't exported from diaryHelper.ts. I think this was due to a bad merge conflict. Simply exporting it fixes the tests, so I'm just going to bundle in that fix here.
Configuration menu - View commit details
-
Copy full SHA for faaeda6 - Browse repository at this point
Copy the full SHA faaeda6View commit details -
I forgot to remove cch from one place in this file when I translated it from it's former angular version, which was causing the problem with android devices and the medium accuracy toggle While here, resolve the syntax highlighting related to window.cordova by replacing it with window['cordova'], not fixing this syntax in the first place likely contributed to me overlooking this error.
Abby Wheelis committedSep 28, 2023 Configuration menu - View commit details
-
Copy full SHA for e5b2834 - Browse repository at this point
Copy the full SHA e5b2834View commit details -
Merge pull request #1041 from JGreenlee/fix-appstatus-checks
Fixes for End of Sept RC
Configuration menu - View commit details
-
Copy full SHA for 0f7caef - Browse repository at this point
Copy the full SHA 0f7caefView commit details