Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wide buttons #1104

Closed

Conversation

niccolopaganini
Copy link
Contributor

No description provided.

JGreenlee and others added 30 commits October 11, 2023 16:49
A user-facing popup here is likely to just annoy or confuse users.
Let's set these log statements at the "WARN" level so it is more visible than other log statements if we do need to debug it, but not intrusive or detrimental to UX
It is fairly self-explanatory that {key: value} was the chosen approach
Per https://github.com/e-mission/e-mission-phone/pull/1040/files#r1351477569, we'll show an error message here if the BEMUserCache 'db' is not defined.
We'll also ensure that if the Logger plugin is undefined, we do not try to call it as this would cause an error.
A couple of the functions that were excluded from the rewrite were requested to be added back: e-mission#1040 (comment)

The logic is the same, but with modernized syntax, and using Luxon instead of Moment to deal with timestamps
diary.js
- Added emission.survey.enketo.trip.button to diary.js dependency array so that it can be used in enketo/infinite_scroll_filters.ts

enketo/infinite_scroll_filters.ts
- Added a try/catch statement to catch loading errors and make the code more readable
Appending "user-friendy" descriptions to error popups is already handled in logger.ts (see `displayErrorMsg`), so it is unnecessary in this file.
- Add the 2 functions to the list that were re-implemented after the initial rewrite
- More accurately describe how we would ideally test server comm
The 'Chats' and 'ReferHelper' services, alongside their derivative
services, have not been used for quite some time.  These were
removed in preparation for the UnifiedDataLoader-rewrite.
confirmHelper.ts
- Removed archaic behavior or using old Angular i18nUtils module to get the filename of the translations' trip_confirm_options.json file
- The "else" default "no label_options found in config" behavior is almost identical to the if(appConfig.label_options), but it just uses the default label options URL at label-options.json.sample
- Pulled the language-specific text handling behavior out of the if statement, because either way (label_options or no label_options) the JSON data model will look the same
- The for loop for filling in the translatied text for label-options checks 1. The label-options file first, then 2. The i18next file for the translation

label-options.json.sample
- Created new file
- Replaces trip_confirm_options.json.sample (this location in confirmHelper.ts was the only place in the codebase using this file)
- Modeled after https://github.com/e-mission/nrel-openpath-deploy-configs/blob/main/label_options/example-program-label-options.json
- Only has translations for EN and ES

trip_confirm_options.json.sample
- Removed this file
en.json
- Added multilabel filed filled with a few multilabel translations in EN
- Moved UnifiedDataLoader to a separate typescript file.
- The method is no longer an angular service, and instead exports two
'getUnified' methods.
- Updated other files that rely on this service.
- Tested getUnifiedMessagesForoInterval, as used in enketoHelper.
…t2023

✏️ Rewrite KVStore, ClientStats, and CommHelper
- Generalized getUnified functions into one method that takes a
higher order function as input, and uses that to fetch required
data.
- Updated calls to the getUnified functions
- Added an interface for the combineWithDedup method, because it
requires objects with the 'metadata.writets' property to run
- Updated other unifiedDataLoader functions so the parameters were
appropriately typed
- Updated combinePromise to now take a list of one or more
promises as input, and recursively combine them to a single promise.
- Added parameter explanations to each function
- Cleaned up debuging console.log statements
…vicerewrite

Sync: merge `onboarding_routing_sept_2023` into `service_rewrite_2023`
Abby Wheelis and others added 29 commits November 6, 2023 12:07
we still have the information through debug statements
e-mission#1093 (comment)

kept to remain consistent within file
when I moved from the formatted alert to a plain alert, the text that ends up in the alert changed, but I did not update my test

also added a space between the title and the text
- combinedPromises now uses `Promise.allSettled()`
- rewrote tests to reflect change
-added several try/catches to cover all top-level calls
-added logDebug statements throughout, using `` for multi-line so they are not ugly
-replaced any uses of the old Logger service
When metrics are fetched and stored as state, we can have more log statements and a try/catch.
🪵 Add more logs and error boundaries in Label and Dashboard
🎟️ 🔔 📱 Custom Events + pushNotify + storeDeviceSettings + remoteNotify rewrites
Something got jumbled when pulling in upstream changes + resolving conflicts
This was also likely due to bad merging from upstream changes
…rvices

🏗️ Major Refactor to Remove Label Button Services
- Fixed imports
…rewrite

🏗️🗃️ UnifiedDataLoader rewrite
Pull usercache bump up to service_rewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants