forked from e-mission/e-mission-phone
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Profile migration fixes #5
Merged
Abby-Wheelis
merged 18 commits into
More-Profile-Migrations
from
profile-migration-fixes
Jul 17, 2023
Merged
Profile migration fixes #5
Abby-Wheelis
merged 18 commits into
More-Profile-Migrations
from
profile-migration-fixes
Jul 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since the entire SettingRow now handles the onPress for the action, we no longer need onValueChange in the switch. This would cause the action to be called twice.
In general-settings, the `$scope.settings` object is used to store all of the current values of options that are represeted by the Profile Tab. As we migrate to ProfileSettings, this should be stored as state in React. This change handles only `collect` settings; everything that was previously stored under `$scope.settings.collect`. We accomplish this with useState and a new function `refreshCollectSettings`, which is called 1) on config load and 2) whenever any setting relating to collection is changed `settingsScope` needed to be retrieved in a different way. Previously it was passed from AngularJS a prop; this caused the ProfileSettings component to be re-initialized every time any scope value changed. This made it impossible to persist state in ProfileSettings. Now we will retrieve the scope with a DOM lookup; we find the root element of the scope, then ask Angular for the scope attached to that element.
These settings are now stored in collectSettings of ProfileSettings. All references to $scope.settings.collect have been removed / commented out.
this was named wrong by accident
These properties are no longer used by ProfileSettings. The general-settings scope is now retrieved globally via a DOM lookup.
in order to have functional user data dropdown, moved userData methods back to general-settings and getting them from the scope
no longer using Platform because Modal is better and no longer importing an object as a parameter
the way the link to the qr code document was being accessed was broken - this seems to fix it, but testing in the devapp is difficult
deleted commented out code that was confirmed to be working in ProfileSettings!
the actionsheet coming from ControlCollectionHelper was buggy - this rough migration allows React to handle the popup, while using CCH's forceTransition to complete the action
like controlSettings, move the logic handling for settings.notification out of general-settings and into ProfileSettings - refreshed when the config is loaded and when the pref reminder time is updated
the ReminderTime element is a custom settingRow with a datepicker that appears when the setting is clicked
deleting redundant code from general-settings, improving formatting, updating comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes fix some of the issue that I was stuck on in More-Profile-Migrations, as well as implement a react-native-paper picker for the preferred reminder time