-
Notifications
You must be signed in to change notification settings - Fork 138
Fix the layout issue in the Woo update dialog #13851
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
Conversation
This commit introduces the `WooUpgradeRequiredDialogFragment`, which is a custom DialogFragment used to display a dialog that informs the user about a required WooCommerce upgrade. This dialog is implemented using Jetpack Compose, and it allows the user to navigate to the WooCommerce upgrade instructions using a custom Chrome tab. It also includes an option to dismiss the dialog.
📲 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.
|
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/sitepicker/WooUpgradeRequiredDialog.kt
Dismissed
Show dismissed
Hide dismissed
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/sitepicker/WooUpgradeRequiredDialog.kt
Dismissed
Show dismissed
Hide dismissed
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/sitepicker/WooUpgradeRequiredDialog.kt
Dismissed
Show dismissed
Hide dismissed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #13851 +/- ##
============================================
- Coverage 38.14% 38.12% -0.02%
- Complexity 9296 9297 +1
============================================
Files 2082 2083 +1
Lines 114936 114976 +40
Branches 14651 14662 +11
============================================
Hits 43839 43839
- Misses 67105 67144 +39
- Partials 3992 3993 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return Dialog(requireContext()).apply { | ||
| setContentView(composeView) | ||
| setCancelable(false) |
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.
np, this would create two dialogs (ie two windows), Compose's AlertDialog will create its own dialog, and we are creating another one here.
I'm just sharing this, I don't think it's a blocker, and I think the simplicity of the current solution.
Also, since this dialog is rarely (if at all) is shown, it's not an issue.
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.
Good catch @hichamboushaba! I’ve implemented a better solution by using a ComposeView in the SitePickerFragment. The WooUpgradeDialog remains the same, I simply removed the dialog fragment and integrated this composable dialog directly into the SitePickerFragment.
hichamboushaba
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.
Thanks for fixing this @irfano 👍
Generated by 🚫 Danger |
Closes: #13843
Description
This fixes the layout issue in the Woo update dialog, which was broken on tablets. I migrated the dialog to Compose and resolved the issue. This PR also updates the dialog’s style to align with the current design used in the app.
Steps to reproduce
The tests that have been performed
Steps above and screens below.
Images/gif
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: