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

HealthSummaryAction and MedicationsAction #86

Merged
merged 33 commits into from
Aug 25, 2024

Conversation

Basler182
Copy link
Contributor

message actions

♻️ Current situation & Problem

Currently not all expected messages are being handled

⚙️ Release Notes

  • Handling of HealthSummaryAction
  • Handling of MedicationsAction

QuestionnaireAction is provided via the following branch (https://github.com/StanfordSpezi/SpeziKt/tree/feature/questionnaire) afterwards.

✅ Testing

the required tests are added after the first review

📝 Code of Conduct & Contributing Guidelines

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

Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
@Basler182 Basler182 added enhancement New feature or request ENGAGE HF ENGAGE-HF-specific issues labels Aug 15, 2024
@Basler182 Basler182 self-assigned this Aug 15, 2024
@Basler182 Basler182 linked an issue Aug 15, 2024 that may be closed by this pull request
1 task
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 36.00000% with 224 lines in your changes missing coverage. Please review.

Project coverage is 36.88%. Comparing base (244fbbe) to head (547525b).
Report is 1 commits behind head on main.

Files Patch % Lines
...dh/engagehf/navigation/components/AccountDialog.kt 0.00% 114 Missing ⚠️
...ford/bdh/engagehf/messages/HealthSummaryService.kt 3.23% 30 Missing ⚠️
...nford/bdh/engagehf/navigation/screens/AppScreen.kt 0.00% 22 Missing ⚠️
...hf/navigation/components/AccountTopAppBarButton.kt 0.00% 15 Missing ⚠️
.../engagehf/navigation/screens/AppScreenViewModel.kt 83.02% 4 Missing and 5 partials ⚠️
...d/bdh/engagehf/messages/HealthSummaryRepository.kt 55.56% 7 Missing and 1 partial ⚠️
...nford/bdh/engagehf/bluetooth/BluetoothViewModel.kt 85.11% 4 Missing and 3 partials ⚠️
.../edu/stanford/bdh/engagehf/messages/MessageItem.kt 0.00% 7 Missing ⚠️
.../stanford/spezi/core/design/component/TopAppBar.kt 0.00% 3 Missing ⚠️
...ehf/health/bloodpressure/BloodPressureViewModel.kt 0.00% 2 Missing ⚠️
... and 4 more
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #86      +/-   ##
============================================
- Coverage     37.26%   36.88%   -0.37%     
- Complexity      600      613      +13     
============================================
  Files           212      217       +5     
  Lines          7425     7677     +252     
  Branches       1023     1055      +32     
============================================
+ Hits           2766     2831      +65     
- Misses         4441     4622     +181     
- Partials        218      224       +6     
Flag Coverage Δ
uitests 28.82% <0.00%> (-0.03%) ⬇️
unittests 31.23% <36.00%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...du/stanford/bdh/engagehf/health/HealthViewModel.kt 100.00% <100.00%> (ø)
...ottomsheet/AddBloodPressureBottomSheetViewModel.kt 98.44% <100.00%> (ø)
...te/bottomsheet/AddHeartRateBottomSheetViewModel.kt 97.88% <100.00%> (ø)
...eight/bottomsheet/AddWeightBottomSheetViewModel.kt 93.03% <100.00%> (ø)
...tlin/edu/stanford/bdh/engagehf/messages/Message.kt 53.85% <100.00%> (+1.22%) ⬆️
.../stanford/spezi/module/account/manager/UserInfo.kt 100.00% <100.00%> (ø)
...dh/engagehf/bluetooth/component/AppScreenEvents.kt 16.67% <50.00%> (ø)
...ehf/health/bloodpressure/BloodPressureViewModel.kt 0.00% <0.00%> (ø)
...dh/engagehf/health/heartrate/HeartRateViewModel.kt 0.00% <0.00%> (ø)
...ford/bdh/engagehf/health/weight/WeightViewModel.kt 0.00% <0.00%> (ø)
... and 10 more

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 244fbbe...547525b. Read the comment docs.

Signed-off-by: Basler182 <showdialog@web.de>
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.

Thank you for working on this @Basler182; let me know if you run into any issues with the feature.

@nriedman did a great job with this on iOS to show it in the Account Settings and as a sheet in the main view when pressing on the message. You can inspect the same behavior in the latest TestFlight release on iOS using the example patient credentials.

@Basler182
Copy link
Contributor Author

Thank you for working on this @Basler182; let me know if you run into any issues with the feature.

@nriedman did a great job with this on iOS to show it in the Account Settings and as a sheet in the main view when pressing on the message. You can inspect the same behavior in the latest TestFlight release on iOS using the example patient credentials.

The only difference at the moment is that we are utilising practical Android functionality here. We have the option of simply displaying the PDF in the Android PDF Viewer. As soon as you click back, you are still in the app. In addition, you get on top for free, the whole Google functionality, Save to Drive, Download, Print, Share, etc. and in addition the full PDF functionality, such as marking, editing, copying. If you try to view it directly in the app without a dedicated viewer, it appears to simply display the PDF as a bitmap and all the advantages are gone.

The account settings don't exist in Android yet, but I think I can add them in this PR.

Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
@PSchmiedmayer
Copy link
Member

@Basler182 Thank you for the context; that makes sense. Looks like this is the intended behavior on Android. Nice to see all that included functionally!

Regarding the account settings: I would suggest to keep the PRs small and targeted, we can add this in a separate PR and then include the PDF export in there.
I think there is a significant effort needed to ensure that we can generalize the account settings similar to the setup on iOS in the long run. We can most likely merge a small setup in the short run and then expand that step-by-step.

@Basler182
Copy link
Contributor Author

@Basler182 Thank you for the context; that makes sense. Looks like this is the intended behavior on Android. Nice to see all that included functionally!

Regarding the account settings: I would suggest to keep the PRs small and targeted, we can add this in a separate PR and then include the PDF export in there. I think there is a significant effort needed to ensure that we can generalize the account settings similar to the setup on iOS in the long run. We can most likely merge a small setup in the short run and then expand that step-by-step.

In the meantime, I have already added a basic version of the ‘Account Settings’. We can then customise this later and extend the functionality.

@PSchmiedmayer
Copy link
Member

Sounds good 👍

Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Copy link
Contributor

@eldcn eldcn left a comment

Choose a reason for hiding this comment

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

Thanks for working on the comments. Besides of missing tests, the rest looks great to me and approving already 🚀

Basler182 and others added 7 commits August 19, 2024 20:54
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
Signed-off-by: Basler182 <showdialog@web.de>
# Conflicts:
#	app/src/main/kotlin/edu/stanford/bdh/engagehf/bluetooth/BluetoothViewModel.kt
#	app/src/main/kotlin/edu/stanford/bdh/engagehf/health/weight/WeightViewModel.kt
#	app/src/main/kotlin/edu/stanford/bdh/engagehf/health/weight/bottomsheet/AddWeightBottomSheetViewModel.kt
#	app/src/main/kotlin/edu/stanford/bdh/engagehf/navigation/screens/AppScreen.kt
#	app/src/main/kotlin/edu/stanford/bdh/engagehf/navigation/screens/AppScreenViewModel.kt
#	app/src/main/res/values-de/strings.xml
#	app/src/main/res/values/strings.xml
#	app/src/test/kotlin/edu/stanford/bdh/engagehf/bluetooth/BluetoothViewModelTest.kt
#	app/src/test/kotlin/edu/stanford/bdh/engagehf/health/HealthViewModelTest.kt
#	app/src/test/kotlin/edu/stanford/bdh/engagehf/health/weight/bottomsheet/AddWeightBottomSheetViewModelTest.kt
@eldcn eldcn merged commit 3a1f054 into main Aug 25, 2024
11 checks passed
@eldcn eldcn deleted the feature/issue-76-message-actions branch August 25, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENGAGE HF ENGAGE-HF-specific issues enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Messages
3 participants