Skip to content

Commit 2976be3

Browse files
authored
Merge pull request #494 from AppQuality/UN-522-rebased
Un 522 Tag
2 parents d99651c + 844805c commit 2976be3

File tree

45 files changed

+422
-592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+422
-592
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.4.0",
44
"private": true,
55
"dependencies": {
6-
"@appquality/unguess-design-system": "2.12.76",
6+
"@appquality/unguess-design-system": "2.12.79",
77
"@headwayapp/react-widget": "^0.0.4",
88
"@reduxjs/toolkit": "^1.8.0",
99
"@rtk-query/codegen-openapi": "^1.0.0-alpha.1",
Lines changed: 4 additions & 0 deletions
Loading

src/common/components/BugDetail/BugDuplicates/BugItem.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { BugCard } from 'src/common/components/BugCard/BugCardWithIcon';
22
import { theme as globalTheme } from 'src/app/theme';
3-
import { Pill } from 'src/common/components/pills/Pill';
4-
import { Span } from '@appquality/unguess-design-system';
3+
import { Span, Tag } from '@appquality/unguess-design-system';
54
import styled from 'styled-components';
65
import { Link } from 'react-router-dom';
76
import { useLocalizeRoute } from 'src/hooks/useLocalizedRoute';
@@ -63,7 +62,7 @@ export const BugItem = ({
6362
{pills ? (
6463
<BugCard.Footer>
6564
{pills.map((pill) => (
66-
<Pill>{pill}</Pill>
65+
<Tag>{pill}</Tag>
6766
))}
6867
</BugCard.Footer>
6968
) : null}

src/common/components/BugDetail/DetailsItems.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from 'styled-components';
22
import { theme as globalTheme } from 'src/app/theme';
3-
import { SeverityPill } from 'src/common/components/pills/SeverityPill';
3+
import { SeverityTag } from 'src/common/components/tag/SeverityTag';
44
import { Bug, BugAdditionalField } from 'src/features/api';
55
import { MD, Span } from '@appquality/unguess-design-system';
66
import { Trans, useTranslation } from 'react-i18next';
@@ -72,7 +72,8 @@ export default ({
7272
<Label style={{ marginBottom: globalTheme.space.xs }}>
7373
{t('__BUGS_PAGE_BUG_DETAIL_DETAILS_BUG_SEVERITY_LABEL')}
7474
</Label>
75-
<SeverityPill
75+
<SeverityTag
76+
hasBackground
7677
severity={bug.severity.name.toLowerCase() as Severities}
7778
/>
7879
</DetailsItem>
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { SM, Tooltip } from '@appquality/unguess-design-system';
2-
import { IconPill } from 'src/common/components/pills/IconPill';
1+
import { SM, Tooltip, Tag } from '@appquality/unguess-design-system';
32
import { ReactComponent as NeedReviewIcon } from 'src/assets/icons/pill-icon-need-review.svg';
43
import { useTranslation } from 'react-i18next';
4+
import { theme } from 'src/app/theme';
55

66
export const NeedReviewPill = () => {
77
const { t } = useTranslation();
@@ -11,14 +11,14 @@ export const NeedReviewPill = () => {
1111
type="light"
1212
content={t('__BUGS_PAGE_BUG_DETAIL_NEED_REVIEW_TOOLTIP')}
1313
>
14-
<span>
15-
<IconPill
16-
size="medium"
17-
iconPosition="right"
18-
title={<SM>{t('__BUGS_PAGE_BUG_DETAIL_NEED_REVIEW')}</SM>}
19-
icon={<NeedReviewIcon />}
20-
/>
21-
</span>
14+
<div>
15+
<SM tag="span" style={{ marginRight: theme.space.xxs }}>
16+
{t('__BUGS_PAGE_BUG_DETAIL_NEED_REVIEW')}
17+
</SM>
18+
<Tag hue="rgba(0,0,0,0)" isRound>
19+
<NeedReviewIcon />
20+
</Tag>
21+
</div>
2222
</Tooltip>
2323
);
2424
};

src/common/components/BugDetail/Meta/index.tsx

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { XL, MD, SM } from '@appquality/unguess-design-system';
1+
import { XL, MD, SM, Tag } from '@appquality/unguess-design-system';
22
import { ReactComponent as OSIcon } from 'src/assets/icons/environment-icon.svg';
33
import { ReactComponent as SmartphoneIcon } from 'src/assets/icons/pill-icon-smartphone.svg';
44
import { ReactComponent as TabletIcon } from 'src/assets/icons/pill-icon-tablet.svg';
55
import { ReactComponent as DesktopIcon } from 'src/assets/icons/pill-icon-desktop.svg';
6-
import { SeverityPill } from 'src/common/components/pills/SeverityPill';
6+
import { SeverityTag } from 'src/common/components/tag/SeverityTag';
77
import styled from 'styled-components';
88
import { theme as globalTheme } from 'src/app/theme';
99
import { Bug } from 'src/features/api';
10-
import { IconPill } from 'src/common/components/pills/IconPill';
1110
import { Pipe } from 'src/common/components/Pipe';
1211
import { WrappedText } from 'src/common/components/WrappedText';
1312
import { NeedReviewPill } from './NeedReviewPill';
@@ -39,7 +38,7 @@ function getDeviceIcon(device: string) {
3938
case 'desktop':
4039
return <DesktopIcon />;
4140
default:
42-
return null;
41+
return <TabletIcon />;
4342
}
4443
}
4544

@@ -55,7 +54,10 @@ export default ({
5554
}) => (
5655
<Container>
5756
<SeverityContainer>
58-
<SeverityPill severity={bug.severity.name.toLowerCase() as Severities} />
57+
<SeverityTag
58+
hasBackground
59+
severity={bug.severity.name.toLowerCase() as Severities}
60+
/>
5961
{bug.status.id === 4 && <NeedReviewPill />}
6062
</SeverityContainer>
6163
<XL
@@ -70,37 +72,35 @@ export default ({
7072
</XL>
7173
<MD
7274
style={{
73-
color: globalTheme.palette.grey[600],
75+
color: globalTheme.palette.grey[700],
7476
marginBottom: globalTheme.space.md,
7577
}}
7678
>
7779
{bug.title.context ? bug.title.context.join(', ') : null}
7880
</MD>
7981
<BugInfo>
80-
<SM style={{ textTransform: 'capitalize' }}>{bug.type.name}</SM>
81-
<Pipe style={{ height: globalTheme.lineHeights.md }} />
82-
<IconPill
83-
size="medium"
84-
title={
85-
<SM>
86-
{bug.device.type === 'desktop'
87-
? bug.device.desktop_type
88-
: `${bug.device.manufacturer} ${bug.device.model}`}
89-
</SM>
90-
}
91-
icon={getDeviceIcon(bug.device.type)}
92-
style={{ textTransform: 'capitalize' }}
93-
/>
94-
<IconPill
95-
size="medium"
96-
title={
97-
<SM>
98-
{bug.device.os} {bug.device.os_version}
99-
</SM>
100-
}
101-
icon={<OSIcon />}
102-
style={{ textTransform: 'capitalize' }}
103-
/>
82+
<SM
83+
isBold
84+
style={{
85+
textTransform: 'capitalize',
86+
color: globalTheme.palette.grey[700],
87+
}}
88+
>
89+
{bug.type.name}
90+
</SM>
91+
<Pipe size="regular" style={{ height: globalTheme.lineHeights.md }} />
92+
<Tag hue="white" style={{ textTransform: 'capitalize' }}>
93+
<Tag.Avatar>{getDeviceIcon(bug.device.type)}</Tag.Avatar>
94+
{bug.device.type === 'desktop'
95+
? bug.device.desktop_type
96+
: `${bug.device.manufacturer} ${bug.device.model}`}
97+
</Tag>
98+
<Tag hue="white" style={{ textTransform: 'capitalize' }}>
99+
<Tag.Avatar>
100+
<OSIcon />
101+
</Tag.Avatar>
102+
{bug.device.os} {bug.device.os_version}
103+
</Tag>
104104
</BugInfo>
105105
</Container>
106106
);

src/common/components/pills/IconPill.tsx

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/common/components/pills/Pill.tsx

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/common/components/pills/SeverityPill.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/common/components/pills/StatusPill.tsx

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)