Skip to content

Commit 6c6bf26

Browse files
authored
Merge branch 'develop' into i18n-translations
2 parents 3f476f6 + da0eebb commit 6c6bf26

File tree

35 files changed

+779
-704
lines changed

35 files changed

+779
-704
lines changed

.github/workflows/push.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,6 @@ jobs:
5151
echo "##[set-output name=img_tag;]$TAG"
5252
id: extract_image_tag
5353

54-
- name: Extract env name
55-
shell: bash
56-
run: |
57-
TAG=$(echo ${{ steps.extract_repo_branch.outputs.branch }})
58-
if [ "$TAG" != "master" ]; then
59-
TAG="development"
60-
else
61-
TAG="production"
62-
fi
63-
echo "##[set-output name=img_env;]$TAG"
64-
id: extract_env_tag
65-
6654
- name: Configure AWS credentials
6755
uses: aws-actions/configure-aws-credentials@13d241b293754004c80624b5567555c4a39ffbe3
6856
with:
@@ -84,6 +72,9 @@ jobs:
8472
# Build a docker container and
8573
# push it to ECR so that it can
8674
# be deployed to ECS.
87-
docker build --build-arg STRAPI_TOKEN=${{ secrets.STRAPI_TOKEN }} --build-arg STAGE_ENV=${{ steps.extract_env_tag.outputs.img_env }} -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
75+
docker build \
76+
--build-arg STRAPI_TOKEN=${{ secrets.STRAPI_TOKEN }} \
77+
--build-arg STAGE_ENV="development" \
78+
-t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
8879
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
8980
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

.github/workflows/release.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77

88
env:
99
ECR_REPOSITORY: unguess-react
10-
DEPLOY_PROD_BUCKET: unguess-app-staging-source
11-
DEPLOY_PROD_KEY: unguess-app-react-staging-pipeline/source.zip
10+
DEPLOY_PROD_BUCKET: unguess-app-production-source
11+
DEPLOY_PROD_KEY: unguess-app-react-production-pipeline/source.zip
1212
ASG_NAME: unguess-app-asg-unguess-app-react-production
1313
PIPELINE: unguess-app-react-production-pipeline-pipeline
1414

@@ -28,15 +28,32 @@ jobs:
2828
echo "##[set-output name=ECR_REPOSITORY;]$ECR_REPOSITORY"
2929
id: extract_tag
3030

31-
- name: Docker ECR
32-
uses: kciter/aws-ecr-action@v2
31+
- name: Configure AWS credentials
32+
uses: aws-actions/configure-aws-credentials@13d241b293754004c80624b5567555c4a39ffbe3
3333
with:
34-
access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
35-
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
36-
account_id: ${{ secrets.AWS_ACCOUNT_ID }}
37-
region: eu-west-1
38-
repo: ${{ steps.extract_tag.outputs.ECR_REPOSITORY }}
39-
tags: ${{ steps.extract_tag.outputs.tag }}
34+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
35+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
36+
aws-region: eu-west-1
37+
38+
- name: Login to Amazon ECR
39+
id: login-ecr
40+
uses: aws-actions/amazon-ecr-login@aaf69d68aa3fb14c1d5a6be9ac61fe15b48453a2
41+
42+
- name: Docker ECR
43+
id: build-image
44+
env:
45+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
46+
ECR_REPOSITORY: ${{ steps.extract_tag.outputs.ECR_REPOSITORY }}
47+
IMAGE_TAG: ${{ steps.extract_tag.outputs.tag }}
48+
run: |
49+
# Build a docker container and
50+
# push it to ECR so that it can
51+
# be deployed to ECS.
52+
docker build \
53+
--build-arg STRAPI_TOKEN=${{ secrets.STRAPI_TOKEN }} \
54+
--build-arg STAGE_ENV="production" \
55+
-t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
56+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
4057
4158
release-to-prod:
4259
name: Release to production

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.47",
6+
"@appquality/unguess-design-system": "2.12.50",
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/openUrl.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const openUrl = (url: string, options?: { newTab: boolean }): void => {
2+
// eslint-disable-next-line security/detect-non-literal-fs-filename
3+
window.open(url, options && options.newTab ? '_blank' : undefined);
4+
};
5+
6+
export { openUrl };

