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

Finish Migration Prep #990

Merged

Conversation

JGreenlee
Copy link
Collaborator

This should be the last round of fixes before we begin the bulk of the migration and actually rewrite the UI into React components.

JGreenlee added 2 commits June 6, 2023 14:26
Eventually, we should replace nvd3 with a graph/plotting library that is maintained. For now though, this fix just makes the graphs appear as they did before on the details page.
React 18 wants us to have one static 'root' for every element that we are going to render into.
Unfortunately with Ionic's collection-repeat, DOM elements are reused and we can't guarantee that the same DOM element should be used for the same content. We'll have to reassign the root every time there's a change in the Angular element. Otherwise we get duplicates.
This will, unfortunately, clutter our console with warnings from React -- but it is only temporary until inf scroll list is converted to React.
Copy link
Contributor

@shankari shankari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @JGreenlee Is this now ready to merge to master_for_platform and push out, at least for testing?

www/js/angular-react-helper.jsx Show resolved Hide resolved
@JGreenlee
Copy link
Collaborator Author

LGTM. @JGreenlee Is this now ready to merge to master_for_platform and push out, at least for testing?

@shankari Nothing seems majorly broken anymore, so I think yes; let's do it!

I'd like to get this on staging and get some real-world testing out of it so that we can better track issues as they appear.

We've had this annoying issue, which notably affects the Simulator and probably other devices too. If we are typing in an OPCode, there should be no auto-capitalization nor auto-correct.
Since we are now using the official Enketo package from npm (@ version 6.1.7), we no longer need this local copy in manual_lib.
This will allow the use of the `useTranslation()` hook in our React components. This is how we will accomplish internationalization in the new React components we are writing.
https://react.i18next.com/latest/usetranslation-hook
@shankari shankari merged commit bd2f6a5 into e-mission:framework_migration_prep Jun 15, 2023
shankari added a commit that referenced this pull request Jun 25, 2023
In #974
#980
and
#990

@JGreenlee removed bower and added several dependencies to npm
this commit copies those dependencies to the cordovabuild as well

Testing done:
- Ran npm install

Added the following manual fix

```
diff --git a/www/index.js b/www/index.js
index c2b2bb97..c7b6ae49 100644
--- a/www/index.js
+++ b/www/index.js
@@ -53,8 +53,10 @@ import './js/metrics.js';
 import './js/control/general-settings.js';
 import './js/control/emailService.js';
 import './js/control/uploadService.js';
-import './js/control/collect-settings.js';
-import './js/control/sync-settings.js';
+import '../platforms/android/platform_www/js/control/collect-settings.js';
+import '../platforms/ios/platform_www/js/control/collect-settings.js';
+import '../platforms/android/platform_www/js/control/sync-settings.js';
+import '../platforms/ios/platform_www/js/control/sync-settings.js';
 import './js/metrics-factory.js';
 import './js/metrics-mappings.js';
 import './js/plugin/logger.js';
```

- `npx webpack`
- `npx cordova build`

Launches on both iOS and android with some minor issues
e-mission/e-mission-docs#923
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.

2 participants