Skip to content

[WOOMOB-271][POS] Minor Design Updates #13990

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

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

malinajirka
Copy link
Contributor

@malinajirka malinajirka commented Apr 29, 2025

Closes: #WOOMOB-271

Description

This PR updates:

  • Text color of Reader State Title - to grey. (ready for payment, tap or insert cart)
  • Text color of Discount/Subtotal/Taxes to grey.
  • Adds chevron to Variable Products rows.

Testing information

  1. Open POS
  2. Scroll to a variable product and verify it has chevron displayed
  3. Add a product to the cart
  4. Add a coupon to the cart
  5. Tap on checkout
  6. Verify Discount/Subtotal/Taxes are grey
  7. Verify ready for payment, tap or insert cart, ... states are grey

The tests that have been performed

I've tested the above.

Images/gif

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

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:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@dangermattic
Copy link
Collaborator

dangermattic commented Apr 29, 2025

1 Warning
⚠️ This PR is assigned to the milestone 22.3. 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

@malinajirka malinajirka added this to the 22.3 milestone Apr 29, 2025
@malinajirka malinajirka requested a review from Copilot April 29, 2025 14:11
Copy link
Contributor

@Copilot Copilot AI left a 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 several minor design updates on the POS screens, including updating text colors and adding a chevron icon for variable product rows.

  • Updates text colors for reader state titles and totals section using WooPosTheme.colors.onSurfaceVariantHighest.
  • Introduces a chevron icon for variable product rows in the items list.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt Updated text elements and TotalsGridRow parameters to include new color properties.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/items/WooPosItemsList.kt Added a chevron icon for variable products and adjusted layout via a Box with weight.
Comments suppressed due to low confidence (1)

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt:377

  • [nitpick] Consider renaming the parameters 'colorOne' and 'colorTwo' in TotalsGridRow to more descriptive names (e.g. 'textColorOne' and 'textColorTwo') for improved clarity.
colorOne: Color = Color.Unspecified,

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Apr 29, 2025

📲 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 Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commitb30209e
Direct Downloadwoocommerce-wear-prototype-build-pr13990-b30209e.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Apr 29, 2025

📲 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
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitb30209e
Direct Downloadwoocommerce-prototype-build-pr13990-b30209e.apk

@malinajirka malinajirka requested a review from samiuelson April 30, 2025 07:03
@malinajirka malinajirka marked this pull request as ready for review April 30, 2025 07:03
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 38.30%. Comparing base (a27ee9d) to head (b30209e).
Report is 13 commits behind head on trunk.

Files with missing lines Patch % Lines
...ce/android/ui/woopos/home/items/WooPosItemsList.kt 0.00% 20 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13990      +/-   ##
============================================
- Coverage     38.30%   38.30%   -0.01%     
  Complexity     9495     9495              
============================================
  Files          2118     2118              
  Lines        116395   116412      +17     
  Branches      14929    14930       +1     
============================================
  Hits          44586    44586              
- Misses        67729    67746      +17     
  Partials       4080     4080              

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

@samiuelson samiuelson self-assigned this May 1, 2025
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 :shipit:

@@ -223,7 +223,20 @@ fun WooPosProductCard(

Spacer(modifier = Modifier.width(WooPosSpacing.Medium.value))

ProductInfo(item)
Box(modifier = Modifier.weight(1f)) {
ProductInfo(item)
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 n.p.: I'm curious if you considered avoiding wrapping ProductInfo with Box. For example, can we introduce modifier: Modifier = Modifier arg in ProductInfo composable, and pass a Modifier with some matching state (.fillMaxWidth() maybe)? I didn't dig deep enough to be sure this would be a good solution here; it just caught my attention that we can try making ProductInfo component configurable with Modifier instead of wrapping it.

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