Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.4.0",
"private": true,
"dependencies": {
"@appquality/unguess-design-system": "3.0.3",
"@appquality/unguess-design-system": "3.0.4",
"@headwayapp/react-widget": "^0.0.4",
"@reduxjs/toolkit": "^1.8.0",
"@rtk-query/codegen-openapi": "^1.0.0-alpha.1",
Expand Down
5 changes: 4 additions & 1 deletion src/common/components/BugDetail/Attachments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ export default ({ bug }: { bug: GetCampaignsByCidBugsAndBidApiResponse }) => {
</Tabs.Panel>
</StyledTabs>
) : (
<BugMedia items={mediaItems} bug={bug} />
<>
{mediaItems.length > 0 && <BugMedia items={mediaItems} bug={bug} />}
{extraItems.length > 0 && <BugExtra items={extraItems} />}
</>
)}
</Container>
);
Expand Down
96 changes: 42 additions & 54 deletions src/common/components/BugDetail/BugDuplicates/BugItem.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
import { BugCard } from 'src/common/components/BugCard/BugCardWithIcon';
import { theme as globalTheme } from 'src/app/theme';
import { Span, Tag } from '@appquality/unguess-design-system';
import styled from 'styled-components';
import { Link } from 'react-router-dom';
import { useLocalizeRoute } from 'src/hooks/useLocalizedRoute';
import { ReactComponent as FatherIcon } from './icons/father.svg';
import { ReactComponent as SiblingIcon } from './icons/sibling.svg';

const StyledLink = styled(Link)`
text-decoration: none;
color: inherit;
&:hover {
text-decoration: none;
color: inherit;
}
`;

export const BugItem = ({
isFather,
campaignId,
Expand All @@ -31,49 +20,48 @@ export const BugItem = ({
pills: string[];
className?: string;
}) => (
<StyledLink
to={useLocalizeRoute(`campaigns/${campaignId}/bugs/${bugId}`)}
<BugCard
url={useLocalizeRoute(`campaigns/${campaignId}/bugs/${bugId}`)}
borderColor={globalTheme.palette.grey[500]}
className={className}
>
<BugCard borderColor={globalTheme.palette.grey[500]}>
{() => (
<>
<BugCard.IconBox style={{ marginTop: 0, minWidth: 0 }}>
{isFather ? (
<FatherIcon
style={{
width: globalTheme.fontSizes.xl,
marginRight: globalTheme.space.xxs,
color: globalTheme.palette.grey[600],
}}
/>
) : (
<SiblingIcon
style={{
width: globalTheme.fontSizes.xl,
marginRight: globalTheme.space.xxs,
color: globalTheme.palette.grey[600],
}}
/>
)}
</BugCard.IconBox>
<BugCard.Info style={{ marginLeft: globalTheme.space.sm }}>
<BugCard.TopTitle>ID {bugId}</BugCard.TopTitle>
<BugCard.Title>
<BugCard.Content>
<Span>{title}</Span>
</BugCard.Content>
</BugCard.Title>
{pills ? (
<BugCard.Footer>
{pills.map((pill) => (
<Tag>{pill}</Tag>
))}
</BugCard.Footer>
) : null}
</BugCard.Info>
</>
)}
</BugCard>
</StyledLink>
{() => (
<>
<BugCard.IconBox style={{ marginTop: 0, minWidth: 0 }}>
{isFather ? (
<FatherIcon
style={{
width: globalTheme.fontSizes.xl,
marginRight: globalTheme.space.xxs,
color: globalTheme.palette.grey[600],
}}
/>
) : (
<SiblingIcon
style={{
width: globalTheme.fontSizes.xl,
marginRight: globalTheme.space.xxs,
color: globalTheme.palette.grey[600],
}}
/>
)}
</BugCard.IconBox>
<BugCard.Info style={{ marginLeft: globalTheme.space.sm }}>
<BugCard.TopTitle>ID {bugId}</BugCard.TopTitle>
<BugCard.Title>
<BugCard.Content>
<Span>{title}</Span>
</BugCard.Content>
</BugCard.Title>
{pills ? (
<BugCard.Footer>
{pills.map((pill) => (
<Tag>{pill}</Tag>
))}
</BugCard.Footer>
) : null}
</BugCard.Info>
</>
)}
</BugCard>
);
2 changes: 1 addition & 1 deletion src/common/components/BugDetail/Extra.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default ({ items }: { items: BugMediaType[] }) => {
>
{Object.keys(counts).map((type, index) => (
<span key={type}>
{Object.keys(counts).length - 1 !== index && ' - '}
{index > 0 && ' - '}
{counts[type as string]} {type}
</span>
))}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
ajv-draft-04 "^1.0.0"
call-me-maybe "^1.0.1"

"@appquality/unguess-design-system@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-3.0.3.tgz#ed8151c00785054fe195909ba002431a8ba79f72"
integrity sha512-A4w1SxeaBzrVCPrGz8mpm7VDUn1HaBbE7agRe0N9gP4lpNA3WPT0zLPg/dIB4984K47xCDA/xegxvXXtbzD1eA==
"@appquality/unguess-design-system@3.0.4":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-3.0.4.tgz#045576cc6cde51f47ce27327580e0c3a4409c013"
integrity sha512-hLl7q4dxDx//srNOIXtXGwPs0iCrKget26IIujuIONwTOJDIcrI5zRR73pcSY971JpSkyLgbNGSBerRc2JxsPg==
dependencies:
"@nivo/bar" "^0.80.0"
"@nivo/bullet" "^0.80.0"
Expand Down