src/features/navigation/Navigation.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ export const Navigation = ({
259259
// dispatch(setWorkspace(workspace));
260260
// window.location.reload();
261261
},
262+
onClick: () => navigateTo('home'),
262263
}}
263264
avatar={{
264265
avatarType: user.picture ? 'image' : 'text',

src/locales/en/translation.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
"__CAMPAIGN_PAGE_DEVICE_AND_BUG_TYPES_SECTION_SUBTITLE": "Check all the isolated bugs organized for devices and OS plus all the bug typologies",
3838
"__CAMPAIGN_PAGE_DEVICE_AND_BUG_TYPES_SECTION_TITLE": "Devices and bug types",
3939
"__CAMPAIGN_PAGE_INFO_HEADER_DESKTOP": "Desktop",
40-
"__CAMPAIGN_PAGE_INFO_HEADER_FROM_DATE_TO_DATE": "<0><0>{{start_date}}</0></0> to <3><0>{{end_date}}</0></3>",
40+
"__CAMPAIGN_PAGE_INFO_HEADER_FROM_DATE_TO_DATE": "<0><0>{{start_date}}</0></0> <3><0>{{end_date}}</0></3>",
4141
"__CAMPAIGN_PAGE_INFO_HEADER_PLATFORM_SMARTPHONE": "Smartphone",
42-
"__CAMPAIGN_PAGE_INFO_HEADER_PLATFORM_TABLET": "Tablet",
4342
"__CAMPAIGN_PAGE_INFO_HEADER_TEST_TIMING": "Test duration",
4443
"__CAMPAIGN_PAGE_NAVIGATION_BUG_EXTERNAL_LINK_LABEL": "Go to bug list",
4544
"__CAMPAIGN_PAGE_NAVIGATION_BUG_GROUP_DETAILS_LABEL": "Details",
@@ -123,7 +122,6 @@
123122
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_one": "out of <bold>{{total}}</bold> unique",
124123
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_other": "out of <bold>{{total}}</bold> unique",
125124
"__CAMPAIGN_WIDGET_BUGS_BY_TYPE_HEADER": "Bug distribution by typology",
126-
"__CAMPAIGN_WIDGET_BUGS_BY_TYPE_TOOLTIP": " ",
127125
"__CAMPAIGN_WIDGET_INCOMING_BUGS_EXTERNAL_LINK_LABEL": "Go to bug list",
128126
"__CAMPAIGN_WIDGET_INCOMING_BUGS_HEADER": "Incoming bugs",
129127
"__CAMPAIGN_WIDGET_INCOMING_BUGS_MOST_SUBMITTED_DESCRIPTION": "Le issue che si sono verificate più volte",

src/locales/it/translation.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
"__CAMPAIGN_PAGE_DEVICE_AND_BUG_TYPES_SECTION_SUBTITLE": "Visualizza i bug unici divisi per dispositivi e sistemi operativi e le tipologie di tutti i bug segnalati",
3838
"__CAMPAIGN_PAGE_DEVICE_AND_BUG_TYPES_SECTION_TITLE": "Dispositivi e tipologie bug",
3939
"__CAMPAIGN_PAGE_INFO_HEADER_DESKTOP": "Desktop",
40-
"__CAMPAIGN_PAGE_INFO_HEADER_FROM_DATE_TO_DATE": "<0><0>{{start_date}}</0></0> to <3><0>{{end_date}}</0></3>",
40+
"__CAMPAIGN_PAGE_INFO_HEADER_FROM_DATE_TO_DATE": "<0><0>{{start_date}}</0></0> <3><0>{{end_date}}</0></3>",
4141
"__CAMPAIGN_PAGE_INFO_HEADER_PLATFORM_SMARTPHONE": "Smartphone",
42-
"__CAMPAIGN_PAGE_INFO_HEADER_PLATFORM_TABLET": "Tablet",
4342
"__CAMPAIGN_PAGE_INFO_HEADER_TEST_TIMING": "Durata test",
4443
"__CAMPAIGN_PAGE_NAVIGATION_BUG_EXTERNAL_LINK_LABEL": "Dettaglio bug",
4544
"__CAMPAIGN_PAGE_NAVIGATION_BUG_GROUP_DETAILS_LABEL": "APPROFONDISCI",
@@ -49,8 +48,8 @@
4948
"__CAMPAIGN_PAGE_NAVIGATION_BUG_ITEM_OTHER_REPORTS_LABEL": "Report e documenti",
5049
"__CAMPAIGN_PAGE_NAVIGATION_BUG_ITEM_OVERVIEW_LABEL": "Panoramica",
5150
"__CAMPAIGN_PAGE_NAVIGATION_MEDIA_EXTERNAL_LINK_LABEL": "Dettaglio media",
52-
"__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL": "Download now",
53-
"__CAMPAIGN_PAGE_REPORTS_CARDS_OPEN_LINK_LABEL": "Open link",
51+
"__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL": "Scarica ora",
52+
"__CAMPAIGN_PAGE_REPORTS_CARDS_OPEN_LINK_LABEL": "Apri link",
5453
"__CAMPAIGN_PAGE_REPORTS_CARDS_UPDATED_ON_LABEL": "Ultima modifica:",
5554
"__CAMPAIGN_PAGE_REPORTS_CARDS_UPLOADED_ON_LABEL": "Caricato il",
5655
"__CAMPAIGN_PAGE_REPORTS_DESCRIPTION": "Qui puoi trovare tutti i materiali relativi alla tua campagna",
@@ -82,19 +81,19 @@
8281
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_TYPE_LIST_COLUMN_LEFT": "Tipologia",
8382
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_TYPE_LIST_COLUMN_RIGHT": "Bug / Totale",
8483
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_TYPE_LIST_HEADER_LABEL": "Distribuzione bug per tipologia",
85-
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_TYPE_LIST_TITLE": "{{total}} <2>bug unici</2>",
86-
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE": "others",
84+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_TYPE_LIST_TITLE": "{{total}} <2>bug totali</2>",
85+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE": "altri",
8786
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_CARD_TITLE": "Bug unici per Use Case",
8887
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_CHART_HEADER": "Tot. bug",
8988
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_COLUMN_LEFT": "Use Case",
9089
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_COLUMN_RIGHT": "Bug / Totale",
9190
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_LIST_CONTENT": "bug totali",
9291
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_LIST_HEADER": "I tester hanno segnalato",
93-
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_TOOLTIP_UNIQUE_BUGS_LABEL": "Unique bugs:",
92+
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_TOOLTIP_UNIQUE_BUGS_LABEL": "Bug unici:",
9493
"__CAMPAIGN_PAGE_WIDGET_BUGS_BY_USECASE_TOOLTIP_USECASE_LABEL": "Use Case: ",
9594
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_CARD_TITLE": "Stato",
9695
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_CARD_TOOLTIP": "Tieni sotto controllo gli use case completati dai tester, quanto tempo è passato dall’inizio della campagna e quanto manca alla fine.",
97-
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_DESCRIPTION_FOOTER": "over <bold>{{ expectedDuration }}</bold> expected",
96+
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_DESCRIPTION_FOOTER": "su un totale stimato di <bold>{{ expectedDuration }}</bold>",
9897
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_DESCRIPTION_HEADER_ACTIVE": "La campagna è attiva da:",
9998
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_DESCRIPTION_HEADER_FINISHED": "La campagna è stata attiva per:",
10099
"__CAMPAIGN_PAGE_WIDGET_PROGRESS_FOOTER": "Da {{startDate}} → {{endDate}}",
@@ -119,11 +118,10 @@
119118
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_GOTOLIST_LINK": "Vai alla lista bug",
120119
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_HEADER": "bug {{severity}}",
121120
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOOLTIP": "Scopri l’impatto dei bug unici sull’uso del tuo prodotto. Queste indicazioni tengono conto del contesto e delle condizioni in cui i tester hanno riscontrato il problema e ti aiutano a capire la gravità del bug.",
122-
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_many": "out of <bold>{{total}}</bold> unique",
123-
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_one": "out of <bold>{{total}}</bold> unique",
124-
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_other": "out of <bold>{{total}}</bold> unique",
121+
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_one": "su <bold>{{total}}</bold> unico",
122+
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_many": "su <bold>{{total}}</bold> unici",
123+
"__CAMPAIGN_WIDGET_BUGDISTRIBUTION_TOTAL_LABEL_other": "su <bold>{{total}}</bold> unici",
125124
"__CAMPAIGN_WIDGET_BUGS_BY_TYPE_HEADER": "Distribuzione bug per tipologia",
126-
"__CAMPAIGN_WIDGET_BUGS_BY_TYPE_TOOLTIP": "",
127125
"__CAMPAIGN_WIDGET_INCOMING_BUGS_EXTERNAL_LINK_LABEL": "Vai alla lista bug",
128126
"__CAMPAIGN_WIDGET_INCOMING_BUGS_HEADER": "Bug in arrivo",
129127
"__CAMPAIGN_WIDGET_INCOMING_BUGS_MOST_SUBMITTED_DESCRIPTION": "Le issue che si sono verificate più volte",

src/pages/Campaign/ReportRow.tsx

Lines changed: 84 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -85,85 +85,93 @@ export const ReportRow = ({
8585
const { id: campaignId, customer_title } = campaign;
8686

8787
return (
88-
<Row id="reports" style={{ marginBottom: theme.space.xxl }}>
89-
{(reports && reports.length) || isFunctional ? (
90-
<Col xs={12}>
91-
<SectionTitle
92-
title={t('__CAMPAIGN_PAGE_REPORTS_TITLE')}
93-
subtitle={t('__CAMPAIGN_PAGE_REPORTS_DESCRIPTION')}
94-
/>
95-
</Col>
96-
) : null}
97-
{isFunctional && (
98-
<Col xs={12} md={4} lg={3}>
99-
<BugsReportCard campaignId={campaignId} title={customer_title} />
100-
</Col>
101-
)}
102-
{reports && reports.length
103-
? reports.map((report) => (
104-
<Col xs={12} md={4} lg={3}>
105-
<SpecialCard>
106-
<SpecialCard.Meta
107-
justifyContent="start"
108-
style={{ fontSize: theme.fontSizes.sm }}
109-
>
110-
{report.update_date ? (
111-
<>
112-
{t('__CAMPAIGN_PAGE_REPORTS_CARDS_UPDATED_ON_LABEL')}{' '}
113-
{format(new Date(report.update_date), 'dd/MM/yyyy')}
114-
</>
115-
) : (
116-
<>
117-
{t('__CAMPAIGN_PAGE_REPORTS_CARDS_UPLOADED_ON_LABEL')}{' '}
118-
{format(
119-
new Date(report.creation_date ?? ''),
120-
'dd/MM/yyyy'
121-
)}
122-
</>
123-
)}
124-
</SpecialCard.Meta>
88+
<div style={{ minHeight: '100vh' }}>
89+
<Row id="reports">
90+
{(reports && reports.length) || isFunctional ? (
91+
<Col xs={12}>
92+
<SectionTitle
93+
title={t('__CAMPAIGN_PAGE_REPORTS_TITLE')}
94+
subtitle={t('__CAMPAIGN_PAGE_REPORTS_DESCRIPTION')}
95+
/>
96+
</Col>
97+
) : null}
98+
{isFunctional && (
99+
<Col xs={12} md={4} lg={3}>
100+
<BugsReportCard campaignId={campaignId} title={customer_title} />
101+
</Col>
102+
)}
103+
{reports && reports.length
104+
? reports.map((report) => (
105+
<Col xs={12} md={4} lg={3}>
106+
<SpecialCard>
107+
<SpecialCard.Meta
108+
justifyContent="start"
109+
style={{ fontSize: theme.fontSizes.sm }}
110+
>
111+
{report.update_date ? (
112+
<>
113+
{t('__CAMPAIGN_PAGE_REPORTS_CARDS_UPDATED_ON_LABEL')}{' '}
114+
{format(new Date(report.update_date), 'dd/MM/yyyy')}
115+
</>
116+
) : (
117+
<>
118+
{t('__CAMPAIGN_PAGE_REPORTS_CARDS_UPLOADED_ON_LABEL')}{' '}
119+
{format(
120+
new Date(report.creation_date ?? ''),
121+
'dd/MM/yyyy'
122+
)}
123+
</>
124+
)}
125+
</SpecialCard.Meta>
125126

126-
<SpecialCard.Thumb>
127-
{getFileTypeIcon(report.file_type?.type ?? '', report.url)}
128-
</SpecialCard.Thumb>
127+
<SpecialCard.Thumb>
128+
{getFileTypeIcon(report.file_type?.type ?? '', report.url)}
129+
</SpecialCard.Thumb>
129130

130-
<SpecialCard.Header>
131-
<SpecialCard.Header.Label>
132-
{getFileTypeName(report.file_type?.type ?? '', report.url)}
133-
</SpecialCard.Header.Label>
134-
<SpecialCard.Header.Title>
135-
{report.title}
136-
</SpecialCard.Header.Title>
137-
</SpecialCard.Header>
131+
<SpecialCard.Header>
132+
<SpecialCard.Header.Label>
133+
{getFileTypeName(
134+
report.file_type?.type ?? '',
135+
report.url
136+
)}
137+
</SpecialCard.Header.Label>
138+
<SpecialCard.Header.Title>
139+
{report.title}
140+
</SpecialCard.Header.Title>
141+
</SpecialCard.Header>
138142

139-
<SpecialCard.Footer direction="column" justifyContent="center">
140-
<Button
141-
className={`report-btn report-btn-${
142-
report.file_type?.type === 'link' ? 'link' : 'download'
143-
} report-btn-${report.file_type?.type ?? ''}`}
144-
isPill
145-
isStretched
146-
onClick={() => {
147-
// eslint-disable-next-line security/detect-non-literal-fs-filename
148-
window.open(report.url || '', '_blank');
149-
}}
143+
<SpecialCard.Footer
144+
direction="column"
145+
justifyContent="center"
150146
>
151-
<Button.StartIcon>
152-
{report.file_type?.type === 'link' ? (
153-
<OpenLinkIcon />
154-
) : (
155-
<DownloadIcon />
156-
)}
157-
</Button.StartIcon>
158-
{report.file_type?.type === 'link'
159-
? t('__CAMPAIGN_PAGE_REPORTS_CARDS_OPEN_LINK_LABEL')
160-
: t('__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL')}
161-
</Button>
162-
</SpecialCard.Footer>
163-
</SpecialCard>
164-
</Col>
165-
))
166-
: null}
167-
</Row>
147+
<Button
148+
className={`report-btn report-btn-${
149+
report.file_type?.type === 'link' ? 'link' : 'download'
150+
} report-btn-${report.file_type?.type ?? ''}`}
151+
isPill
152+
isStretched
153+
onClick={() => {
154+
// eslint-disable-next-line security/detect-non-literal-fs-filename
155+
window.open(report.url || '', '_blank');
156+
}}
157+
>
158+
<Button.StartIcon>
159+
{report.file_type?.type === 'link' ? (
160+
<OpenLinkIcon />
161+
) : (
162+
<DownloadIcon />
163+
)}
164+
</Button.StartIcon>
165+
{report.file_type?.type === 'link'
166+
? t('__CAMPAIGN_PAGE_REPORTS_CARDS_OPEN_LINK_LABEL')
167+
: t('__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL')}
168+
</Button>
169+
</SpecialCard.Footer>
170+
</SpecialCard>
171+
</Col>
172+
))
173+
: null}
174+
</Row>
175+
</div>
168176
);
169177
};

0 commit comments

Comments
 (0)