-
Notifications
You must be signed in to change notification settings - Fork 136
[WOOMOB-1410][Woo POS][Surveys] Implement persistent flags #14677
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
[WOOMOB-1410][Woo POS][Surveys] Implement persistent flags #14677
Conversation
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #14677 +/- ##
============================================
- Coverage 38.41% 38.41% -0.01%
+ Complexity 9823 9822 -1
============================================
Files 2090 2090
Lines 116573 116590 +17
Branches 15599 15599
============================================
+ Hits 44780 44784 +4
- Misses 67634 67646 +12
- Partials 4159 4160 +1 ☔ 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.
Pull Request Overview
This PR implements persistent flags to support Woo POS survey notifications. It adds infrastructure to track whether the POS has been opened, and whether survey notifications have been displayed to different user types.
Key changes:
- Adds
wasOpenedOnceflag inWooPosPreferencesRepositoryusing DataStore for global tracking - Implements survey notification visibility flags in
AppPrefsfor current and potential users - Integrates POS opened flag tracking in
WooPosItemsViewModelinitialization
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| WooPosPreferencesRepository.kt | Adds DataStore-based wasOpenedOnce flag with getter/setter methods |
| WooPosItemsViewModel.kt | Integrates preferences repository and sets opened flag on initialization |
| AppPrefs.kt | Adds survey notification visibility flags for current and potential users |
| WooPosItemsViewModelTest.kt | Adds test coverage for the opened flag functionality |
| AppPrefsTest.kt | Adds comprehensive test coverage for survey notification flags |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WooCommerce/src/androidTest/kotlin/com/woocommerce/android/AppPrefsTest.kt
Show resolved
Hide resolved
samiuelson
left a comment
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!
WOOMOB-1410
Description
Implements persistent flags to support Woo POS survey notifications. This adds infrastructure to track:
The implementation includes:
wasOpenedOnceflag inWooPosPreferencesRepositoryusing DataStore (global, not site-specific)AppPrefs(persist after logout)WooPosItemsViewModelto automatically set the POS opened flagSteps to reproduce
Not in use yet
Testing information
The tests that have been performed
Unit tests
I have considered if this change warrants release notes and have added them to
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.