Skip to content

Commit 7d83f92

Browse files
authored
Merge pull request #297 from AppQuality/develop
Pull Request triggered from POEditor
2 parents 5843930 + 37d93a8 commit 7d83f92

Some content is hidden

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

61 files changed

+4897
-3376
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.37",
6+
"@appquality/unguess-design-system": "2.12.46",
77
"@headwayapp/react-widget": "^0.0.4",
88
"@reduxjs/toolkit": "^1.8.0",
99
"@rtk-query/codegen-openapi": "^1.0.0-alpha.1",

src/common/components/BugsReportCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const BugsReportCard = ({
6464

6565
<SpecialCard.Footer direction="column" justifyContent="center">
6666
<Button
67-
className="report-btn report-btn-link report-btn-link"
67+
className="report-btn report-btn-download report-btn-bugs-report"
6868
isPill
6969
isStretched
7070
onClick={getReport}

src/common/components/Pill.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ const PillContainer = styled.div`
2424
`;
2525

2626
export const Pill = ({
27+
id,
2728
background,
2829
color,
2930
icon,
3031
title,
3132
children,
3233
}: {
34+
id?: string;
3335
title: string;
3436
background?: string;
3537
color?: string;
3638
icon?: ReactNode;
3739
children?: ReactNode;
3840
}) => (
39-
<PillContainer>
41+
<PillContainer {...(id && { id })}>
4042
<StyledTag isPill hue={background ?? 'white'} size="large">
4143
{icon && <StyledAvatar>{icon}</StyledAvatar>}
4244
<Span isBold style={{ color: color ?? globalTheme.palette.grey[700] }}>

src/common/components/navigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ export const StickyNavItem = styled(Link)`
3737
`;
3838

3939
export const StickyNavItemLabel = styled(MD)`
40-
color: ${({ theme }) => theme.palette.blue[700]};
40+
color: ${({ theme }) => theme.palette.grey[800]};
4141
font-weight: ${({ theme }) => theme.fontWeights.medium};
4242
`;

src/common/schema.ts

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -543,13 +543,19 @@ export interface components {
543543
* @description Returns a list of use case with the number of bugs
544544
*/
545545
WidgetBugsByUseCase: {
546-
data: (components['schemas']['UseCase'] & {
547-
/** @description Unique bugs */
546+
data: {
547+
title: {
548+
full: string;
549+
simple?: string;
550+
prefix?: string;
551+
info?: string;
552+
};
553+
description: string;
554+
uniqueBugs?: number;
548555
bugs: number;
549-
usecase_id: number;
550-
/** Format: float */
551556
usecase_completion?: number;
552-
})[];
557+
usecase_id: number;
558+
}[];
553559
/**
554560
* @default bugsByUseCase
555561
* @example bugsByUseCase
@@ -578,6 +584,17 @@ export interface components {
578584
*/
579585
kind: 'bugsByDevice';
580586
};
587+
/**
588+
* WidgetBugsByDuplicates
589+
* @description Returns the most 10 reported bugs ordered by numberd of duplicates
590+
*/
591+
WidgetBugsByDuplicates: {
592+
data: (components['schemas']['Bug'] & {
593+
duplicates: number;
594+
})[];
595+
/** @enum {string} */
596+
kind: 'bugsByDuplicates';
597+
};
581598
/**
582599
* WidgetCampaignProgress
583600
* @description Used to show an overview about a specific campaign.
@@ -653,9 +670,9 @@ export interface components {
653670
wslug:
654671
| 'bugs-by-usecase'
655672
| 'bugs-by-device'
656-
| 'bugs-by-type'
657673
| 'cp-progress'
658-
| 'unique-bugs';
674+
| 'unique-bugs'
675+
| 'bugs-by-duplicates';
659676
};
660677
requestBodies: {
661678
Credentials: {
@@ -893,7 +910,8 @@ export interface operations {
893910
| components['schemas']['WidgetBugsByUseCase']
894911
| components['schemas']['WidgetBugsByDevice']
895912
| components['schemas']['WidgetCampaignProgress']
896-
| components['schemas']['WidgetCampaignUniqueBugs'];
913+
| components['schemas']['WidgetCampaignUniqueBugs']
914+
| components['schemas']['WidgetBugsByDuplicates'];
897915
};
898916
};
899917
400: components['responses']['Error'];

src/features/api/index.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,17 +296,18 @@ export type GetCampaignsByCidWidgetsApiResponse =
296296
| WidgetBugsByUseCase
297297
| WidgetBugsByDevice
298298
| WidgetCampaignProgress
299-
| WidgetCampaignUniqueBugs;
299+
| WidgetCampaignUniqueBugs
300+
| WidgetBugsByDuplicates;
300301
export type GetCampaignsByCidWidgetsApiArg = {
301302
/** Campaign id */
302303
cid: number;
303304
/** Campaign widget slug */
304305
s:
305306
| 'bugs-by-usecase'
306307
| 'bugs-by-device'
307-
| 'bugs-by-type'
308308
| 'cp-progress'
309-
| 'unique-bugs';
309+
| 'unique-bugs'
310+
| 'bugs-by-duplicates';
310311
/** should update bug trend after request resolves? */
311312
updateTrend?: boolean;
312313
};
@@ -674,11 +675,19 @@ export type Report = {
674675
update_date?: string;
675676
};
676677
export type WidgetBugsByUseCase = {
677-
data: (UseCase & {
678+
data: {
679+
title: {
680+
full: string;
681+
simple?: string;
682+
prefix?: string;
683+
info?: string;
684+
};
685+
description: string;
686+
uniqueBugs?: number;
678687
bugs: number;
679-
usecase_id: number;
680688
usecase_completion?: number;
681-
})[];
689+
usecase_id: number;
690+
}[];
682691
kind: 'bugsByUseCase';
683692
};
684693
export type WidgetBugsByDevice = {
@@ -706,6 +715,12 @@ export type WidgetCampaignUniqueBugs = {
706715
};
707716
kind: 'campaignUniqueBugs';
708717
};
718+
export type WidgetBugsByDuplicates = {
719+
data: (Bug & {
720+
duplicates: number;
721+
})[];
722+
kind: 'bugsByDuplicates';
723+
};
709724
export type Project = {
710725
id: number;
711726
name: string;

src/hooks/useLocalizeDashboardUrl.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,16 @@ export function getLocalizeDashboardRoute(props: CampaignActionProps): string {
3838

3939
return getLocalizedUXDashboardUrl(campaignId, currentLang);
4040
}
41+
42+
export const getLocalizedBugUrl = (
43+
aCampaignId: number,
44+
aBugId: number,
45+
aLanguage: string
46+
): string =>
47+
aLanguage === 'en'
48+
? `${
49+
process.env.REACT_APP_CROWD_WP_URL ?? ''
50+
}/functional-customer-dashboard/?cid=${aCampaignId}&bug_id=${aBugId}`
51+
: `${
52+
process.env.REACT_APP_CROWD_WP_URL ?? ''
53+
}/it/dashboard-campagne-funzionali/?cid=${aCampaignId}&bug_id=${aBugId}`;

src/hooks/useWindowSize.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useLayoutEffect, useState } from 'react';
2+
import { theme } from 'src/app/theme';
23

34
function debounce(callback: () => void, wait: number) {
45
let timer: ReturnType<typeof setTimeout> | undefined;
@@ -15,11 +16,16 @@ export default function useWindowSize() {
1516
const [size, setSize] = useState({
1617
width: window.innerWidth,
1718
height: window.innerHeight,
19+
isMobile: window.innerWidth < parseInt(theme.breakpoints.lg, 10),
1820
});
1921

2022
useLayoutEffect(() => {
2123
const debounceUpdateSize = debounce(() => {
22-
setSize({ width: window.innerWidth, height: window.innerHeight });
24+
setSize({
25+
width: window.innerWidth,
26+
height: window.innerHeight,
27+
isMobile: window.innerWidth < parseInt(theme.breakpoints.lg, 10),
28+
});
2329
}, 300);
2430

2531
window.addEventListener('resize', debounceUpdateSize);

src/locales/en/translation.json

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,23 @@
2222
"__BUG_SEVERITY_LOW": "low",
2323
"__BUG_SEVERITY_MEDIUM": "medium",
2424
"__CAMPAIGN_CARD_EMPTY_TITLE_LABEL": "Untitled",
25-
"__CAMPAIGN_PAGE_BUTTON_DETAIL_BUG": "Go to bug detail",
26-
"__CAMPAIGN_PAGE_BUTTON_DETAIL_MEDIA": "Go to media detail",
25+
"__CAMPAIGN_PAGE_BUTTON_DETAIL_BUG": "Go to bug list",
26+
"__CAMPAIGN_PAGE_BUTTON_DETAIL_MEDIA": "Go to media list",
27+
"__CAMPAIGN_PAGE_DEVICE_AND_BUG_TYPES_SECTION_SUBTITLE": "Check all the isolated bugs organized for devices and OS plus all the bug typologies",
28+
"__CAMPAIGN_PAGE_DEVICE_AND_BUG_TYPES_SECTION_TITLE": "Devices and bug types",
2729
"__CAMPAIGN_PAGE_INFO_HEADER_DESKTOP": "Desktop",
2830
"__CAMPAIGN_PAGE_INFO_HEADER_FROM_DATE_TO_DATE": "<0><0>{{start_date}}</0></0> to <3><0>{{end_date}}</0></3>",
2931
"__CAMPAIGN_PAGE_INFO_HEADER_PLATFORM_SMARTPHONE": "Smartphone",
3032
"__CAMPAIGN_PAGE_INFO_HEADER_PLATFORM_TABLET": "Tablet",
3133
"__CAMPAIGN_PAGE_INFO_HEADER_TEST_TIMING": "Test duration",
32-
"__CAMPAIGN_PAGE_NAVIGATION_BUG_EXTERNAL_LINK_LABEL": "Bug detail",
34+
"__CAMPAIGN_PAGE_NAVIGATION_BUG_EXTERNAL_LINK_LABEL": "Go to bug list",
3335
"__CAMPAIGN_PAGE_NAVIGATION_BUG_GROUP_DETAILS_LABEL": "Details",
3436
"__CAMPAIGN_PAGE_NAVIGATION_BUG_GROUP_OTHER_LABEL": "Others",
3537
"__CAMPAIGN_PAGE_NAVIGATION_BUG_ITEM_DETAILS_DEVICES_LABEL": "Devices and types",
3638
"__CAMPAIGN_PAGE_NAVIGATION_BUG_ITEM_DETAILS_UNIQUE_BUGS_LABEL": "Unique bugs distribution",
3739
"__CAMPAIGN_PAGE_NAVIGATION_BUG_ITEM_OTHER_REPORTS_LABEL": "Reports & attachments",
38-
"__CAMPAIGN_PAGE_NAVIGATION_BUG_ITEM_OVERVIEW_LABEL": "Campaign overview",
39-
"__CAMPAIGN_PAGE_NAVIGATION_MEDIA_EXTERNAL_LINK_LABEL": "Media detail",
40+
"__CAMPAIGN_PAGE_NAVIGATION_BUG_ITEM_OVERVIEW_LABEL": "Overview",
41+
"__CAMPAIGN_PAGE_NAVIGATION_MEDIA_EXTERNAL_LINK_LABEL": "Go to media list",
4042
"__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL": "Download now",
4143
"__CAMPAIGN_PAGE_REPORTS_CARDS_OPEN_LINK_LABEL": "Open link",
4244
"__CAMPAIGN_PAGE_REPORTS_CARDS_UPDATED_ON_LABEL": "Last edit",
@@ -55,22 +57,41 @@
5557
"__CAMPAIGN_PAGE_REPORTS_GENERATE_REPORT_CARD_BUTTON_LABEL": "Download",
5658
"__CAMPAIGN_PAGE_REPORTS_GENERATE_REPORT_CARD_META": "Bugs Report",
5759
"__CAMPAIGN_PAGE_REPORTS_TITLE": "Reports and attachments",
60+
"__CAMPAIGN_PAGE_UNIQUE_BUGS_SECTION_SUBTITLE": "Check all the isolated bugs organized for Use Cases and don't miss any incoming bugs",
61+
"__CAMPAIGN_PAGE_UNIQUE_BUGS_SECTION_TITLE": "Unique Bugs distribution",
5862
"__CAMPAIGN_PAGE_UNIQUE_BUGS_TITLE": "Unique bugs",
5963
"__CAMPAIGN_PAGE_UPDATE_CAMPAIGN_NAME_ERROR": "Error",
60-
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_CARD_TITLE": "Stato avanzamento",
64+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_DEVICE_CHART_HEADER": "Tot. bugs",
65+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_DEVICE_CHART_TOOLTIP_DRILLDOWN": "👉 Drill down to:",
66+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_DEVICE_CHART_TOOLTIP_VALUE": "Bugs: {{value}}",
67+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_DEVICE_LIST_COLUMN_LEFT": "Device",
68+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_DEVICE_LIST_COLUMN_RIGHT": "Bugs tot.",
69+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_DEVICE_LIST_HEADER_LABEL": "Total",
70+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_DEVICE_LIST_TITLE": "{{total}} <2>total bugs</2>",
71+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_OS_AND_DEVICE_CARD_TITLE": "Total bugs by device and OS",
72+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE": "others",
73+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_CARD_TITLE": "Unique bugs by Use Case",
74+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_CHART_HEADER": "Tot. bugs",
75+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_COLUMN_LEFT": "Use Case",
76+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_COLUMN_RIGHT": "Bugs tot.",
77+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_LIST_CONTENT": "total bugs",
78+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_LIST_HEADER": "Total",
79+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_TOOLTIP_UNIQUE_BUGS_LABEL": "Unique bugs:",
80+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_TOOLTIP_USECASE_LABEL": "Use Case: ",
81+
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_CARD_TITLE": "Status",
6182
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_CARD_TOOLTIP": "This widget shows the progress of the campaign's tasks",
62-
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_DESCRIPTION_FOOTER": "over <1>{{expectedDuration}} expected</1>",
83+
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_DESCRIPTION_FOOTER": "over <bold>{{ expectedDuration }}</bold> expected",
6384
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_DESCRIPTION_HEADER_ACTIVE": "Active since:",
6485
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_DESCRIPTION_HEADER_FINISHED": "Campaign duration:",
6586
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_FOOTER": "Test duration: {{startDate}} to {{endDate}}",
6687
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_TIME_BULLET_TITLE": "Time passed",
6788
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_USECASE_BULLET_TITLE": "Use Case completion",
68-
"__CAMPAIGN_PAGE_WIDGET_TITLE": "Campaign Overview",
89+
"__CAMPAIGN_PAGE_WIDGET_TITLE": "Overview",
6990
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_COUNT_LABEL_one": "{{count}} <bold>unique bug</bold>",
7091
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_COUNT_LABEL_other": "{{count}} <bold>unique bugs</bold>",
7192
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_REPORTED_BY": "Reported by testers:",
7293
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_TOOLTIP": "Monitor unique bugs reported only once by a single tester or a series of bugs reported by different testers, which we organize into duplicate bug groups",
73-
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_TOTAL_LABEL": "out of <bold>{{ total }}</bold>",
94+
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_TOTAL_LABEL": "out of <bold>{{ total }}</bold> total",
7495
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_TREND_EQUAL_LABEL": "Stable situation",
7596
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_TREND_LABEL_one": "unique bug",
7697
"__CAMPAIGN_PAGE_WIDGET_UNIQUE_BUGS_TREND_LABEL_other": "unique bugs",
@@ -82,8 +103,18 @@
82103
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_GOTOLIST_LINK": "Go to bug list",
83104
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_HEADER": "{{severity}} bugs",
84105
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOOLTIP": "Discover the impact of the unique bugs on your product. These indications keep in mind both the context and the conditions where testers have tracked the bug and help you understand the bug severity.",
85-
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_one": "out of {{total}}",
86-
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_other": "out of {{total}}",
106+
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_one": "out of <bold>{{total}}</bold> unique",
107+
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_other": "out of <bold>{{total}}</bold> unique",
108+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_EXTERNAL_LINK_LABEL": "Go to bug list",
109+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_HEADER": "Incoming bugs",
110+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_MOST_SUBMITTED_DESCRIPTION": "Le issue che si sono verificate più volte",
111+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_MOST_SUBMITTED_DUPLICATES_LABEL": "Duplicates",
112+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_MOST_SUBMITTED_TAB_TITLE": "Most submitted",
113+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_TOOLTIP": "Read our tester's descriptions on the bugs they have found: in the \"Most submitted\" tab you can see the most reported bugs, while in the \"Unread\" tab you can see the bugs that you have not read yet.",
114+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_UNREAD": "Unread",
115+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_UNREAD_DESCRIPTION": "Unread bugs grouped by use case, from the most recent",
116+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_UNREAD_NO_BUGS": "Congratulations, you have read all the bugs!",
117+
"__CAMPAIGN_WIDGET_INCOMING_BUGS_UNREAD_TAB_TITLE": "Unread",
87118
"__CAMPAIGNS_TABLE_COLUMN_CAMPAIGN_TYPE": "Campaign Type",
88119
"__CAMPAIGNS_TABLE_COLUMN_NAME": "Name",
89120
"__CAMPAIGNS_TABLE_COLUMN_START_DATE": "Start Date",
@@ -182,7 +213,7 @@
182213
"__EXPRESS_3_WIZARD_STEP_WHO_GENDER_MALE_PLURAL": "men",
183214
"__EXPRESS_3_WIZARD_STEP_WHO_LABEL_SELECTION_CRITERIA": "Specify selection criteria for the 6 users who will browse your product",
184215
"__EXPRESS_3_WIZARD_STEP_WHO_LITERACY_BEGINNER": "Beginner",
185-
"__EXPRESS_3_WIZARD_STEP_WHO_LITERACY_BEGINNER_DESCRIPTION": "This tester has no autonomy, needs help from family and friens",
216+
"__EXPRESS_3_WIZARD_STEP_WHO_LITERACY_BEGINNER_DESCRIPTION": "This tester has no autonomy, needs help from family and friends",
186217
"__EXPRESS_3_WIZARD_STEP_WHO_LITERACY_EXPERT": "Expert",
187218
"__EXPRESS_3_WIZARD_STEP_WHO_LITERACY_EXPERT_DESCRIPTION": "Completely autonomous in any digital product use",
188219
"__EXPRESS_3_WIZARD_STEP_WHO_LITERACY_INTERMEDIATE": "Intermediate",
@@ -226,7 +257,7 @@
226257
"__EXPRESS_4_WIZARD_STEP_WHO_GENDER_MALE_PLURAL": "men",
227258
"__EXPRESS_4_WIZARD_STEP_WHO_LABEL_SELECTION_CRITERIA": "Specify selection criteria for the 6 users who will browse your product",
228259
"__EXPRESS_4_WIZARD_STEP_WHO_LITERACY_BEGINNER": "Beginner",
229-
"__EXPRESS_4_WIZARD_STEP_WHO_LITERACY_BEGINNER_DESCRIPTION": "This tester has no autonomy, needs help from family and friens",
260+
"__EXPRESS_4_WIZARD_STEP_WHO_LITERACY_BEGINNER_DESCRIPTION": "This tester has no autonomy, needs help from family and friends",
230261
"__EXPRESS_4_WIZARD_STEP_WHO_LITERACY_EXPERT": "Expert",
231262
"__EXPRESS_4_WIZARD_STEP_WHO_LITERACY_EXPERT_DESCRIPTION": "Completely autonomous in any digital product use",
232263
"__EXPRESS_4_WIZARD_STEP_WHO_LITERACY_INTERMEDIATE": "Intermediate",

0 commit comments

Comments
 (0)