Skip to content

Commit 930396e

Browse files
authored
Restore width of Billing History in Purchases (#98606)
* Set purchases screens to full width * Remove full-width style for billing history * Add dataviews specific class to wrapper * Refactor HTML markup to be more semantic --------- Co-authored-by: Bill Robbins <[email protected]>
1 parent 5b4fd7b commit 930396e

File tree

3 files changed

+19
-41
lines changed

3 files changed

+19
-41
lines changed

client/me/purchases/billing-history/billing-history-list-data-view.tsx

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,20 @@ export default function BillingHistoryListDataView( {
4747
const handleViewChange = ( view: View ) => viewState.updateView( view as ViewStateUpdate );
4848

4949
return (
50-
<div className="billing-history">
51-
<div className="dataviews-wrapper">
52-
<DataViews
53-
data={ paginatedItems }
54-
paginationInfo={ {
55-
totalItems,
56-
totalPages,
57-
} }
58-
fields={ fields }
59-
view={ viewState.view }
60-
search
61-
searchLabel={ translate( 'Search receipts' ) }
62-
onChangeView={ handleViewChange }
63-
defaultLayouts={ DEFAULT_LAYOUT }
64-
actions={ actions }
65-
isLoading={ isLoading }
66-
/>
67-
</div>
68-
</div>
50+
<DataViews
51+
data={ paginatedItems }
52+
paginationInfo={ {
53+
totalItems,
54+
totalPages,
55+
} }
56+
fields={ fields }
57+
view={ viewState.view }
58+
search
59+
searchLabel={ translate( 'Search receipts' ) }
60+
onChangeView={ handleViewChange }
61+
defaultLayouts={ DEFAULT_LAYOUT }
62+
actions={ actions }
63+
isLoading={ isLoading }
64+
/>
6965
);
7066
}

client/me/purchases/billing-history/main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function BillingHistoryContent( {
2828
const useDataViewBillingHistoryList = config.isEnabled( 'purchases/billing-history-data-view' );
2929

3030
return (
31-
<Card className="billing-history__receipts">
31+
<Card id="billing-history" className="section-content" tagName="section">
3232
{ useDataViewBillingHistoryList ? (
3333
<BillingHistoryListDataView getReceiptUrlFor={ getReceiptUrlFor } />
3434
) : (
@@ -61,7 +61,7 @@ function BillingHistory() {
6161
const vatText = vatDetails.id ? editVatText : addVatText;
6262

6363
return (
64-
<Main wideLayout className="billing-history">
64+
<Main id="purchases" wideLayout>
6565
<DocumentHead title={ titles.billingHistory } />
6666
<PageViewTracker path="/me/purchases/billing" title="Me > Billing History" />
6767
<NavigationHeader

client/me/purchases/billing-history/style-data-view.scss

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
.billing-history {
2-
.navigation-header::after {
3-
display: none;
4-
}
1+
#billing-history {
52

63
.dataviews-wrapper {
74
width: 100%;
85
margin-bottom: 1rem;
6+
padding: 0 1rem;
97

108
.dataviews-view-table {
119
width: 100%;
@@ -201,19 +199,3 @@
201199
gap: 1em;
202200
}
203201
}
204-
205-
@media screen and (min-width: 782px) {
206-
body.is-section-me .navigation-header::after {
207-
display: none;
208-
}
209-
}
210-
211-
body.is-section-me div.layout.is-global-sidebar-visible .layout__primary .billing-history.main > * {
212-
max-width: 100%;
213-
}
214-
215-
@media screen and (min-width: 782px) {
216-
body.is-section-me .navigation-header::after {
217-
display: none !important;
218-
}
219-
}

0 commit comments

Comments
 (0)