Skip to content

Commit b4b8bf0

Browse files
authored
feat(tasks): Update task status to not use an icon (#1169)
1 parent 87d0880 commit b4b8bf0

File tree

2 files changed

+3
-64
lines changed

2 files changed

+3
-64
lines changed

src/elements/content-sidebar/activity-feed/task-new/Task.scss

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,8 @@ $card-left-offset: 40px;
7676
}
7777

7878
.bcs-task-status {
79-
align-items: center;
8079
color: $bdl-neutral-02;
81-
display: flex;
8280
font-weight: bold;
83-
84-
.bcs-task-status-item:first-child {
85-
margin-left: 5px;
86-
}
8781
}
8882

8983
.bcs-task-status-message {
@@ -97,36 +91,6 @@ $card-left-offset: 40px;
9791
}
9892
}
9993

100-
.bcs-task-status-icon {
101-
border: 1px solid $white;
102-
border-radius: 100%;
103-
bottom: 0;
104-
height: 14px;
105-
margin-right: 3px;
106-
width: 14px;
107-
108-
&.completed,
109-
&.approved,
110-
&.rejected {
111-
background: $white;
112-
}
113-
114-
&.pending,
115-
&.inProgress,
116-
&.notStarted {
117-
align-items: center;
118-
color: white;
119-
display: flex;
120-
font-size: 80%;
121-
font-weight: bold;
122-
justify-content: center;
123-
124-
.fill-color {
125-
fill: $bdl-neutral-02;
126-
}
127-
}
128-
}
129-
13094
.bcs-task-pending-assignment {
13195
margin-top: 5px;
13296
}

src/elements/content-sidebar/activity-feed/task-new/TaskStatus.js

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import * as React from 'react';
33
import { FormattedMessage } from 'react-intl';
44
import camelCase from 'lodash/camelCase';
5-
import IconComplete from '../../../../icons/general/IconVerified';
6-
import IconReject from '../../../../icons/general/IconRejected';
75
import {
86
TASK_NEW_APPROVED,
97
TASK_NEW_REJECTED,
@@ -17,8 +15,6 @@ type Props = {|
1715
status: TaskStatus,
1816
|};
1917

20-
const ICON_SIZE = 14;
21-
2218
const statusMessageKeyMap = {
2319
[TASK_NEW_APPROVED]: messages.tasksFeedApprovedLabel,
2420
[TASK_NEW_COMPLETED]: messages.tasksFeedCompletedLabel,
@@ -27,35 +23,14 @@ const statusMessageKeyMap = {
2723
[TASK_NEW_IN_PROGRESS]: messages.tasksFeedInProgressLabel,
2824
};
2925

30-
const StatusIcon = ({ status, ...rest }: { status: TaskStatus }) => {
31-
switch (status) {
32-
case TASK_NEW_APPROVED:
33-
case TASK_NEW_COMPLETED:
34-
return <IconComplete width={ICON_SIZE} height={ICON_SIZE} {...rest} />;
35-
case TASK_NEW_REJECTED:
36-
return <IconReject width={ICON_SIZE} height={ICON_SIZE} {...rest} />;
37-
case TASK_NEW_NOT_STARTED:
38-
case TASK_NEW_IN_PROGRESS:
39-
default:
40-
return null;
41-
}
42-
};
43-
4426
const Status = React.memo<Props>(({ status }: Props) => (
4527
<FormattedMessage
4628
{...messages.tasksFeedStatusLabel}
4729
values={{
4830
taskStatus: (
49-
<React.Fragment>
50-
<StatusIcon
51-
status={status}
52-
className={`bcs-task-status-item bcs-task-status-icon ${camelCase(status)}`}
53-
aria-hidden
54-
/>
55-
<span className={`bcs-task-status-item bcs-task-status-message ${camelCase(status)}`}>
56-
<FormattedMessage {...statusMessageKeyMap[status]} />
57-
</span>
58-
</React.Fragment>
31+
<span className={`bcs-task-status-message ${camelCase(status)}`}>
32+
<FormattedMessage {...statusMessageKeyMap[status]} />
33+
</span>
5934
),
6035
}}
6136
>

0 commit comments

Comments
 (0)