Skip to content

Commit 6237db8

Browse files
Merge pull request #559 from AppQuality/UN-507
Un 507 - pendo classes for bugsList and bugDetail pages
2 parents 495666b + adb3a24 commit 6237db8

32 files changed

+203
-50
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const BugDuplicatesList = ({
5252
.slice(0, isOpen ? data.siblings.length : maxSiblingSize)
5353
.map((item) => (
5454
<BugItem
55+
className="bug-overview-duplicated-bug"
5556
key={item.id}
5657
campaignId={cid}
5758
bugId={item.id}

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@ export const BugItem = ({
2222
bugId,
2323
title,
2424
pills,
25+
className,
2526
}: {
2627
isFather?: boolean;
2728
campaignId: number;
2829
bugId: number;
2930
title: string;
3031
pills: string[];
32+
className?: string;
3133
}) => (
32-
<StyledLink to={useLocalizeRoute(`campaigns/${campaignId}/bugs/${bugId}`)}>
34+
<StyledLink
35+
to={useLocalizeRoute(`campaigns/${campaignId}/bugs/${bugId}`)}
36+
className={className}
37+
>
3338
<BugCard borderColor={globalTheme.palette.grey[500]}>
3439
{() => (
3540
<>

src/common/components/BugDetail/BugStateDropdown.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const BugStateDropdown = ({ bug }: { bug: Bug }) => {
122122
itemToString: (item: DropdownItem) => item && item.slug,
123123
}}
124124
>
125-
<Field>
125+
<Field className="bug-dropdown-custom-status">
126126
{bug.status.id === 4 ? (
127127
<Tooltip
128128
appendToNode={document.body}
@@ -148,7 +148,13 @@ const BugStateDropdown = ({ bug }: { bug: Bug }) => {
148148
options.map((item) => (
149149
<>
150150
{item.slug === 'solved' && <Separator />}
151-
<StyledItem key={item.slug} value={item}>
151+
<StyledItem
152+
key={item.slug}
153+
value={item}
154+
className={`bug-dropdown-custom-status-${item.slug
155+
.toLowerCase()
156+
.replace(/\s+/g, '-')}`}
157+
>
152158
{item.icon} {item.text}
153159
</StyledItem>
154160
</>

src/common/components/BugDetail/ImageCard.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ export default ({
2525
index,
2626
url,
2727
onClick,
28+
className,
2829
}: {
2930
index: number;
3031
url: string;
3132
onClick?: () => void;
33+
className?: string;
3234
}) => (
33-
<ImageCard onClick={onClick}>
35+
<ImageCard onClick={onClick} className={className}>
3436
<Preview url={url} />
3537
<MD isBold style={{ textAlign: 'center' }}>
3638
{index + 1}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default ({
7272
return (
7373
<Col xs={12} sm={6} className="flex-3-sm">
7474
<ImageCard
75+
className="bug-preview-media-item bug-preview-media-image"
7576
index={index}
7677
url={item.url}
7778
onClick={() => openLightbox(index)}
@@ -82,6 +83,7 @@ export default ({
8283
return (
8384
<Col xs={12} sm={6} className="flex-3-sm">
8485
<VideoCard
86+
className="bug-preview-media-item bug-preview-media-video"
8587
index={index}
8688
url={item.url}
8789
onClick={() => openLightbox(index)}

src/common/components/BugDetail/Priority.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const Priority = ({ bug }: { bug: Bug }) => {
118118
itemToString: (item: DropdownItem) => item && item.slug,
119119
}}
120120
>
121-
<Field>
121+
<Field className="bug-dropdown-custom-priority">
122122
<Select isCompact>
123123
<SelectedItem>
124124
{selectedItem.icon} {selectedItem.text}
@@ -128,7 +128,11 @@ const Priority = ({ bug }: { bug: Bug }) => {
128128
<Menu>
129129
{options &&
130130
options.map((item) => (
131-
<StyledItem key={item.slug} value={item}>
131+
<StyledItem
132+
key={item.slug}
133+
value={item}
134+
className={`bug-dropdown-custom-priority-item-${item.slug.toLowerCase()}`}
135+
>
132136
{item.icon} {item.text}
133137
</StyledItem>
134138
))}

src/common/components/BugDetail/ShareBug.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const ShareButton = ({
5757
}, [isLoading, link, isError]);
5858

5959
return (
60-
<>
60+
<div className="sharable-url-button">
6161
{children ? (
6262
children(setModalIsOpen)
6363
) : (
@@ -67,7 +67,11 @@ export const ShareButton = ({
6767
type="light"
6868
placement="auto"
6969
>
70-
<IconButton size="small" onClick={() => setModalIsOpen(true)}>
70+
<IconButton
71+
size="small"
72+
onClick={() => setModalIsOpen(true)}
73+
className="bug-detail-sharable-url"
74+
>
7175
<ShareIcon />
7276
</IconButton>
7377
</Tooltip>
@@ -108,6 +112,6 @@ export const ShareButton = ({
108112
<ModalClose />
109113
</Modal>
110114
)}
111-
</>
115+
</div>
112116
);
113117
};

src/common/components/BugDetail/Tags.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default ({
7575
/>
7676
) : (
7777
<div
78-
className="max-width-6-sm"
78+
className="max-width-6-sm bug-preview-search-tags"
7979
style={{ opacity: isFetchingCampaignTags ? 0.5 : 1 }}
8080
>
8181
<MultiSelect

src/common/components/BugDetail/VideoCard.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,17 @@ export default ({
4747
index,
4848
url,
4949
onClick,
50+
className,
5051
}: {
5152
index: number;
5253
url: string;
5354
onClick?: () => void;
55+
className?: string;
5456
}) => {
5557
const { t } = useTranslation();
5658

5759
return (
58-
<VideoCard onClick={onClick}>
60+
<VideoCard onClick={onClick} className={className}>
5961
<Preview>
6062
<video
6163
src={url}

src/features/templates/Page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,22 @@ export const Page = ({
3838
route,
3939
excludeMarginTop,
4040
excludeMarginBottom,
41+
className,
4142
}: {
4243
children: React.ReactNode;
4344
title?: string;
4445
pageHeader?: React.ReactNode;
4546
route: string;
4647
excludeMarginTop?: boolean;
4748
excludeMarginBottom?: boolean;
49+
className?: string;
4850
}) => (
4951
<GoogleTagManager title={title}>
5052
<ErrorBoundary>
5153
<Logged route={route} pageHeader={pageHeader}>
5254
<Container
5355
id="container"
56+
className={className}
5457
excludeMarginTop={excludeMarginTop}
5558
excludeMarginBottom={excludeMarginBottom}
5659
>

0 commit comments

Comments
 (0)