Skip to content

[WOOMOB-2397][POS Refunds M2] Part 2: Refunded items UI #15489

Merged
samiuelson merged 5 commits intotrunkfrom
woomob-2397-ui
Mar 9, 2026
Merged

[WOOMOB-2397][POS Refunds M2] Part 2: Refunded items UI #15489
samiuelson merged 5 commits intotrunkfrom
woomob-2397-ui

Conversation

@samiuelson
Copy link
Copy Markdown
Contributor

@samiuelson samiuelson commented Mar 5, 2026

Description

Adds the UI layer for displaying refunded line items in POS order details. This is the second of two PRs for WOOMOB-2397, building on #15488.

Changes:

  • Add ProductsSection composable that handles LineItemsState (loading shimmer / loaded items)
  • Add RefundedProductsSection composable for displaying refunded items
  • Add ProductsShimmer composable for loading state placeholder
  • Extract title parameter in OrdersProducts for reuse between products and refunded sections
  • Update previews with refunded items sample data
  • Add "Refunded Products" string resource

Testing instructions

  1. Open POS and complete an order
  2. Issue a partial refund for one item
  3. Open order details
  4. Verify "Products" section shows non-refunded items
  5. Verify "Refunded Products" section appears with refunded items
  6. Verify shimmer loading state appears briefly while refund data loads

Images/Gif

image
Screen_recording_20260306_170224.mp4

@samiuelson samiuelson changed the title Add refunded items UI for POS order details [WOOMOB-2397][POS Refunds M2] Part 2: Refunded items UI Mar 5, 2026
@samiuelson samiuelson requested a review from Copilot March 5, 2026 18:02
@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Mar 5, 2026

App Icon📲 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
Build Number732
Version24.3-rc-1
Application IDcom.woocommerce.android.prealpha
Commit3628f02
Installation URL08fk144q3h7pg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

This comment was marked as off-topic.

Copy link
Copy Markdown
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samiuelson samiuelson added this to the 24.4 milestone Mar 6, 2026
@samiuelson samiuelson added the feature: point of sale POS project label Mar 6, 2026
@samiuelson samiuelson requested a review from malinajirka March 6, 2026 16:05
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 17.14286% with 87 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.53%. Comparing base (969ebd6) to head (3628f02).
⚠️ Report is 26 commits behind head on trunk.

Files with missing lines Patch % Lines
...oid/ui/woopos/orders/details/WooPosOrderDetails.kt 0.00% 85 Missing ⚠️
.../woopos/orders/details/WooPosOrderDetailsMapper.kt 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #15489      +/-   ##
============================================
- Coverage     39.54%   39.53%   -0.02%     
  Complexity    11223    11223              
============================================
  Files          2252     2252              
  Lines        129459   129543      +84     
  Branches      18127    18142      +15     
============================================
+ Hits          51201    51212      +11     
- Misses        73029    73103      +74     
+ Partials       5229     5228       -1     

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

@malinajirka malinajirka self-assigned this Mar 9, 2026
Copy link
Copy Markdown
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

Thanks @samiuelson !

The changes look good and work as expected. The only thing which feels a bit off to me as a user - not technically related to this PR - is that the product row is without taxes:

Image

Add ProductsSection, RefundedProductsSection, and ProductsShimmer
composables to display refunded line items with loading state support.
Update previews to include refunded items sample data.
@samiuelson
Copy link
Copy Markdown
Contributor Author

Thanks for review, @malinajirka!

The changes look good and work as expected. The only thing which feels a bit off to me as a user - not technically related to this PR - is that the product row is without taxes

I'm not sure if it's a good idea, because this would make the display logic inconsistent across Products and Refunded Products sections. In Products totals are displayed without taxes as well.

In the next milestone M3, we are going to show more details of refund:
image
I think this will solve the issue. Let me know what you think!

Base automatically changed from woomob-2397-data-layer to trunk March 9, 2026 15:45
@malinajirka
Copy link
Copy Markdown
Contributor

The changes look good and work as expected. The only thing which feels a bit off to me as a user - not technically related to this PR - is that the product row is without taxes

I'm not sure if it's a good idea, because this would make the display logic inconsistent across Products and Refunded Products sections. In Products totals are displayed without taxes as well.

I wasn't suggesting we should show tax for refunded items but not show it for product items. I just pointed out that this part feels weird to me as a user.

When I have an order with 5 products and no refunds, it's relatively natural, that product rows are without taxes and all taxes are sumed up below. However, when I have an order with 1 product and 2 refunded products, it feels a bit weird. I'm not sure what the solution is though - especially, since the backend likely doesn't tell us per-item-tax.

Screenshot_1773072434

P.S. I noticed that the Apple ring on this order has negative sign -> we might want to consider using abs here as well.

@samiuelson
Copy link
Copy Markdown
Contributor Author

When I have an order with 5 products and no refunds, it's relatively natural, that product rows are without taxes and all taxes are sumed up below. However, when I have an order with 1 product and 2 refunded products, it feels a bit weird. I'm not sure what the solution is though - especially, since the backend likely doesn't tell us per-item-tax.

Got it. To me this feels good enough, assuming we'll have the total taxes shown in the list/details of historical refunds in the Totals section. Though, I'll ask for a designer's feedback during call for testing, likely tomorrow.

P.S. I noticed that the Apple ring on this order has negative sign -> we might want to consider using abs here as well.

This has been fixed within 5f8c4f9.

@samiuelson samiuelson enabled auto-merge March 9, 2026 16:59
@samiuelson samiuelson merged commit 7c7df1e into trunk Mar 9, 2026
15 of 16 checks passed
@samiuelson samiuelson deleted the woomob-2397-ui branch March 9, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants