Skip to content

[Woo POS] Update Totals View UI with Subtotals from Cart Total #11738

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

Merged

Conversation

backwardstruck
Copy link
Contributor

@backwardstruck backwardstruck commented Jun 16, 2024

Closes: #11727

Description

Enhances the Totals UI. It adjusts the UI to better match design requirements and ensures consistent formatting of prices.

PR is based on #11720 which should be merged first.

Steps to reproduce

  1. Go to the POS screen in settings.
  2. Add items to the cart.
  3. Tab button to checkout.
  4. Observe the displayed totals, including the subtotal and tax.

Testing information

  • Devices Used: Test on multiple devices to ensure UI consistency.
  • Critical Flows: Check the flow from adding products to cart, creating an order draft, and finally displaying totals.

Images/gif

Screenshot_20240617_164521

  • 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.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 16, 2024

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

App Name WooCommerce Android
FlavorJalapeno
Build TypeDebug
Commit97b3bb5
Direct Downloadwoocommerce-prototype-build-pr11738-97b3bb5.apk

@backwardstruck backwardstruck added this to the 19.2 milestone Jun 17, 2024
@backwardstruck backwardstruck added type: task An internally driven task. feature: point of sale POS project labels Jun 17, 2024
@backwardstruck backwardstruck marked this pull request as ready for review June 17, 2024 20:45
…-ui-with-subtotals-from-cart-total' into 11727-woo-pos-update-totals-view-ui-with-subtotals-from-cart-total
@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 40.26%. Comparing base (a84b138) to head (1e76ca3).

Current head 1e76ca3 differs from pull request most recent head 97b3bb5

Please upload reports for the commit 97b3bb5 to get more accurate results.

Files Patch % Lines
...oid/ui/woopos/home/totals/WooPosTotalsViewModel.kt 0.00% 7 Missing ⚠️
...android/ui/woopos/home/totals/WooPosTotalsState.kt 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #11738      +/-   ##
============================================
+ Coverage     40.21%   40.26%   +0.04%     
- Complexity     5331     5333       +2     
============================================
  Files          1132     1133       +1     
  Lines         65331    65178     -153     
  Branches       9058     9007      -51     
============================================
- Hits          26273    26243      -30     
+ Misses        36637    36534     -103     
+ Partials       2421     2401      -20     

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

@samiuelson samiuelson self-assigned this Jun 18, 2024
Copy link
Contributor

@samiuelson samiuelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I've just aded a few questions and ideas.

enabled = totalsState.value.isCollectPaymentButtonEnabled,
modifier = Modifier.align(Alignment.CenterHorizontally)
) {
Text("Collect Card Payment")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Does it make sense to extract strings from this composable or are these temporary and will be replaced in the next iterations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are temporary. Thanks for reminding me. I've just made a ticket to go through and replace them:
#11746

var orderTax: java.math.BigDecimal,
var orderSubtotalText: String,
var orderTaxText: String,
var orderTotalText: String,
) : Parcelable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 It would be nice to add also a loading state (to display shimmer loading indicator) in the next iterations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, updated in the other PR now:
f9434ef

Base automatically changed from 11694-woo-pos-totals-view to trunk June 19, 2024 12:54
kidinov added 2 commits June 20, 2024 15:26
…btotals-from-cart-total

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsState.kt
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 19.2. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@kidinov kidinov enabled auto-merge June 20, 2024 14:02
@kidinov kidinov merged commit db895f8 into trunk Jun 20, 2024
14 checks passed
@kidinov kidinov deleted the 11727-woo-pos-update-totals-view-ui-with-subtotals-from-cart-total branch June 20, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: point of sale POS project type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Woo POS] Update Totals View UI with Subtotals from Cart Total
6 participants