From c39d1afdf8a7147aca80e36004aacfdaad0880c3 Mon Sep 17 00:00:00 2001 From: Eric Jinks <3147296+Jinksi@users.noreply.github.com> Date: Tue, 2 Jan 2024 16:40:26 +1000 Subject: [PATCH 1/3] Fix broken dispute details UI (#7959) --- ...nsaction-details-dispute-details-broken-ui | 5 + .../test/__snapshots__/index.test.tsx.snap | 78 +- client/payment-details/summary/index.tsx | 535 ++++---- client/payment-details/summary/style.scss | 6 +- .../test/__snapshots__/index.test.tsx.snap | 1208 +++++++++-------- .../test/__snapshots__/index.test.tsx.snap | 224 +-- 6 files changed, 1074 insertions(+), 982 deletions(-) create mode 100644 changelog/fix-7958-transaction-details-dispute-details-broken-ui diff --git a/changelog/fix-7958-transaction-details-dispute-details-broken-ui b/changelog/fix-7958-transaction-details-dispute-details-broken-ui new file mode 100644 index 00000000000..b196bc9910c --- /dev/null +++ b/changelog/fix-7958-transaction-details-dispute-details-broken-ui @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Not user-facing: fixes styling bug introduced in develop branch + + diff --git a/client/payment-details/order-details/test/__snapshots__/index.test.tsx.snap b/client/payment-details/order-details/test/__snapshots__/index.test.tsx.snap index f28176053a7..ea41fb13ccb 100644 --- a/client/payment-details/order-details/test/__snapshots__/index.test.tsx.snap +++ b/client/payment-details/order-details/test/__snapshots__/index.test.tsx.snap @@ -20,55 +20,61 @@ exports[`Order details page should match the snapshot - Charge without payment i data-wp-component="CardBody" >
- $15.00 - - USD - - - Pending - -
- Fees: - -$0.00 -
- -- Net: +
$15.00 + + USD + + + Pending +
++ Fees: + -$0.00 +
+ ++ Net: + $15.00 +
+
-
- { formatExplicitCurrency( - balance.amount, - balance.currency - ) } -
- ) : null } - { balance.refunded ? ( -- { `${ - disputeFee - ? __( - 'Deducted', - 'woocommerce-payments' - ) - : __( - 'Refunded', - 'woocommerce-payments' - ) - }: ` } - { formatExplicitCurrency( - -balance.refunded, - balance.currency - ) } -
- ) : ( - '' - ) } -
+
+ { formatExplicitCurrency(
+ balance.amount,
+ balance.currency
+ ) }
+
+ { `${
+ disputeFee
+ ? __(
+ 'Deducted',
+ 'woocommerce-payments'
+ )
+ : __(
+ 'Refunded',
+ 'woocommerce-payments'
+ )
+ }: ` }
+ { formatExplicitCurrency(
+ -balance.refunded,
+ balance.currency
+ ) }
+
- { `${ __(
- 'Loan repayment',
- 'woocommerce-payments'
- ) }: ` }
- { formatExplicitCurrency(
- charge.paydown.amount,
- balance.currency
- ) }
+
+ { `${ __(
+ 'Loan repayment',
+ 'woocommerce-payments'
+ ) }: ` }
+ { formatExplicitCurrency(
+ charge.paydown.amount,
+ balance.currency
+ ) }
+
+
+
- $20.00 - - usd - - - Payment authorized - -
- Fees: - -$0.70 -
- -- Net: - $19.30 +
+ $20.00 + + usd + + + Payment authorized +
++ Fees: + -$0.70 +
+ ++ Net: + $19.30 +
+- $20.00 - - usd - - - Needs review - -
- Fees: - -$0.70 -
- -- Net: - $19.30 +
+ $20.00 + + usd + + + Needs review +
++ Fees: + -$0.70 +
+ ++ Net: + $19.30 +
+- $20.00 - - usd - - - Paid - -
- Fees: - -$0.70 -
- -- Net: - $19.30 +
+ $20.00 + + usd + + + Paid +
++ Fees: + -$0.70 +
+ ++ Net: + $19.30 +
+- $20.00 - - usd - - - Paid - -
- Fees: - -$0.70 -
- -- Net: - $19.30 +
+ $20.00 + + usd + + + Paid +
++ Fees: + -$0.70 +
+ ++ Net: + $19.30 +
+- $20.00 - - usd - - - Paid - -
- Fees: - -$0.70 -
- -- Net: - $19.30 +
+ $20.00 + + usd + + + Paid +
++ Fees: + -$0.70 +
+ ++ Net: + $19.30 +
+- $20.00 - - usd - - - Paid - -
- Fees: - -$0.70 -
- -- Net: - $19.30 +
+ $20.00 + + usd + + + Paid +
++ Fees: + -$0.70 +
+ ++ Net: + $19.30 +
+- $20.00 - - usd - - - Refunded - -
- Refunded: - -$20.00 -
-- Fees: - -$0.70 -
- -- Net: - -$0.70 +
+ $20.00 + + usd + + + Refunded +
++ Refunded: + -$20.00 +
++ Fees: + -$0.70 +
+ ++ Net: + -$0.70 +
+- - - USD - - -
- Fees: - $0.00 -
- -- Net: - $0.00 +
+ + + USD + +
++ Fees: + $0.00 +
+ ++ Net: + $0.00 +
+- $20.00 - - usd - - - Partial refund - -
- Refunded: - -$12.00 -
-- Fees: - -$0.70 -
- -- Net: - $7.30 +
+ $20.00 + + usd + + + Partial refund +
++ Refunded: + -$12.00 +
++ Fees: + -$0.70 +
+ ++ Net: + $7.30 +
+- $20.00 - - usd - - - Paid - -
- Fees: - -$0.70 -
- -- Net: - $19.30 +
+ $20.00 + + usd + + + Paid +
++ Fees: + -$0.70 +
+ ++ Net: + $19.30 +
+- $20.00 - - usd - - - Disputed: Won - -
- Fees: - -$0.70 -
- -- Net: - $19.30 +
+ $20.00 + + usd + + + Disputed: Won +
++ Fees: + -$0.70 +
+ ++ Net: + $19.30 +
+- - Amount placeholder - -
+
- Fee amount + Amount placeholder
- -+
+ + Fee amount + +
+ ++ + Net amount + +
+- $1,500.00 - - usd - - - Paid - -
- Fees: - -$74.00 -
- -- Net: - $1,426.00 +
+ $1,500.00 + + usd + + + Paid +
++ Fees: + -$74.00 +
+ ++ Net: + $1,426.00 +
+