-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Features/readtimestamps: Read timestamps from FireStore; Pause Uploading to FireStore and Hide/Unhide Timestamps #39
Conversation
…tore In DeleteDataView, change deleting timestamps to hiding. In PrismaStandard+HealthKit, modify addDeleteFlag to switchDeleteFlag so hiding and unhiding timestamp from UI can switch deleteFlag field to true and false and vice versa in Firestore.
In DeleteDataView, remove "edit" button so hidden icon always shows (no need for edit button anymore)
In DeleteDataView, added data type description section and "hide by custom range" date pickers for start and end date. Fixed UI spacing/padding issues by reformatting form and section views.
… + delete ToggleTestView Minor Changes: Rename all functions and variables from delete to hide. Also deleted toggleTestView which is no longer needed.
Previously, the ManageDataView had a list created from a hardcoded dictionary (which would have shown more/fewer sample types than what was defined in the PrismaDelegate). Modified all other views dependent on PrivacyModule. Restructured the communication between PrivacyModule and ManageDataView. Originally, ManageDataView was passed a list of structs with all the icon, identifier, UI string, and toggle status elements. This is repetitive with the dictionary that is already in PrivacyModule so I just passed the vector of sorted identifier strings instead (and ManageDataView and DeleteDataView accessed necessary information accordingly)
In PrismaStandard+Healthkit, add new function fetchTop10RecentTimeStamps to read in timestamps to display top 10 most recent timestamps in DeleteDataView. For now, sorting by "effectiveDateTime" field but need to generalize to all data types by sorting by timestamp document name.
…24-Prisma into features/readtimestamps
Small bug when merging with Caroline's changes
Fixed bug for fetchTop10RecentTimeStamps by sorting document IDs in ascending order for now. Currently, can't sort in descending order so may have to eventually sort by fields instead of document IDs.
…anch there are some errors that were fixed and pushed with code in main, have to update branch by merging main into branch Expected to fail all checks for now
Created a publisher that monitors the dictionary in PrivacyModule. Since the DeleteDataView and ManageDataView are dependent on the dictionary content, if there are any changes to the dictionary, the publisher will signal the ManageDataView to refresh.
previously, updateAndSignalOnChange() only sent a signal to all subscriber views. It made more sense for DeleteDataView to send the new toggle value to updateAndSignalOnChange() which updates the dictionary and sends the signal. Added descriptions for each category. Missing descriptions for: distancewalkingrunning, workout
With Matt's updates to the timeIndex dictionary fields, we updated our fetching top ten timestamps to sort by descending order by the "time.datetime.start" field
…nt timestamps There is a bug that I was not able to fix after debugging with Matt and Bryant. We decided to resort to using the "issued" timestamp instead for fetching the 10 most recent timestamps.
In PrismaStandard+Healthkit, created function fetchCustomRangeTimeStamps to get all timestamps within specified time range from date pickers. Also modified switchHideFlag to take in the alwaysHide bool (set to true if hiding by custom range, otherwise false). In DeleteDataView, modified hideByCustomRangeSection accordingly.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 34.66% 36.20% +1.55%
==========================================
Files 44 43 -1
Lines 1694 1942 +248
==========================================
+ Hits 587 703 +116
- Misses 1107 1239 +132
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work !! The views look really good. Just set the useFirebaseEmulator flag back to true and its good to go.
Read timestamps from FireStore; Pause Uploading to FireStore and Hide/Unhide Timestamps
♻️ Current situation & Problem
Relevant issues: UI trigger for changing a flag field to true for data that the user wants redacted
Currently, the DeleteDataView that allows users to review and “hide” their data uses a hard-coded array of timestamps, so it does not access nor read in timestamps for the specified data type from Firestore. Second, users cannot “unhide” their data after choosing to hide it. Third, DeleteDataView currently does not support hiding data via a custom date range.
To address the first issue, we created a function to fetch the10 most recent timestamps from Firestore. In DeleteDataView, we display this list under the “Hide by Timestamp” section.
Second, we changed all functionality from “deleting” data to “hiding” data to better represent what is actually happening to user data on the backend. We modified addDeleteFlag to switchHideFlag so that users can “unhide” their data and have this status change reflected in Firestore’s hideFlag field. We also modified the UI so that an open/crossed-out eye is shown signaling which timestamps are hidden/unhidden.
Third, we created the “Hide by Custom Range” section in DeleteDataView so users can select a date range to delete data via the date pickers. We created the function fetchCustomRangeTimeStamps() to get a list of all timestamps in the specified date range. Since we want all data in this range to be hidden regardless of the previous hideFlag values, we modified switcHed Flag to take in a third parameter (read below).
Lastly, we made modifications to communicate the enable/disable status of sample category uploads between the DeleteDataView, ManageDataView, and PrivacyModule. Saving the toggle value allowed users to pause or unpause uploads of that data type to firestor (see PrismaStandard+HealthKit).
⚙️ Release Notes
PrismaStandard+Healthkit:
PrivacyModule:
ManageDataView:
DeleteDataView:
Next Steps:
Write unit tests for implemented features.
📚 Documentation
N/A
✅ Testing
Roles
Evelyn:
Caroline:
SortedSampleIdentifiers list alphabetized the sample types to display for the user. This list kept all UI information within the dictionary in PrivacyModule and passed on as few parameters as possible. The refactoring of this was necessary to ensure that the app’s HKSampleTypes were the only ones shown to the user (allowed the app to be flexible and modular to future app-wide modifications). The new structure also allowed for the publisher addition mentioned in the next point.
Dhruv:
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: