Skip to content

Conversation

@kidinov
Copy link
Contributor

@kidinov kidinov commented Jan 23, 2026

Closes: WOOMOB-2022

Description

This PR introduces a unified approach to close buttons and content padding in POS dialogs to ensure visual consistency across all dialog components.

Changes:

  • Add optional onCloseClick parameter to WooPosDialogWrapper - when provided, displays a standardized close button (40dp icon with 0.6f alpha tint) at the top-right
  • Add consistent XLarge padding to dialog content within the wrapper
  • Update all POS dialogs to use the wrapper's close button instead of implementing their own
  • Remove redundant padding from individual dialogs since the wrapper now handles it
  • Refactor WooPosScanningSetupDialog previews to use the dialog wrapper for accurate preview rendering

This ensures all POS dialogs have the same close button appearance and spacing, making it easier to maintain consistency as new dialogs are added.

@samiuelson I didn't touch the refund dialog as it is for some reason completely different from the rest of the dialogs, but if we still keep that in the dialog, I'd suggest strongly reconsidering and to follow the same pattern everywhere. I am fine with changing the look for all the rest of the dialogs as well, but it will still be much easier to do if we reuse the same component.

@malinajirka I will take these changes to the feature branch with the card reader connection flow so they will be applied there as well

Test Steps

  1. Open POS mode on a tablet
  2. Navigate to Settings and trigger the Sync Error dialog - verify close button appears and works
  3. Try to exit POS mode - verify the exit confirmation dialog has a close button
  4. Go to Settings > Barcode Scanner Setup - verify the scanning setup dialog has a close button and all steps display correctly
  5. Verify all dialogs have consistent padding around their content

Images/gif

(PREVIEWS)

image image image image
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

- Add onCloseClick parameter to display a consistent close button
- Add XLarge padding to dialog content for consistency
- Update dialogs to use wrapper's close button and remove redundant padding
Add ScanningSetupDialogPreviewWrapper to show previews with the dialog
wrapper and close button for consistent preview experience.
@dangermattic
Copy link
Collaborator

dangermattic commented Jan 23, 2026

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@kidinov kidinov added this to the 24.1 milestone Jan 23, 2026
@kidinov kidinov requested a review from malinajirka January 23, 2026 10:48
@kidinov kidinov marked this pull request as ready for review January 23, 2026 10:48
@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit8e3d64b
Direct Downloadwoocommerce-wear-prototype-build-pr15241-8e3d64b.apk

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit8e3d64b
Direct Downloadwoocommerce-prototype-build-pr15241-8e3d64b.apk

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.72%. Comparing base (ecdf872) to head (8e3d64b).

Files with missing lines Patch % Lines
.../woopos/scanningsetup/WooPosScanningSetupDialog.kt 0.00% 52 Missing ⚠️
...omposeui/component/WooPosExitConfirmationDialog.kt 0.00% 21 Missing ⚠️
.../common/composeui/component/WooPosDialogWrapper.kt 0.00% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #15241   +/-   ##
=========================================
  Coverage     38.71%   38.72%           
  Complexity    10563    10563           
=========================================
  Files          2194     2194           
  Lines        124987   124960   -27     
  Branches      17299    17310   +11     
=========================================
- Hits          48389    48387    -2     
+ Misses        71705    71680   -25     
  Partials       4893     4893           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants