Skip to content

Commit 32d8618

Browse files
authored
Fix Task List Title Style (#5437)
* Updates to the format of the wcpaySettings interface, and update to pass the requirements from the server to the client JS. * WIP: create the business details modal and set up test data * Updates to support showing the modal in cases where there is more than one error. * Updates to the modal logic and the task list. * Updates to the modal styling and logic to display it. * Update changelog * Fixes based on initial review to make code more efficient and performant. * Fixes based on initial review to make code more efficient and performant. * Added snapshot tests for the new modal. * Added logic to filter out error messages which are not helpful. * Adding comment to give more context. * Various fixes to the logic, adding i8n strings and adding a new line to show the date more clearly to the user. * Fixing the padding on the notices, update snapshots. * Fix broken test. * Update to use a Flex element, and removed some styling no longer needed. * Revert accidental change to accounts array * Remove some CSS which is no longer needed.
1 parent ee30a55 commit 32d8618

File tree

3 files changed

+18
-30
lines changed

3 files changed

+18
-30
lines changed

changelog/fix-5436-task-list-title

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fix
3+
4+
Updates to the styling of the task list title on the main account overview page to match the component default.

client/overview/style.scss

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@
1010

1111
// Adapted from woocommerce-admin:client/homescreen/style.scss
1212
.components-card.woocommerce-task-card {
13-
.components-card__header.is-size-large,
14-
.components-card__header.is-size-medium {
15-
min-height: 63px;
16-
min-height: unset;
17-
display: grid;
18-
grid-template-columns: auto 24px;
19-
20-
// IE doesn't support `align-items` on grid container
21-
22-
& > * {
23-
align-self: center;
24-
}
25-
}
26-
2713
.components-card__body.is-size-large {
2814
padding: 0;
2915
}
@@ -32,14 +18,6 @@
3218
padding: 0 $gap-smaller;
3319
}
3420

35-
.wooocommerce-task-card__header {
36-
display: flex;
37-
38-
.woocommerce-badge {
39-
margin-left: 16px;
40-
}
41-
}
42-
4321
.wcpay-task-list.woocommerce-experimental-list {
4422
position: relative;
4523

client/overview/task-list/index.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55
*/
66
import React from 'react';
77
import { __ } from '@wordpress/i18n';
8-
import { Card, CardBody, CardHeader } from '@wordpress/components';
8+
import {
9+
Card,
10+
CardBody,
11+
CardHeader,
12+
FlexItem,
13+
FlexBlock,
14+
} from '@wordpress/components';
915
import { Badge } from '@woocommerce/components';
10-
import { CollapsibleList, TaskItem, Text } from '@woocommerce/experimental';
16+
import { CollapsibleList, TaskItem } from '@woocommerce/experimental';
1117
import { useDispatch } from '@wordpress/data';
1218
import { useCallback, useEffect, useState } from '@wordpress/element';
1319
const DAY_IN_MS = 24 * 60 * 60 * 1000;
@@ -163,15 +169,15 @@ const TaskList = ( { overviewTasksVisibility, tasks } ) => {
163169
size="large"
164170
className="woocommerce-task-card woocommerce-homescreen-card"
165171
>
166-
<CardHeader size="medium">
167-
<div className="wooocommerce-task-card__header">
168-
<Text variant="title.small">
169-
{ __( 'Things to do', 'woocommerce-payments' ) }
170-
</Text>
172+
<CardHeader size="medium" justify="left">
173+
<FlexItem>
174+
{ __( 'Things to do', 'woocommerce-payments' ) }
175+
</FlexItem>
176+
<FlexBlock>
171177
{ 0 < pendingTaskCount && (
172178
<Badge count={ pendingTaskCount } />
173179
) }
174-
</div>
180+
</FlexBlock>
175181
</CardHeader>
176182
<CardBody>
177183
<CollapsibleList

0 commit comments

Comments
 (0)