-
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
🎀 UI Migration Wrap-up #1106
🎀 UI Migration Wrap-up #1106
Commits on Nov 21, 2023
-
Merge branch 'controlHelper-rewrite' of https://github.com/the-bay-ka…
…y/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 6fc9894 - Browse repository at this point
Copy the full SHA 6fc9894View commit details -
Merge branch 'expand-enketo-helper' of https://github.com/Abby-Wheeli…
…s/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 6d64774 - Browse repository at this point
Copy the full SHA 6d64774View commit details -
Merge branch 'diaryServices-rewrite' of https://github.com/the-bay-ka…
…y/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 2c92ff9 - Browse repository at this point
Copy the full SHA 2c92ff9View commit details -
Merge branch 'notifScheduler-rewrite' of https://github.com/sebastian…
…barry/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 0092ace - Browse repository at this point
Copy the full SHA 0092aceView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd39c92 - Browse repository at this point
Copy the full SHA dd39c92View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0170de - Browse repository at this point
Copy the full SHA c0170deView commit details -
Merge branch 'service_rewrite_2023_emailService' of https://github.co…
…m/niccolopaganini/e-mission-phone-nvsr-iter1 into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 30eccf3 - Browse repository at this point
Copy the full SHA 30eccf3View commit details -
Merge branch 'metrics-services-rewrite' of https://github.com/Abby-Wh…
…eelis/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for c03324f - Browse repository at this point
Copy the full SHA c03324fView commit details -
remove all remaining uses of getAngularService()
-In useAppConfig.ts, we can't rely on $ionicPlatform anymore since we won't be using Angular moving forward. So we need an alternate way to ensure Cordova plugins are ready before we try to do stuff with them. I found that Cordova fires the 'deviceready' event once plugins are loaded - so we can just listen for that, wrap it in a promise, and use it in the place of $ionicPlatform.ready(...) -There were a few uses where getAngularService() was still used to access the old Logger, which were easily substituted to instead use the functions exported from logger.ts (logDebug, logWarn, etc) -There were several unused imports left over in files where getAngularService was formerly used and is no longer
Configuration menu - View commit details
-
Copy full SHA for 3760d25 - Browse repository at this point
Copy the full SHA 3760d25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a0daf9 - Browse repository at this point
Copy the full SHA 2a0daf9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2871402 - Browse repository at this point
Copy the full SHA 2871402View commit details -
The startup logic will now happen not in an Angular context, but with an event listener for 'deviceready' (which is what Cordova uses) And the React initialization will happen from there.
Configuration menu - View commit details
-
Copy full SHA for 4df43c2 - Browse repository at this point
Copy the full SHA 4df43c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3242697 - Browse repository at this point
Copy the full SHA 3242697View commit details -
Merge branch 'service_rewrite_2023_emailService' of https://github.co…
…m/niccolopaganini/e-mission-phone-nvsr-iter1 into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 5b0cea0 - Browse repository at this point
Copy the full SHA 5b0cea0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea60154 - Browse repository at this point
Copy the full SHA ea60154View commit details -
Merge branch 'expand-enketo-helper' of https://github.com/Abby-Wheeli…
…s/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 2c4afca - Browse repository at this point
Copy the full SHA 2c4afcaView commit details -
consolidate ngApp.js into index.js
Since these have both been simplified we can merge them together
Configuration menu - View commit details
-
Copy full SHA for 2d438f0 - Browse repository at this point
Copy the full SHA 2d438f0View commit details -
fix failing test in notifScheduler
It was failing because 'commHelper' is no longer directly in '/js' -- it is in 'js/services'
Configuration menu - View commit details
-
Copy full SHA for 5bb56fe - Browse repository at this point
Copy the full SHA 5bb56feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 80fa776 - Browse repository at this point
Copy the full SHA 80fa776View commit details -
Configuration menu - View commit details
-
Copy full SHA for ebe7fe5 - Browse repository at this point
Copy the full SHA ebe7fe5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 263c90a - Browse repository at this point
Copy the full SHA 263c90aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 99e1090 - Browse repository at this point
Copy the full SHA 99e1090View commit details
Commits on Nov 22, 2023
-
comply to Typescript "strictNullChecks": true
This commit enables strictNullChecks for greater type safety and then fixes the dozens of instances where TS now warns us about values that are potentially null https://www.typescriptlang.org/tsconfig#strictNullChecks This means adding types on a lot of places where we had not added types before. Typescript is more powerful when it's on a stricter configuration, but this means we have to be more explicit. In a few of the files, I also cleaned up formatting and modernized syntax while I was making changes there.
Configuration menu - View commit details
-
Copy full SHA for 49a1a64 - Browse repository at this point
Copy the full SHA 49a1a64View commit details -
more type safety to comply with strictNullChecks
continuation of 49a1a64
Configuration menu - View commit details
-
Copy full SHA for 9f7bc4a - Browse repository at this point
Copy the full SHA 9f7bc4aView commit details -
clean/reformat pushNotifySettings
This file had a lot of outdated JS syntax and console.log statements. I just did a full sweep of this file and 'modernized' it. Added some type definitions too.
Configuration menu - View commit details
-
Copy full SHA for 3d14e37 - Browse repository at this point
Copy the full SHA 3d14e37View commit details -
use aria-hidden instead of accessibilityHidden
I previously used the wrong property name here. Now that we have Typescript on a stricter configuration, I found my mistake
Configuration menu - View commit details
-
Copy full SHA for 6b70afd - Browse repository at this point
Copy the full SHA 6b70afdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 72b3f7a - Browse repository at this point
Copy the full SHA 72b3f7aView commit details -
We previously had maintainers for the translations in these languages, but they have not been updated in a very long time. Because the app has changed so much since then, the old translations are almost entirely obsolete. At this point, I think it is better to remove them from usage. If we ever get someone to update the translations we can add them back. We'll still keep the old translations up on the e-mission-translate repo although they won't be used here.
Configuration menu - View commit details
-
Copy full SHA for 12133ba - Browse repository at this point
Copy the full SHA 12133baView commit details -
Configuration menu - View commit details
-
Copy full SHA for b60a05f - Browse repository at this point
Copy the full SHA b60a05fView commit details -
VSCode was only picking up on our declaration TS files if they were open in the editor. This signals to VSCode and TS to check js/types for .d.ts files.
Configuration menu - View commit details
-
Copy full SHA for 50fb40d - Browse repository at this point
Copy the full SHA 50fb40dView commit details -
cleanup and fix types in ProfileSettings
This file was a JSX file until very recently and so a lot of type errors and warnings went unnoticed. There were a lot, so I just went over the whole file - fixing typings, modernizing syntax, and removing things that are unused. As part of this I expanded the typings for AppConfig.
Configuration menu - View commit details
-
Copy full SHA for df0f03f - Browse repository at this point
Copy the full SHA df0f03fView commit details -
more cleanup related to typings
Continuing to clean up type warnings that are now showing up since 49a1a64
Configuration menu - View commit details
-
Copy full SHA for 9e58c7e - Browse repository at this point
Copy the full SHA 9e58c7eView commit details
Commits on Nov 29, 2023
-
fix DiaryCard showing current time if blank
dt might be undefined here (like in the case of the most recent / current place in the timeline) In that case we should return nothing instead of letting Luxon create a new date (it would fallback to the current date&time which we don't want)
Configuration menu - View commit details
-
Copy full SHA for 3bebd8c - Browse repository at this point
Copy the full SHA 3bebd8cView commit details -
this is used in a few places - it's tidier to have a common type definition
Configuration menu - View commit details
-
Copy full SHA for 9a2567c - Browse repository at this point
Copy the full SHA 9a2567cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e232ab - Browse repository at this point
Copy the full SHA 3e232abView commit details -
new LabelTab functions for user inputs
i) instead of providing timelineLabelMap and timelineNotesMap to the entire component tree under LabelTab, we can pass accessor functions (userInputFor, labelFor, notesFor) to get user inputs in a cleaner way ii) Unify the structure of how multilabel vs enketo user inputs are kept on the phone. Now both will be the 'raw' format (an object with 'data', 'metadata' etc). Note that there is still a discrepancy on the server - for multilabel inputs we get a plain string and for enketo inputs we get the whole userinput entry. The plan is to unify this on the server at some point, so I am doing it here on the phone in advance. iii) instead of using a 'justRepopulated' flag to signify that an entry should not be filtered within 30 seconds of having a user input recorded on it, we can just look at the write_ts in the metadata of that entry's inputs and see if it was within 30 seconds ago. If so, it's immune to filtering. After a label is recorded and added to the timelineLabelMap, we'll trigger a refilter after 30 seconds by calling setLastFilteredTs. This approach negates the need for an extra property on the timelineEntry object - which is good because we want it to match the server type.
Configuration menu - View commit details
-
Copy full SHA for 7a0ea59 - Browse repository at this point
Copy the full SHA 7a0ea59View commit details
Commits on Nov 30, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cf7027e - Browse repository at this point
Copy the full SHA cf7027eView commit details -
fix UserInputButton not filling in after response
This useEffect was watching timelineEntry for updates, but we changed the mechanism so timelineMap is no longer updated -- only the timelineLabelMap gets updated when a new response is recorded. By watching the result of userInputFor(...), this component will recieve the update.
Configuration menu - View commit details
-
Copy full SHA for 45799c6 - Browse repository at this point
Copy the full SHA 45799c6View commit details -
add duration to ConfirmedPlace type def
This has always been a property on the server for trips as well as places. For some reason I must have missed it on the first pass of making the ConfirmedPlace type definition.
Configuration menu - View commit details
-
Copy full SHA for 27549a3 - Browse repository at this point
Copy the full SHA 27549a3View commit details -
refactor enketo user input types
It keeps the codebase more logical (and more modular) to keep Enketo survey-related type definitions encapsulated away in enketoHelper.
Configuration menu - View commit details
-
Copy full SHA for 2efb03d - Browse repository at this point
Copy the full SHA 2efb03dView commit details -
When we have Typescript compiler in 'watch' mode (useful for linting/ finding type errors in VSCode), it outputs to the root level directory 'dist'. Adding this directory to gitignore so we don't end up needlessly committing these output files.
Configuration menu - View commit details
-
Copy full SHA for fa1dfbf - Browse repository at this point
Copy the full SHA fa1dfbfView commit details -
fix reload on every tab switch
Each tab gets wrapped by an error boundary. We were doing this in the body of the App component which means every time the App component was updated/rerendered, the tabs were recomputed too. Doing the error boundary wrapping outside of the App component ensures that it only happens once and we use the same tab components each time
Configuration menu - View commit details
-
Copy full SHA for 44ecc45 - Browse repository at this point
Copy the full SHA 44ecc45View commit details -
-Fix size of Leaflet markers -- this changed when we removed all the extra CSS bloat and easy one line restores the previous size -Unify app bar styles -- removed elevation: 3 to soften the shadow (default is 1 and matches the rest of the app better - we were only using elevation 3 to match the style of the Ionic header) -- use 'colors.surface' instead of hardcoded 'white' - unify 'notesButton' style of diary cards - add paddingHorizontal to ModesIndicator -- this way, if there are a lot of modes, they have room to breathe
Configuration menu - View commit details
-
Copy full SHA for 31ce4d3 - Browse repository at this point
Copy the full SHA 31ce4d3View commit details
Commits on Dec 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 76e579e - Browse repository at this point
Copy the full SHA 76e579eView commit details -
Merge branch 'notifScheduler-rewrite' of https://github.com/sebastian…
…barry/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for f04079b - Browse repository at this point
Copy the full SHA f04079bView commit details -
Merge branch 'diaryServices-rewrite' of https://github.com/the-bay-ka…
…y/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for a0eb054 - Browse repository at this point
Copy the full SHA a0eb054View commit details
Commits on Dec 4, 2023
-
As in fa1dfbf, TypeScript puts output files here. We don't need git NOR Jest to pick up on these 'dist' files.
Configuration menu - View commit details
-
Copy full SHA for 4959198 - Browse repository at this point
Copy the full SHA 4959198View commit details -
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
…-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for c0e29ef - Browse repository at this point
Copy the full SHA c0e29efView commit details -
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
…-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for f5dc166 - Browse repository at this point
Copy the full SHA f5dc166View commit details -
Merge branch 'diaryServices-rewrite' of https://github.com/the-bay-ka…
…y/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 76e6867 - Browse repository at this point
Copy the full SHA 76e6867View commit details
Commits on Dec 5, 2023
-
With invalid inputs, this function should return early rather than continuing and resulting in a zero-length duration. Fixes the diaryHelper test that was failing.
Configuration menu - View commit details
-
Copy full SHA for 47acc03 - Browse repository at this point
Copy the full SHA 47acc03View commit details -
rework resolveTimestamps validation to fix test
We need a safe way to mark that validation fails in this function, without actually throwing an error. Let's use a third parameter for this purpose which is a callback function 'onFail' to handle the invalid case. - Updated tests accordingly - now passing
Configuration menu - View commit details
-
Copy full SHA for ee2fe2a - Browse repository at this point
Copy the full SHA ee2fe2aView commit details
Commits on Dec 6, 2023
-
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
…-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for aa9ee64 - Browse repository at this point
Copy the full SHA aa9ee64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f173ba - Browse repository at this point
Copy the full SHA 4f173baView commit details
Commits on Dec 7, 2023
-
Merge branch 'notifScheduler-rewrite' of https://github.com/sebastian…
…barry/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 0f77f5c - Browse repository at this point
Copy the full SHA 0f77f5cView commit details -
Merge branch 'diaryServices-rewrite' of https://github.com/the-bay-ka…
…y/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for b3dd4b1 - Browse repository at this point
Copy the full SHA b3dd4b1View commit details -
fix type warnings in timelineHelper
Typescript wants us to be more explicit about what could be null/undefined and what couldn't be. transitionTrip2TripObj should return a Promise that could resolve as an UnprocessedTrip or undefined. (If undefined, it gets filtered later in readUnprocessedTrips) We also need to address that Luxon's DateTime.toISO has string or null as the return type – null is for if the input was invalid. It never should be, but if it was for some reason we can have an error dialog and assert type with an empty string.
Configuration menu - View commit details
-
Copy full SHA for 60ef5ed - Browse repository at this point
Copy the full SHA 60ef5edView commit details -
fix type warnings on timelineHelperMocks
mockUnprocessedTrip was unnecessary and not used anywhere mockFilterLocation didn't need all these fake properties and instead could just include the few that are needed and then declare it 'as FilteredLocation'
Configuration menu - View commit details
-
Copy full SHA for a9042d3 - Browse repository at this point
Copy the full SHA a9042d3View commit details -
enketoHelper.test.ts had a lot of the wrong types in the fake responses. They were all strings but I've since updated them so there some strings, some numbers, objects. EnketoResponseData in enketoHelper is correct. - some other type casting (with 'any') in both of these tests to ensure fake inputs satisfy parameters types
Configuration menu - View commit details
-
Copy full SHA for 8e78f79 - Browse repository at this point
Copy the full SHA 8e78f79View commit details -
fix type warnings in confirmHelper.test.ts
this test still had LabelOptions type for the userInput values instead of the UserInputEntry type. It didn't cause the tests to fail because inferFinalLabels and verifiabilityForTrip only check that the values exist - they don't care what properties they have. Anyhow, the types line up now.
Configuration menu - View commit details
-
Copy full SHA for 1a35e1f - Browse repository at this point
Copy the full SHA 1a35e1fView commit details -
fix type warnings in confirmHelper.test.ts
this test still had LabelOptions type for the userInput values instead of the UserInputEntry type. It didn't cause the tests to fail because inferFinalLabels and verifiabilityForTrip only check that the values exist - they don't care what properties they have. Anyhow, the types line up now.
Configuration menu - View commit details
-
Copy full SHA for 107eb84 - Browse repository at this point
Copy the full SHA 107eb84View commit details -
Merge branch 'migration-wrapup' of https://github.com/JGreenlee/e-mis…
…sion-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 81f4558 - Browse repository at this point
Copy the full SHA 81f4558View commit details
Commits on Dec 14, 2023
-
Merge branch 'notifScheduler-rewrite' of https://github.com/sebastian…
…barry/e-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for 0eab473 - Browse repository at this point
Copy the full SHA 0eab473View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58fba92 - Browse repository at this point
Copy the full SHA 58fba92View commit details -
use prettier 3.1.0 in workflow
In 4f173ba I bumped the prettier version to 3.1. Whatever version we are using for the project should be the same as the workflow runs with (as we established in e-mission#1117)
Configuration menu - View commit details
-
Copy full SHA for 17deb22 - Browse repository at this point
Copy the full SHA 17deb22View commit details
Commits on Dec 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ae0ae28 - Browse repository at this point
Copy the full SHA ae0ae28View commit details -
Fix merge conflict the right way
We wanted to keep the 3.1.0 not downgrade to 3.0.3
Configuration menu - View commit details
-
Copy full SHA for 80e3903 - Browse repository at this point
Copy the full SHA 80e3903View commit details
Commits on Dec 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 5cb8187 - Browse repository at this point
Copy the full SHA 5cb8187View commit details -
Configuration menu - View commit details
-
Copy full SHA for 588f685 - Browse repository at this point
Copy the full SHA 588f685View commit details
Commits on Jan 8, 2024
-
update unprocessed inputs after recording user input
-- Part of the fix for e-mission/e-mission-docs#1034 When a user input is recorded, we put it in storage. For snappy performance we also cache it in the timelineLabelMap / timelineNotesMap state. However, if we switch filters or load more trips, this state gets overridden. So, we need to call updateLocalUnprocessedInputs at some point. It is an async function but we can call it without 'await' and just allow it to execute in the background.
Configuration menu - View commit details
-
Copy full SHA for 961ac78 - Browse repository at this point
Copy the full SHA 961ac78View commit details -
allow labels to be stored as a batch
-- Part of the fix for e-mission/e-mission-docs#1034 When the yellow checkmark is used to verify a pair of inferred mode+purpose labels, both labels should be verified by a single click. The labels get stored fine; however, the way we update state after doing so prevents both labels from being updated simultaneously and only one of them gets filled in. The resulting UX is that it takes 2 clicks and this is not desired. We could: update state in succession, one after the other (await label A, then proceed label B), OR we could rework these functions to support adding labels for a particular trip as a batch (so the same function call could store mode+purpose at the same time). This was decided as a better and more performant option. It uses Promise.all to store all labels from the batch, then it updates the state with all changes from that batch. When a single label is recorded, it is a batch of 1 - when verifying inferences, it may be a batch of multiple labels.
Configuration menu - View commit details
-
Copy full SHA for 68ae2bb - Browse repository at this point
Copy the full SHA 68ae2bbView commit details
Commits on Jan 9, 2024
-
Added to WSOD fix on metrics tab
When selecting date, the following behavior occurs: - If 2+ days, behave as normal (Range of Day1 -> Day2) - If "open Ended" (i.e., only start is picked), fetch a range of days between that day and present (Day1 -> Today) - If 1 day, fetch range for 48 hours from that day TODO: The 1 day range going to 48 hours is meant as a patch, so that this WSOD fix can go to staging. To make a single day only fetch 24 hrs, some changes to the server may be needed.
Configuration menu - View commit details
-
Copy full SHA for 5166bef - Browse repository at this point
Copy the full SHA 5166befView commit details -
Merge pull request #1 from the-bay-kay/diary_wsod_fix
🗓️ Fixed WSOD on Metric Date Selector
Configuration menu - View commit details
-
Copy full SHA for 27e7a51 - Browse repository at this point
Copy the full SHA 27e7a51View commit details -
use memoization pattern for added notes' displayDt
Instead of mutating an extra property 'displayDt' onto the entries, let's use a get function that returns the displayDt. This should fix issue (4) in e-mission/e-mission-docs#1034. And let's also memoize that function so performance is not impacted
Configuration menu - View commit details
-
Copy full SHA for 1474833 - Browse repository at this point
Copy the full SHA 1474833View commit details -
display error properly if thrown in EnketoModal
If something was thrown, it could display 'undefined' if 'err' was an error message and not the error object. Using the displayError function is a more proper way to guarantee we see any error messages
Configuration menu - View commit details
-
Copy full SHA for 01f33d3 - Browse repository at this point
Copy the full SHA 01f33d3View commit details -
revise type defs for additions / EnketoUserInputEntry
- 'key' could be kept in 'data' or 'metadata' depending on if it is a processed or unprocessed entry (this is an inconsistency we may want to revisit later) - handle possible null/ undefined parameters in functions: check for truthy inputs before executing
Configuration menu - View commit details
-
Copy full SHA for f1bd447 - Browse repository at this point
Copy the full SHA f1bd447View commit details
Commits on Jan 25, 2024
-
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
…-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for cb7b191 - Browse repository at this point
Copy the full SHA cb7b191View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1927b3 - Browse repository at this point
Copy the full SHA d1927b3View commit details -
remove all remaining uses of getAngularService()
-In useAppConfig.ts, we can't rely on $ionicPlatform anymore since we won't be using Angular moving forward. So we need an alternate way to ensure Cordova plugins are ready before we try to do stuff with them. I found that Cordova fires the 'deviceready' event once plugins are loaded - so we can just listen for that, wrap it in a promise, and use it in the place of $ionicPlatform.ready(...) -There were a few uses where getAngularService() was still used to access the old Logger, which were easily substituted to instead use the functions exported from logger.ts (logDebug, logWarn, etc) -There were several unused imports left over in files where getAngularService was formerly used and is no longer
Configuration menu - View commit details
-
Copy full SHA for 0d417f2 - Browse repository at this point
Copy the full SHA 0d417f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e558163 - Browse repository at this point
Copy the full SHA e558163View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0153f0f - Browse repository at this point
Copy the full SHA 0153f0fView commit details -
The startup logic will now happen not in an Angular context, but with an event listener for 'deviceready' (which is what Cordova uses) And the React initialization will happen from there.
Configuration menu - View commit details
-
Copy full SHA for ce81699 - Browse repository at this point
Copy the full SHA ce81699View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c18cc1 - Browse repository at this point
Copy the full SHA 2c18cc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for e920752 - Browse repository at this point
Copy the full SHA e920752View commit details -
consolidate ngApp.js into index.js
Since these have both been simplified we can merge them together
Configuration menu - View commit details
-
Copy full SHA for 385a384 - Browse repository at this point
Copy the full SHA 385a384View commit details -
fix failing test in notifScheduler
It was failing because 'commHelper' is no longer directly in '/js' -- it is in 'js/services'
Configuration menu - View commit details
-
Copy full SHA for 6d5566e - Browse repository at this point
Copy the full SHA 6d5566eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40f7aad - Browse repository at this point
Copy the full SHA 40f7aadView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d9a8ef - Browse repository at this point
Copy the full SHA 4d9a8efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 98b08bf - Browse repository at this point
Copy the full SHA 98b08bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78661da - Browse repository at this point
Copy the full SHA 78661daView commit details -
comply to Typescript "strictNullChecks": true
This commit enables strictNullChecks for greater type safety and then fixes the dozens of instances where TS now warns us about values that are potentially null https://www.typescriptlang.org/tsconfig#strictNullChecks This means adding types on a lot of places where we had not added types before. Typescript is more powerful when it's on a stricter configuration, but this means we have to be more explicit. In a few of the files, I also cleaned up formatting and modernized syntax while I was making changes there.
Configuration menu - View commit details
-
Copy full SHA for c901e91 - Browse repository at this point
Copy the full SHA c901e91View commit details -
more type safety to comply with strictNullChecks
continuation of 49a1a64
Configuration menu - View commit details
-
Copy full SHA for 8178c1f - Browse repository at this point
Copy the full SHA 8178c1fView commit details -
clean/reformat pushNotifySettings
This file had a lot of outdated JS syntax and console.log statements. I just did a full sweep of this file and 'modernized' it. Added some type definitions too.
Configuration menu - View commit details
-
Copy full SHA for dd00645 - Browse repository at this point
Copy the full SHA dd00645View commit details -
use aria-hidden instead of accessibilityHidden
I previously used the wrong property name here. Now that we have Typescript on a stricter configuration, I found my mistake
Configuration menu - View commit details
-
Copy full SHA for a5edfb7 - Browse repository at this point
Copy the full SHA a5edfb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f9c665 - Browse repository at this point
Copy the full SHA 5f9c665View commit details -
We previously had maintainers for the translations in these languages, but they have not been updated in a very long time. Because the app has changed so much since then, the old translations are almost entirely obsolete. At this point, I think it is better to remove them from usage. If we ever get someone to update the translations we can add them back. We'll still keep the old translations up on the e-mission-translate repo although they won't be used here.
Configuration menu - View commit details
-
Copy full SHA for 60f12b3 - Browse repository at this point
Copy the full SHA 60f12b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7286a04 - Browse repository at this point
Copy the full SHA 7286a04View commit details -
VSCode was only picking up on our declaration TS files if they were open in the editor. This signals to VSCode and TS to check js/types for .d.ts files.
Configuration menu - View commit details
-
Copy full SHA for aa74a4f - Browse repository at this point
Copy the full SHA aa74a4fView commit details -
cleanup and fix types in ProfileSettings
This file was a JSX file until very recently and so a lot of type errors and warnings went unnoticed. There were a lot, so I just went over the whole file - fixing typings, modernizing syntax, and removing things that are unused. As part of this I expanded the typings for AppConfig.
Configuration menu - View commit details
-
Copy full SHA for e77b92a - Browse repository at this point
Copy the full SHA e77b92aView commit details -
more cleanup related to typings
Continuing to clean up type warnings that are now showing up since 49a1a64
Configuration menu - View commit details
-
Copy full SHA for 6a17228 - Browse repository at this point
Copy the full SHA 6a17228View commit details -
fix DiaryCard showing current time if blank
dt might be undefined here (like in the case of the most recent / current place in the timeline) In that case we should return nothing instead of letting Luxon create a new date (it would fallback to the current date&time which we don't want)
Configuration menu - View commit details
-
Copy full SHA for 9dc0d48 - Browse repository at this point
Copy the full SHA 9dc0d48View commit details -
this is used in a few places - it's tidier to have a common type definition
Configuration menu - View commit details
-
Copy full SHA for da0a311 - Browse repository at this point
Copy the full SHA da0a311View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e906c0 - Browse repository at this point
Copy the full SHA 1e906c0View commit details -
new LabelTab functions for user inputs
i) instead of providing timelineLabelMap and timelineNotesMap to the entire component tree under LabelTab, we can pass accessor functions (userInputFor, labelFor, notesFor) to get user inputs in a cleaner way ii) Unify the structure of how multilabel vs enketo user inputs are kept on the phone. Now both will be the 'raw' format (an object with 'data', 'metadata' etc). Note that there is still a discrepancy on the server - for multilabel inputs we get a plain string and for enketo inputs we get the whole userinput entry. The plan is to unify this on the server at some point, so I am doing it here on the phone in advance. iii) instead of using a 'justRepopulated' flag to signify that an entry should not be filtered within 30 seconds of having a user input recorded on it, we can just look at the write_ts in the metadata of that entry's inputs and see if it was within 30 seconds ago. If so, it's immune to filtering. After a label is recorded and added to the timelineLabelMap, we'll trigger a refilter after 30 seconds by calling setLastFilteredTs. This approach negates the need for an extra property on the timelineEntry object - which is good because we want it to match the server type.
Configuration menu - View commit details
-
Copy full SHA for 63c14d6 - Browse repository at this point
Copy the full SHA 63c14d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ac6e00 - Browse repository at this point
Copy the full SHA 9ac6e00View commit details -
fix UserInputButton not filling in after response
This useEffect was watching timelineEntry for updates, but we changed the mechanism so timelineMap is no longer updated -- only the timelineLabelMap gets updated when a new response is recorded. By watching the result of userInputFor(...), this component will recieve the update.
Configuration menu - View commit details
-
Copy full SHA for d339de7 - Browse repository at this point
Copy the full SHA d339de7View commit details -
add duration to ConfirmedPlace type def
This has always been a property on the server for trips as well as places. For some reason I must have missed it on the first pass of making the ConfirmedPlace type definition.
Configuration menu - View commit details
-
Copy full SHA for 6deab9f - Browse repository at this point
Copy the full SHA 6deab9fView commit details -
refactor enketo user input types
It keeps the codebase more logical (and more modular) to keep Enketo survey-related type definitions encapsulated away in enketoHelper.
Configuration menu - View commit details
-
Copy full SHA for e37fa01 - Browse repository at this point
Copy the full SHA e37fa01View commit details -
When we have Typescript compiler in 'watch' mode (useful for linting/ finding type errors in VSCode), it outputs to the root level directory 'dist'. Adding this directory to gitignore so we don't end up needlessly committing these output files.
Configuration menu - View commit details
-
Copy full SHA for 098ba21 - Browse repository at this point
Copy the full SHA 098ba21View commit details -
fix reload on every tab switch
Each tab gets wrapped by an error boundary. We were doing this in the body of the App component which means every time the App component was updated/rerendered, the tabs were recomputed too. Doing the error boundary wrapping outside of the App component ensures that it only happens once and we use the same tab components each time
Configuration menu - View commit details
-
Copy full SHA for 36bbf08 - Browse repository at this point
Copy the full SHA 36bbf08View commit details -
-Fix size of Leaflet markers -- this changed when we removed all the extra CSS bloat and easy one line restores the previous size -Unify app bar styles -- removed elevation: 3 to soften the shadow (default is 1 and matches the rest of the app better - we were only using elevation 3 to match the style of the Ionic header) -- use 'colors.surface' instead of hardcoded 'white' - unify 'notesButton' style of diary cards - add paddingHorizontal to ModesIndicator -- this way, if there are a lot of modes, they have room to breathe
Configuration menu - View commit details
-
Copy full SHA for 412b3b8 - Browse repository at this point
Copy the full SHA 412b3b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9b2683 - Browse repository at this point
Copy the full SHA c9b2683View commit details -
As in fa1dfbf, TypeScript puts output files here. We don't need git NOR Jest to pick up on these 'dist' files.
Configuration menu - View commit details
-
Copy full SHA for e1d03a6 - Browse repository at this point
Copy the full SHA e1d03a6View commit details -
With invalid inputs, this function should return early rather than continuing and resulting in a zero-length duration. Fixes the diaryHelper test that was failing.
Configuration menu - View commit details
-
Copy full SHA for 07befbc - Browse repository at this point
Copy the full SHA 07befbcView commit details -
rework resolveTimestamps validation to fix test
We need a safe way to mark that validation fails in this function, without actually throwing an error. Let's use a third parameter for this purpose which is a callback function 'onFail' to handle the invalid case. - Updated tests accordingly - now passing
Configuration menu - View commit details
-
Copy full SHA for fec6a4b - Browse repository at this point
Copy the full SHA fec6a4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c65612 - Browse repository at this point
Copy the full SHA 3c65612View commit details -
fix type warnings in timelineHelper
Typescript wants us to be more explicit about what could be null/undefined and what couldn't be. transitionTrip2TripObj should return a Promise that could resolve as an UnprocessedTrip or undefined. (If undefined, it gets filtered later in readUnprocessedTrips) We also need to address that Luxon's DateTime.toISO has string or null as the return type – null is for if the input was invalid. It never should be, but if it was for some reason we can have an error dialog and assert type with an empty string.
Configuration menu - View commit details
-
Copy full SHA for 59a080f - Browse repository at this point
Copy the full SHA 59a080fView commit details -
fix type warnings on timelineHelperMocks
mockUnprocessedTrip was unnecessary and not used anywhere mockFilterLocation didn't need all these fake properties and instead could just include the few that are needed and then declare it 'as FilteredLocation'
Configuration menu - View commit details
-
Copy full SHA for 3563698 - Browse repository at this point
Copy the full SHA 3563698View commit details -
enketoHelper.test.ts had a lot of the wrong types in the fake responses. They were all strings but I've since updated them so there some strings, some numbers, objects. EnketoResponseData in enketoHelper is correct. - some other type casting (with 'any') in both of these tests to ensure fake inputs satisfy parameters types
Configuration menu - View commit details
-
Copy full SHA for 699d90f - Browse repository at this point
Copy the full SHA 699d90fView commit details -
fix type warnings in confirmHelper.test.ts
this test still had LabelOptions type for the userInput values instead of the UserInputEntry type. It didn't cause the tests to fail because inferFinalLabels and verifiabilityForTrip only check that the values exist - they don't care what properties they have. Anyhow, the types line up now.
Configuration menu - View commit details
-
Copy full SHA for ff840ff - Browse repository at this point
Copy the full SHA ff840ffView commit details -
use prettier 3.1.0 in workflow
In 4f173ba I bumped the prettier version to 3.1. Whatever version we are using for the project should be the same as the workflow runs with (as we established in e-mission#1117)
Configuration menu - View commit details
-
Copy full SHA for 88c72f8 - Browse repository at this point
Copy the full SHA 88c72f8View commit details -
update unprocessed inputs after recording user input
-- Part of the fix for e-mission/e-mission-docs#1034 When a user input is recorded, we put it in storage. For snappy performance we also cache it in the timelineLabelMap / timelineNotesMap state. However, if we switch filters or load more trips, this state gets overridden. So, we need to call updateLocalUnprocessedInputs at some point. It is an async function but we can call it without 'await' and just allow it to execute in the background.
Configuration menu - View commit details
-
Copy full SHA for a6e7a79 - Browse repository at this point
Copy the full SHA a6e7a79View commit details -
allow labels to be stored as a batch
-- Part of the fix for e-mission/e-mission-docs#1034 When the yellow checkmark is used to verify a pair of inferred mode+purpose labels, both labels should be verified by a single click. The labels get stored fine; however, the way we update state after doing so prevents both labels from being updated simultaneously and only one of them gets filled in. The resulting UX is that it takes 2 clicks and this is not desired. We could: update state in succession, one after the other (await label A, then proceed label B), OR we could rework these functions to support adding labels for a particular trip as a batch (so the same function call could store mode+purpose at the same time). This was decided as a better and more performant option. It uses Promise.all to store all labels from the batch, then it updates the state with all changes from that batch. When a single label is recorded, it is a batch of 1 - when verifying inferences, it may be a batch of multiple labels.
Configuration menu - View commit details
-
Copy full SHA for 8161d58 - Browse repository at this point
Copy the full SHA 8161d58View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6a9155 - Browse repository at this point
Copy the full SHA b6a9155View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce760b6 - Browse repository at this point
Copy the full SHA ce760b6View commit details -
Added to WSOD fix on metrics tab
When selecting date, the following behavior occurs: - If 2+ days, behave as normal (Range of Day1 -> Day2) - If "open Ended" (i.e., only start is picked), fetch a range of days between that day and present (Day1 -> Today) - If 1 day, fetch range for 48 hours from that day TODO: The 1 day range going to 48 hours is meant as a patch, so that this WSOD fix can go to staging. To make a single day only fetch 24 hrs, some changes to the server may be needed.
Configuration menu - View commit details
-
Copy full SHA for 7483fe5 - Browse repository at this point
Copy the full SHA 7483fe5View commit details -
use memoization pattern for added notes' displayDt
Instead of mutating an extra property 'displayDt' onto the entries, let's use a get function that returns the displayDt. This should fix issue (4) in e-mission/e-mission-docs#1034. And let's also memoize that function so performance is not impacted
Configuration menu - View commit details
-
Copy full SHA for b3785fd - Browse repository at this point
Copy the full SHA b3785fdView commit details -
display error properly if thrown in EnketoModal
If something was thrown, it could display 'undefined' if 'err' was an error message and not the error object. Using the displayError function is a more proper way to guarantee we see any error messages
Configuration menu - View commit details
-
Copy full SHA for 3e44ebc - Browse repository at this point
Copy the full SHA 3e44ebcView commit details -
revise type defs for additions / EnketoUserInputEntry
- 'key' could be kept in 'data' or 'metadata' depending on if it is a processed or unprocessed entry (this is an inconsistency we may want to revisit later) - handle possible null/ undefined parameters in functions: check for truthy inputs before executing
Configuration menu - View commit details
-
Copy full SHA for 316d4e9 - Browse repository at this point
Copy the full SHA 316d4e9View commit details -
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
…-mission-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for d5fe4b4 - Browse repository at this point
Copy the full SHA d5fe4b4View commit details -
Merge branch 'migration-wrapup' of https://github.com/JGreenlee/e-mis…
…sion-phone into migration-wrapup
Configuration menu - View commit details
-
Copy full SHA for b0d6e7b - Browse repository at this point
Copy the full SHA b0d6e7bView commit details -
This test failed due to a bad merge conflict resolution. This commit reverts notifScheduler.test.ts to the state of 3cbb5f0 after sebastianbarry's fix. The test now passes.
Configuration menu - View commit details
-
Copy full SHA for 6631890 - Browse repository at this point
Copy the full SHA 6631890View commit details -
fix type defs for notifScheduler
- ReminderSchemeConfig should be ReminderSchemesConfig - a problem that resulted from resolving merge conflicts - Defining types in notifScheduler.ts so that the functions have return types and Typescript type warnings go away
Configuration menu - View commit details
-
Copy full SHA for a086892 - Browse repository at this point
Copy the full SHA a086892View commit details -
fix type defs for timelineHelper
-- With 'strictNullChecks' enabled in Typescript, we get type errors when declaring objects of a type with some of its properties missing. But for the purpose of testing (ie fake data, potentially invalid inputs) we want to do just that. We can get around this by hard casting with `as unknown as <T>`. In tests, for blank/invalid inputs being used (such as a blank CompositeTrip object) we can use `{} as any`
Configuration menu - View commit details
-
Copy full SHA for 0aec763 - Browse repository at this point
Copy the full SHA 0aec763View commit details -
This fixes a bunch of type warnings that show up with strictNullChecks being true. Fixes include adding types, disambiguating null and undefined types and handling them more carefully, and disambiguating trip vs place with type guards
Configuration menu - View commit details
-
Copy full SHA for 79d18a1 - Browse repository at this point
Copy the full SHA 79d18a1View commit details
Commits on Jan 26, 2024
-
replace remaining uses of
moment
& remove it from dependenciesWith this change, any remaining uses of the `moment` library from datetime operations have been fully replaced by Luxon. All references to moment are removed.
Configuration menu - View commit details
-
Copy full SHA for 004b9ea - Browse repository at this point
Copy the full SHA 004b9eaView commit details -
remove jQuery from dependencies + webpack
When using AngularJS, jQuery needed to be provided as a global by Webpack. Now, we do not need it at all (except Enketo which still uses jQuery internally, but provides it to itself and is not needed globally.)
Configuration menu - View commit details
-
Copy full SHA for 48633c3 - Browse repository at this point
Copy the full SHA 48633c3View commit details