Skip to content

Commit ade0d04

Browse files
authored
Merge pull request #552 from AppQuality/UN-587-dev-dashboard-2-lev-missing-tooltips
UN-587-dev-dashboard-2-lev-missing-tooltips
2 parents 21e4324 + 8ad5b41 commit ade0d04

File tree

5 files changed

+64
-14
lines changed

5 files changed

+64
-14
lines changed

src/common/components/BugDetail/AnchorButtons.tsx

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import styled from 'styled-components';
22
import { Link } from 'react-scroll';
3-
import { IconButton } from '@appquality/unguess-design-system';
3+
import { IconButton, Tooltip } from '@appquality/unguess-design-system';
44
import { GetCampaignsByCidBugsAndBidApiResponse } from 'src/features/api';
55
import { ReactComponent as AttachmentsIcon } from 'src/assets/icons/attachments-icon.svg';
66
import { ReactComponent as DetailsIcon } from 'src/assets/icons/details-icon.svg';
77
import { ReactComponent as LinkIcon } from 'src/assets/icons/linked.svg';
88
import { useBugPreviewContext } from 'src/pages/Bugs/Content/context/BugPreviewContext';
9+
import { useTranslation } from 'react-i18next';
910

1011
const FlexComponent = styled.div`
1112
width: 100%;
@@ -25,6 +26,7 @@ export const AnchorButtons = ({
2526
}) => {
2627
const { media } = bug;
2728
const { openAccordions, setOpenAccordions } = useBugPreviewContext();
29+
const { t } = useTranslation();
2830

2931
return (
3032
<FlexComponent>
@@ -36,9 +38,19 @@ export const AnchorButtons = ({
3638
duration={500}
3739
offset={-50}
3840
>
39-
<IconButton size="small">
40-
<AttachmentsIcon />
41-
</IconButton>
41+
<Tooltip
42+
content={t('__BUGS_PREVIEW_MEDIA_TOOLTIP_TEXT')}
43+
placement="bottom"
44+
type="light"
45+
size="medium"
46+
onClick={(e) => {
47+
e.stopPropagation();
48+
}}
49+
>
50+
<IconButton size="small">
51+
<AttachmentsIcon />
52+
</IconButton>
53+
</Tooltip>
4254
</Link>
4355
)}
4456

@@ -52,9 +64,19 @@ export const AnchorButtons = ({
5264
setOpenAccordions([...openAccordions, 'details']);
5365
}}
5466
>
55-
<IconButton size="small">
56-
<DetailsIcon />
57-
</IconButton>
67+
<Tooltip
68+
content={t('__BUGS_PREVIEW_TAG_TOOLTIP_TEXT')}
69+
placement="bottom"
70+
type="light"
71+
size="medium"
72+
onClick={(e) => {
73+
e.stopPropagation();
74+
}}
75+
>
76+
<IconButton size="small">
77+
<DetailsIcon />
78+
</IconButton>
79+
</Tooltip>
5880
</Link>
5981

6082
<Link
@@ -67,9 +89,19 @@ export const AnchorButtons = ({
6789
setOpenAccordions([...openAccordions, 'duplicates']);
6890
}}
6991
>
70-
<IconButton size="small">
71-
<LinkIcon />
72-
</IconButton>
92+
<Tooltip
93+
content={t('__BUGS_PREVIEW_RELATED_BUGS_TOOLTIP_TEXT')}
94+
placement="bottom"
95+
type="light"
96+
size="medium"
97+
onClick={(e) => {
98+
e.stopPropagation();
99+
}}
100+
>
101+
<IconButton size="small">
102+
<LinkIcon />
103+
</IconButton>
104+
</Tooltip>
73105
</Link>
74106
</FlexComponent>
75107
);

src/locales/en/translation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@
194194
"__BUGS_TABLE_PRIORITY_HEADER_COLUMN": "Priority",
195195
"__BUGS_TABLE_SEVERITY_HEADER_COLUMN": "Severity",
196196
"__BUGS_TABLE_TITLE_HEADER_COLUMN": "Bug",
197+
"__BUGS_TABLE_DUPLICATE_TOOLTIP_TEXT": "This icon indicates unique bugs",
198+
"__BUGS_PREVIEW_MEDIA_TOOLTIP_TEXT": "Attachments",
199+
"__BUGS_PREVIEW_TAG_TOOLTIP_TEXT": "Details",
200+
"__BUGS_PREVIEW_RELATED_BUGS_TOOLTIP_TEXT": "Related bugs",
197201
"__BUGS_TAGS_FILTER_ITEM_NO_ITEMS": "Tag",
198202
"__BUGS_TAGS_FILTER_ITEM_NO_TAGS": "No tags",
199203
"__BUGS_TYPES_FILTER_ITEM_NO_ITEMS": "Typology",

src/locales/it/translation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@
194194
"__BUGS_TABLE_PRIORITY_HEADER_COLUMN": "Priorità",
195195
"__BUGS_TABLE_SEVERITY_HEADER_COLUMN": "Gravità",
196196
"__BUGS_TABLE_TITLE_HEADER_COLUMN": "Bug",
197+
"__BUGS_TABLE_DUPLICATE_TOOLTIP_TEXT": "Questa icona segnala i bug unici",
198+
"__BUGS_PREVIEW_MEDIA_TOOLTIP_TEXT": "Allegati",
199+
"__BUGS_PREVIEW_TAG_TOOLTIP_TEXT": "Dettagli",
200+
"__BUGS_PREVIEW_RELATED_BUGS_TOOLTIP_TEXT": "Bug collegati",
197201
"__BUGS_TAGS_FILTER_ITEM_NO_ITEMS": "Tag",
198202
"__BUGS_TAGS_FILTER_ITEM_NO_TAGS": "Nessun tag",
199203
"__BUGS_TYPES_FILTER_ITEM_NO_ITEMS": "Tipologia",

src/pages/Bugs/Content/BugPreview.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const DetailContainer = styled.div<{
2929
100vh - ${({ theme }) => theme.components.chrome.header.height} -
3030
${filtersHeight}px
3131
);
32-
overflow: hidden;
3332
3433
${(p) =>
3534
p.isFetching &&

src/pages/Bugs/Content/BugsTable/utils/mapBugsToTableData.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const AlignmentDiv = styled.div`
2020
justify-content: ${(props: { alignment?: TextAlign }) =>
2121
props.alignment || 'center'};
2222
align-items: center;
23+
cursor: pointer;
2324
`;
2425

2526
const CustomTag = styled(Tag)`
@@ -52,9 +53,19 @@ export const mapBugsToTableData = (bugs: TableBugType[]) => {
5253
<AlignmentDiv alignment="center">
5354
<CustomTag isPill={false} hue="rgba(0,0,0,0)" isRegular={!isPillBold}>
5455
{!bug.duplicated_of_id && (
55-
<Tag.Avatar>
56-
<FatherIcon />
57-
</Tag.Avatar>
56+
<AlignmentDiv alignment="start">
57+
<Tooltip
58+
content={t('__BUGS_TABLE_DUPLICATE_TOOLTIP_TEXT')}
59+
placement="bottom"
60+
type="light"
61+
size="medium"
62+
onClick={(e) => {
63+
e.stopPropagation();
64+
}}
65+
>
66+
<FatherIcon />
67+
</Tooltip>
68+
</AlignmentDiv>
5869
)}
5970
{bug.siblings > 0 && `+${bug.siblings}`}
6071
</CustomTag>

0 commit comments

Comments
 (0)