-
Notifications
You must be signed in to change notification settings - Fork 122
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
Show a warning dialog when attempting to close data collection screen #3024
Conversation
* Add `ConfirmationDialog` preview. * Update `ConfirmationDialog` to track dialog state internally. * Refactor `showConfirmationDialog` to use new `ConfirmationDialog` implementation. * Remove unnecessary mutable state. * Update string resource names to match their purpose.
- Replaced the default navigation action with a custom warning dialog. - Added a new function `showConfirmationDialog` to display the exit warning dialog. - Modified `onBack` to trigger the warning dialog when appropriate. - Moved clearDraft() call to onConfirm action.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3024 +/- ##
============================================
+ Coverage 63.61% 63.65% +0.04%
- Complexity 1272 1274 +2
============================================
Files 271 271
Lines 6572 6593 +21
Branches 930 931 +1
============================================
+ Hits 4181 4197 +16
- Misses 1789 1794 +5
Partials 602 602
|
app/src/main/java/com/google/android/ground/ui/compose/ConfirmationDialog.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/google/android/ground/ui/compose/ConfirmationDialog.kt
Show resolved
Hide resolved
@gino-m Who should we tag for validating the non-english translation strings? |
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.
Minor change to French and Spanish, with kind help of @PilarValbuena
Thank you @jo-spek and @PilarValbuena |
@jo-spek Can you please re-stamp the PR? |
Fixes #2635
Adds a new warning dialog before discarding the in-progress data collection screen.
data.collection.confirmation.dialog.mp4
@anandwana001 PTAL?