-
Notifications
You must be signed in to change notification settings - Fork 134
[WOOMOB-1032][Woo POS][Settings] Move barcode scanners button to empty cart state #14487
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-1032][Woo POS][Settings] Move barcode scanners button to empty cart state #14487
Conversation
…I for empty cart state
…destination, enhancing navigation logic
…nent and update icons for barcode scanning
…t icon sizes for better UI consistency
📲 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.
|
…ove UI consistency
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #14487 +/- ##
=========================================
Coverage 37.92% 37.92%
- Complexity 9329 9330 +1
=========================================
Files 2015 2015
Lines 113218 113223 +5
Branches 14984 14985 +1
=========================================
+ Hits 42942 42944 +2
- Misses 66360 66363 +3
Partials 3916 3916 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Version |
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 barcode scanner setup functionality in the empty cart state of Woo POS. When the POS settings feature flag is enabled, users can now access barcode scanner settings directly from an empty cart through a dedicated button, improving the user experience by providing immediate access to scanner configuration.
- Added barcode scanner setup button to empty cart state when feature flag is enabled
- Refactored navigation events to support hierarchical settings navigation with smooth animations
- Updated empty cart UI with enhanced design including OR divider and dual-option layout
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
WooPosCartScreen.kt | Redesigned empty cart UI with barcode scanner setup option and refactored components |
WooPosCartViewModel.kt | Added feature flag integration and barcode setup click handling |
WooPosSettingsNavigation.kt | Added new route for direct navigation to barcode scanner settings |
WooPosSettingsScreen.kt | Implemented automatic navigation with delays for smooth multi-level transitions |
WooPosHomeChildToParentCommunication.kt | Refactored navigation events to support hierarchical settings structure |
strings.xml | Added new UI strings for barcode scanner setup functionality |
ic_woo_pos_empty_cart.xml | Removed custom cart icon in favor of Material Design icons |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/settings/WooPosSettingsScreen.kt
Outdated
Show resolved
Hide resolved
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/cart/WooPosCartScreen.kt
Show resolved
Hide resolved
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/cart/WooPosCartScreen.kt
Show resolved
Hide resolved
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.
Overall, LGTM! I'd prefer to get rid of delays in Compose layout because, to me, the effect is weird.
val navigationPath = buildNavigationPath(initial.second) | ||
|
||
for (destination in navigationPath) { | ||
delay(300) |
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.
❓ Hm. I'm not convinced of these delays. I really like the UI effect more without delays.
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.
Yep, me nether. I won't change it now as we may want to change and open the setup flow directly. I won't merge the PR yet
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.
Removed that
|
||
@Composable | ||
fun WooPosSettingsScreen( | ||
onNavigationEvent: (WooPosNavigationEvent) -> Unit, | ||
initial: Pair<WooPosSettingsCategory, WooPosSettingsDetailDestination>? = null, |
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.
initial: Pair<WooPosSettingsCategory, WooPosSettingsDetailDestination>? = null, | |
destination: Pair<WooPosSettingsCategory, WooPosSettingsDetailDestination>? = null, |
initial
is not intuitive, how about destination
, initialState
, etc?
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 point. Won't change it yet as maybe I need to remove it complete if we go with opening the setup flow dialog from the empty state cart
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.
Removed this too
WOOMOB-1032
Description
Added barcode scanner setup functionality to the empty cart state in Woo POS. When the cart is empty and the POS settings feature flag is enabled, users can now access barcode scanner settings directly from the cart screen through a dedicated button. The implementation includes automatic navigation to Hardware → Barcode scanners settings with smooth animations and refactored empty state components for better code reusability.
There are also some change in the UI of the empty cart when the flag disabled too, so please evaluate them
Steps to reproduce
Testing information
The tests that have been performed
Images/gif
08-20--09-41.mp4
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.