-
-
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
Graphdataconnection #39
Conversation
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.
Changes look fine. Great work on the refresh data. We might need to take care of the refresh speed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 66.44% 68.07% +1.63%
==========================================
Files 37 36 -1
Lines 1436 1647 +211
==========================================
+ Hits 954 1121 +167
- Misses 482 526 +44
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Firebase <> UI Data Connections
♻️ Current situation & Problem
The CoughSync app currently displays hardcoded placeholder values rather than actual user cough data in both the Dashboard and Cough Tracker views. This prevents users from tracking their health metrics accurately and provides a misleading user experience. This PR connects these views to Firebase/Firestore to display real-time cough statistics and visual representations of cough patterns.
⚙️ Release Notes
Example usage:
📚 Documentation
Our solution implements Firebase data integration for the CoughSync app using a clean architecture approach. All Firebase interactions are contained within the CoughSyncStandard class, with ViewModels serving as intermediaries between the data layer and UI.
We've added methods to CoughSyncStandard for fetching various types of cough data:
fetchTodayCoughCount()
for current day totalsfetchWeeklyAverageCoughCount()
for weekly averagesfetchMonthlyAverageCoughCount()
for monthly averagesfetchCoughEventsInRange()
for date-specific queriesThe CoughDetectionViewModel has been expanded to include properties for cough metrics and methods to retrieve data from Firebase. We've extended CoughCollection with resetCoughs() and setCount() methods to support data synchronization.
In addition to the Dashboard enhancements, we've implemented the Cough Tracker view with:
✅ Testing
We've added comprehensive tests for the new functionality, including unit tests for:
Testing strategy includes:
All tests pass successfully with Firebase disabled for testing purposes. The implementation gracefully handles edge cases such as empty data sets and ensures loading states transition properly during data retrieval.
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: