-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CMM-801 create sync taxonomies calls in fluxC #22273
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
CMM-801 create sync taxonomies calls in fluxC #22273
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.
Pull Request Overview
This PR implements local caching of taxonomy terms by integrating FluxC calls within the TermsViewModel to sync and store terms locally for quicker access. The implementation adds a new getLocalData()
method to the DataView architecture to support showing locally cached data before network updates.
- Adds FluxC integration to store taxonomy terms locally when they are fetched from the network
- Updates the DataView architecture to support showing local data before network requests
- Modifies several ViewModels to properly initialize and leverage the local data functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
TermsViewModel.kt | Core implementation adding FluxC integration and local data support for taxonomy terms |
DataViewViewModel.kt | Base class updates to support displaying local data before network requests |
ApplicationPasswordsViewModel.kt | Adds initialization call to enable local data functionality |
SubscribersViewModel.kt | Adds initialization call to enable local data functionality |
DataViewViewModelTest.kt | Test updates to ensure proper initialization during testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WordPress/src/main/java/org/wordpress/android/ui/taxonomies/TermsViewModel.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/taxonomies/TermsViewModel.kt
Show resolved
Hide resolved
Generated by 🚫 Danger |
|
App Name | ||
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr22273-8ee9e69 | |
Commit | 8ee9e69 | |
Direct Download | wordpress-prototype-build-pr22273-8ee9e69.apk |
|
App Name | ||
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr22273-8ee9e69 | |
Commit | 8ee9e69 | |
Direct Download | jetpack-prototype-build-pr22273-8ee9e69.apk |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #22273 +/- ##
==========================================
- Coverage 39.88% 39.86% -0.02%
==========================================
Files 2168 2168
Lines 102823 102894 +71
Branches 14830 14840 +10
==========================================
+ Hits 41007 41015 +8
- Misses 58339 58399 +60
- Partials 3477 3480 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
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.
LGTM. Test plan succeeded for me.
Description
This PR is manually calling FluxC event every time the terms list is loaded. This helps to store the terms locally for quicker access.
Important note: Neither "Site settings" nor "DataView" support offline mode. So, even though the terms are stored locally, the flow when offline is not available.
Testing instructions