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

UI/messages #62

Merged
merged 24 commits into from
Aug 9, 2024
Merged

UI/messages #62

merged 24 commits into from
Aug 9, 2024

Conversation

nriedman
Copy link
Contributor

@nriedman nriedman commented Aug 8, 2024

Update Messages UI and Data Structure

♻️ Current situation & Problem

The messages we currently have in the app were implemented before the server structure for messages was finalized, so they are out of date at the moment. For example, they are called notifications instead of messages, and there are no actions associated with them at the moment.

⚙️ Release Notes

  • Replaced Notification nomenclature with Message
  • Restructured MessageManager to dismiss messages by calling a cloud function instead of writing directly to Firestore
  • Updated the Message data structure to comply with Backend Data Structure, including MessageAction field to Message so that each message potentially has an associated action.
  • Implemented custom Codable compliance for Message to support localized decoding.
  • Brought MedicationDetail model up to speed with the backend implementation (e.g. DosageInformation is no longer optional, and we now signal that the patient hasn't started a medication yet by saying "not started" instead of hiding the medication details and relying on the description).
  • Fixed alignment of current label in gauge to be static and leading.

The Home Screen dashboard now looks like this:

📚 Documentation

See inline documentation.

✅ Testing

UI tests are completed using mock messages injected directly into the MessageManager (i.e. no firebase interactions). A full cycle Unit/UI test that makes sure the decoding functionality works as intended will be completed as soon as #24 is complete.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@nriedman nriedman requested a review from PSchmiedmayer August 8, 2024 23:17
Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Great job with the PR; looks great!

ENGAGEHF/NavigationHelpers.swift Outdated Show resolved Hide resolved
ENGAGEHF/NavigationManager/NavigationManager.swift Outdated Show resolved Hide resolved
ENGAGEHF/SharedExtensions/View+asButton.swift Outdated Show resolved Hide resolved
@PSchmiedmayer PSchmiedmayer added the enhancement New feature or request label Aug 9, 2024
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 74.04580% with 170 lines in your changes missing coverage. Please review.

Project coverage is 77.55%. Comparing base (93dae2b) to head (f160f57).

Files Patch % Lines
ENGAGEHF/MessageManager/MessageManager.swift 66.90% 48 Missing ⚠️
...KeyedDecodingContainer+DecodeLocalizedString.swift 0.00% 23 Missing ⚠️
ENGAGEHF/MessageManager/Message.swift 29.04% 22 Missing ⚠️
...HF/HeartHealth/SelectionTypes/GraphSelection.swift 64.41% 21 Missing ⚠️
...iews/RowContent/DosageGauge/DosageGaugeStyle.swift 40.75% 16 Missing ⚠️
ENGAGEHF/MessageManager/MessageAction.swift 73.08% 14 Missing ⚠️
...GEHF/HeartHealth/SelectionTypes/SymptomsType.swift 77.28% 10 Missing ⚠️
ENGAGEHF/ReusableElements/ShowMoreButton.swift 0.00% 5 Missing ⚠️
ENGAGEHF/NavigationManager/NavigationManager.swift 94.00% 3 Missing ⚠️
ENGAGEHF/Dashboard/Messages/MessageRow.swift 97.47% 2 Missing ⚠️
... and 3 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
- Coverage   79.69%   77.55%   -2.14%     
==========================================
  Files         115      120       +5     
  Lines        3845     4123     +278     
==========================================
+ Hits         3064     3197     +133     
- Misses        781      926     +145     
Files Coverage Δ
ENGAGEHF/Dashboard/Dashboard.swift 94.74% <100.00%> (ø)
ENGAGEHF/Dashboard/Messages/MessagesSection.swift 100.00% <100.00%> (ø)
ENGAGEHF/ENGAGEHF.swift 100.00% <ø> (ø)
ENGAGEHF/ENGAGEHFDelegate.swift 95.84% <100.00%> (ø)
ENGAGEHF/Education/VideoManager.swift 72.04% <100.00%> (+0.73%) ⬆️
ENGAGEHF/Education/Views/Education.swift 100.00% <100.00%> (ø)
ENGAGEHF/Education/Views/VideoListSection.swift 97.57% <100.00%> (-0.05%) ⬇️
...AGEHF/Education/Views/VideoPlayers/VideoView.swift 100.00% <ø> (ø)
...GAGEHF/HeartHealth/SelectionTypes/VitalsType.swift 100.00% <100.00%> (ø)
ENGAGEHF/Home.swift 94.65% <100.00%> (ø)
... and 24 more

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93dae2b...f160f57. Read the comment docs.

@nriedman nriedman linked an issue Aug 9, 2024 that may be closed by this pull request
1 task
@PSchmiedmayer PSchmiedmayer merged commit 28242fc into main Aug 9, 2024
6 of 7 checks passed
@PSchmiedmayer PSchmiedmayer deleted the UI/messages branch August 9, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
2 participants