Skip to content

Commit

Permalink
Fix: Columns are misaligned on Payments->Deposits (#1838)
Browse files Browse the repository at this point in the history
* Fix: #1719 Misaligned columns on Payments->Deposits
- override alignment for deposits list page.
- slight adjustment in transaction table header margin.
- changelog update.
- updated failing snapshots.
- Review changes.
- Aligned data with currency conversion marker.
  • Loading branch information
naman03malhotra authored May 19, 2021
1 parent 0d9035b commit 4fde9a7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Fix - Fix hover dialog for close button on modals, unify styling and layout of modal buttons.
* Update - Use Site Language when rendering Stripe elements.
* Update - Use blog ID for authenticating most of the requests.
* Fix: Misaligned columns on Deposits page.

= 2.4.0 - 2021-05-12 =
* Update - Improve the Connect Account page.
Expand Down
4 changes: 3 additions & 1 deletion client/deposits/list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import ClickableCell from 'components/clickable-cell';
import Page from '../../components/page';
import DepositsFilters from '../filters';

import './style.scss';

const getColumns = ( sortByDate ) => [
{
key: 'details',
Expand Down Expand Up @@ -159,7 +161,7 @@ export const DepositsList = () => {
<Page>
<DepositsFilters storeCurrencies={ storeCurrencies } />
<TableCard
className="deposits-list woocommerce-report-table"
className="wcpay-deposits-list woocommerce-report-table"
title={ __( 'Deposit history', 'woocommerce-payments' ) }
isLoading={ isLoading }
rowsPerPage={ getQuery().per_page || 25 }
Expand Down
14 changes: 14 additions & 0 deletions client/deposits/list/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$space-header-item: 25px;

.wcpay-deposits-list {
// alignment override for header items
.woocommerce-table__header:not( .is-left-aligned ),
.woocommerce-table__item:not( .is-left-aligned ) {
text-align: center;
}

// slight adjustment to align header items with sorting button to account for icon width
.woocommerce-table__header.is-numeric .components-button {
margin-right: $space-header-item;
}
}
4 changes: 2 additions & 2 deletions client/deposits/list/test/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exports[`Deposits list renders correctly with multiple currencies 1`] = `
</div>
</div>
<div
class="woocommerce-card woocommerce-table woocommerce-analytics__card deposits-list woocommerce-report-table has-menu"
class="woocommerce-card woocommerce-table woocommerce-analytics__card wcpay-deposits-list woocommerce-report-table has-menu"
>
<div
class="woocommerce-card__header"
Expand Down Expand Up @@ -478,7 +478,7 @@ exports[`Deposits list renders correctly with single currency 1`] = `
/>
</div>
<div
class="woocommerce-card woocommerce-table woocommerce-analytics__card deposits-list woocommerce-report-table has-menu"
class="woocommerce-card woocommerce-table woocommerce-analytics__card wcpay-deposits-list woocommerce-report-table has-menu"
>
<div
class="woocommerce-card__header"
Expand Down
4 changes: 2 additions & 2 deletions client/transactions/list/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import 'node_modules/@wordpress/components/src/tooltip/style.scss';

$space-header-item: 15px;
$space-header-item: 25px;

.transactions-list {
.date-time {
Expand All @@ -9,7 +9,7 @@ $space-header-item: 15px;

.converted-amount {
display: flex; // Necessary for conversion tooltip to show.
justify-content: flex-end;
justify-content: center;

.conversion-indicator {
margin-right: 6px;
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Please note that our support for the checkout block is still experimental and th
* Fix - Fix hover dialog for close button on modals, unify styling and layout of modal buttons.
* Update - Use Site Language when rendering Stripe elements.
* Update - Use blog ID for authenticating most of the requests.
* Fix: Misaligned columns on Deposits page.

= 2.4.0 - 2021-05-12 =
* Update - Improve the Connect Account page.
Expand Down

0 comments on commit 4fde9a7

Please sign in to comment.