From 65fb17a77186896e630960f0ed7d0713def893f1 Mon Sep 17 00:00:00 2001 From: Luca Cannarozzo Date: Fri, 5 Jan 2024 18:48:18 +0100 Subject: [PATCH 1/9] New translations translation.json (Italian) --- src/locales/it/translation.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index 9a44589fb..d046dbc0b 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -28,8 +28,8 @@ "__BUG_COMMENTS_CHAT_CANCEL__": "Annulla", "__BUG_COMMENTS_CHAT_CONFIRM__": "Invia", "__BUG_COMMENTS_CHAT_DELETE__": "Elimina", - "__BUG_COMMENTS_CHAT_HEADER__": "Comunica con UNGUESS e il tuo team", - "__BUG_COMMENTS_CHAT_PLACEHOLDER": "Scrivi e condividi la tua opinione o un feedback", + "__BUG_COMMENTS_CHAT_HEADER__": "Talk to your Team and UNGUESS", + "__BUG_COMMENTS_CHAT_PLACEHOLDER": "Share your comment", "__BUG_COMMENTS_DELETE_MODAL_BODY__": "Se lo elimini, non comparirà più tra i commenti.", "__BUG_COMMENTS_DELETE_MODAL_CANCEL__": "Torna al commento", "__BUG_COMMENTS_DELETE_MODAL_DELETE__": "Elimina", From fb5f3601cea00625a00bc0fb861b556e0f73e88d Mon Sep 17 00:00:00 2001 From: Luca Cannarozzo Date: Mon, 8 Jan 2024 09:54:44 +0100 Subject: [PATCH 2/9] New translations translation.json (Italian) --- src/locales/it/translation.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index d046dbc0b..868284c78 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -28,8 +28,8 @@ "__BUG_COMMENTS_CHAT_CANCEL__": "Annulla", "__BUG_COMMENTS_CHAT_CONFIRM__": "Invia", "__BUG_COMMENTS_CHAT_DELETE__": "Elimina", - "__BUG_COMMENTS_CHAT_HEADER__": "Talk to your Team and UNGUESS", - "__BUG_COMMENTS_CHAT_PLACEHOLDER": "Share your comment", + "__BUG_COMMENTS_CHAT_HEADER__": "Comunica con UNGUESS e il tuo team", + "__BUG_COMMENTS_CHAT_PLACEHOLDER": "Condividi la tua opinione", "__BUG_COMMENTS_DELETE_MODAL_BODY__": "Se lo elimini, non comparirà più tra i commenti.", "__BUG_COMMENTS_DELETE_MODAL_CANCEL__": "Torna al commento", "__BUG_COMMENTS_DELETE_MODAL_DELETE__": "Elimina", From 622a50908a621e266f1a801d47f2a1e81bb16f6c Mon Sep 17 00:00:00 2001 From: ZecD Date: Mon, 8 Jan 2024 18:08:48 +0100 Subject: [PATCH 3/9] fixed icon button dimension --- package.json | 2 +- src/pages/Bugs/Content/components/BugHeader.tsx | 6 +++--- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 578bea34c..f489f1155 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.4.0", "private": true, "dependencies": { - "@appquality/unguess-design-system": "3.1.63", + "@appquality/unguess-design-system": "3.1.64", "@headwayapp/react-widget": "^0.0.4", "@reduxjs/toolkit": "^1.8.0", "@rtk-query/codegen-openapi": "1.2.0", diff --git a/src/pages/Bugs/Content/components/BugHeader.tsx b/src/pages/Bugs/Content/components/BugHeader.tsx index 6bf8f2a6c..0c6e38726 100644 --- a/src/pages/Bugs/Content/components/BugHeader.tsx +++ b/src/pages/Bugs/Content/components/BugHeader.tsx @@ -41,7 +41,6 @@ const CommentsIconContainer = styled.div` display: flex; width: 100%; justify-content: center; - margin-bottom: ${appTheme.space.xxs}; `; const CommentsBadge = styled.span` @@ -50,7 +49,7 @@ const CommentsBadge = styled.span` justify-content: center; position: absolute; top: -${appTheme.space.xxs}; - right: -${appTheme.space.xs}; + right: -${appTheme.space.xxs}; background-color: ${appTheme.palette.azure[600]}; color: ${appTheme.palette.white}; width: 16px; @@ -58,6 +57,7 @@ const CommentsBadge = styled.span` border: 1px solid ${appTheme.palette.white}; font-size: 8px; border-radius: ${appTheme.borderRadii.lg}; + z-index: 3000; `; export default ({ @@ -115,7 +115,7 @@ export default ({ type="light" placement="auto" > - + {comments?.items && comments.items.length > 0 && ( diff --git a/yarn.lock b/yarn.lock index 5404d72c9..7fa5e749e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -54,10 +54,10 @@ dependencies: hls.js "^1.4.8" -"@appquality/unguess-design-system@3.1.63": - version "3.1.63" - resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-3.1.63.tgz#5dd6bfcfc060eac9b71b8fabe94fd5277f700d73" - integrity sha512-WXHigrq9Pux+8tYLBI8zmaUPtCkhR5jtqsapFQMQJcFMRVz18JbZz/QsB55FnXcvsAWARFffUdRTKI2T/5fkzA== +"@appquality/unguess-design-system@3.1.64": + version "3.1.64" + resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-3.1.64.tgz#b3573e0d98508f1f3fe6507dc038a4368b55d69e" + integrity sha512-7CN3uyr3r0LaJYKUUJ/d5FZZC1k4O0Hjz3sysc9AFNsDwjNogaQObnqygEchR0ZIzzbSJXzN7XXUKnPsXSyIJQ== dependencies: "@appquality/stream-player" "^1.0.3" "@nivo/bar" "^0.80.0" From 36bbac5dc16cab6461d800fedc64cda94fe36f13 Mon Sep 17 00:00:00 2001 From: ZecD Date: Mon, 8 Jan 2024 18:35:55 +0100 Subject: [PATCH 4/9] fixed negative margins on row --- src/pages/Bug/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Bug/index.tsx b/src/pages/Bug/index.tsx index 35a267ebd..bfd07adcc 100644 --- a/src/pages/Bug/index.tsx +++ b/src/pages/Bug/index.tsx @@ -101,7 +101,7 @@ const Bug = () => { {...(!hideActions && { style: { paddingRight: 0 } })} > - + From c11b8cdb42d3f2597dedbb178b275b80c492829f Mon Sep 17 00:00:00 2001 From: Luca Cannarozzo Date: Mon, 8 Jan 2024 18:52:42 +0100 Subject: [PATCH 5/9] fix(bug-page): remove wrong page horizontal scroll this scroll is caused by a malformed unconventional styled grid from ds. This must be updated and all the relatead react page too --- src/pages/Bug/Header.tsx | 10 +++++++--- src/pages/Bug/index.tsx | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/Bug/Header.tsx b/src/pages/Bug/Header.tsx index bc438c996..2dcade04d 100644 --- a/src/pages/Bug/Header.tsx +++ b/src/pages/Bug/Header.tsx @@ -83,6 +83,10 @@ const BreadCrumbs = ({ ); }; +const StyledContainer = styled(LayoutWrapper)` + border-bottom: 1px solid ${({ theme }) => theme.palette.grey[200]}; +`; + export const Header = ({ campaignId, bug }: Props) => { const dispatch = useAppDispatch(); const { @@ -118,8 +122,8 @@ export const Header = ({ campaignId, bug }: Props) => { } return ( - - + + {(setModalOpen) => ( @@ -133,6 +137,6 @@ export const Header = ({ campaignId, bug }: Props) => { - + ); }; diff --git a/src/pages/Bug/index.tsx b/src/pages/Bug/index.tsx index 35a267ebd..6a8a206eb 100644 --- a/src/pages/Bug/index.tsx +++ b/src/pages/Bug/index.tsx @@ -101,7 +101,7 @@ const Bug = () => { {...(!hideActions && { style: { paddingRight: 0 } })} > - + From b4944d3d9e29002e9be4ce8158d75b8558f5a888 Mon Sep 17 00:00:00 2001 From: ZecD Date: Tue, 9 Jan 2024 12:19:59 +0100 Subject: [PATCH 6/9] changed reduced default breakpoint of flipcard --- src/pages/Campaign/widgetCards/FlipCard/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Campaign/widgetCards/FlipCard/index.tsx b/src/pages/Campaign/widgetCards/FlipCard/index.tsx index f734b6214..018b86d6e 100644 --- a/src/pages/Campaign/widgetCards/FlipCard/index.tsx +++ b/src/pages/Campaign/widgetCards/FlipCard/index.tsx @@ -26,7 +26,7 @@ const FlipCard = ({ activateSwitchFromBreakpoint, ...props }: FlipCardProps) => ( - + {children} From 498a72861b735f53d9a29e54ee798e00a5115f89 Mon Sep 17 00:00:00 2001 From: ZecD Date: Tue, 9 Jan 2024 16:20:10 +0100 Subject: [PATCH 7/9] added order parameters to api call --- src/pages/Dashboard/campaigns-list/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/Dashboard/campaigns-list/index.tsx b/src/pages/Dashboard/campaigns-list/index.tsx index 7b4892055..d74300984 100644 --- a/src/pages/Dashboard/campaigns-list/index.tsx +++ b/src/pages/Dashboard/campaigns-list/index.tsx @@ -47,7 +47,11 @@ export const CampaignsList = () => { const { filteredCampaigns, isLoading, isFetching, isError } = useGetWorkspacesByWidCampaignsQuery( - { wid: activeWorkspace?.id.toString() || '' }, + { + wid: activeWorkspace?.id.toString() || '', + orderBy: 'start_date', + order: 'DESC', + }, { selectFromResult: (result) => ({ ...result, From c7233cc2008c43e31f7143420dc026eef5e9648e Mon Sep 17 00:00:00 2001 From: ZecD Date: Wed, 10 Jan 2024 11:47:44 +0100 Subject: [PATCH 8/9] added ordering desc to project-campaigns --- src/features/api/index.ts | 66 ++++++++++++++++++--- src/pages/Dashboard/project-items/index.tsx | 7 ++- 2 files changed, 64 insertions(+), 9 deletions(-) diff --git a/src/features/api/index.ts b/src/features/api/index.ts index 80944c9c2..f5858c615 100644 --- a/src/features/api/index.ts +++ b/src/features/api/index.ts @@ -1,7 +1,7 @@ import { apiSlice as api } from './api'; const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ - get: build.query({ + $get: build.query<$getApiResponse, $getApiArg>({ query: () => ({ url: `/` }), }), postAuthenticate: build.mutation< @@ -281,7 +281,12 @@ const injectedRtkApi = api.injectEndpoints({ >({ query: (queryArg) => ({ url: `/projects/${queryArg.pid}/campaigns`, - params: { limit: queryArg.limit, start: queryArg.start }, + params: { + limit: queryArg.limit, + start: queryArg.start, + order: queryArg.order, + orderBy: queryArg.orderBy, + }, }), }), getProjectsByPidUsers: build.query< @@ -482,8 +487,8 @@ const injectedRtkApi = api.injectEndpoints({ overrideExisting: false, }); export { injectedRtkApi as unguessApi }; -export type GetApiResponse = /** status 200 OK */ {}; -export type GetApiArg = void; +export type $getApiResponse = /** status 200 OK */ {}; +export type $getApiArg = void; export type PostAuthenticateApiResponse = /** status 200 OK */ Authentication; export type PostAuthenticateApiArg = { body: { @@ -512,11 +517,16 @@ export type PostCampaignsApiArg = { project_id: number; pm_id: number; platforms: PlatformObject[]; + /** Da togliere */ page_preview_id?: number; + /** Da togliere */ page_manual_id?: number; + /** Used to check available coins */ customer_id: number; has_bug_form?: number; + /** if has_bug_form is 0 this has to be 0 */ has_bug_parade?: number; + /** Useless value required by Tryber BackOffice */ description?: string; base_bug_internal_id?: string; express_slug: string; @@ -568,9 +578,9 @@ export type GetCampaignsByCidBugsApiArg = { }; export type GetCampaignsByCidBugsAndBidApiResponse = /** status 200 OK */ Bug & { - media?: BugMedia[]; - tags?: BugTag[]; - additional_fields?: BugAdditionalField[]; + media: BugMedia[]; + tags: BugTag[]; + additional_fields: BugAdditionalField[]; reporter: { tester_id: number; name: string; @@ -669,6 +679,8 @@ export type PatchCampaignsByCidCustomStatusesApiArg = { /** Campaign id */ cid: string; body: { + /** se esiste già questo parametro viene passato nel request body + se invece non esiste ed il custom status deve essere creato, non viene passato */ custom_status_id?: number; name: string; color: string; @@ -705,6 +717,7 @@ export type PutCampaignsByCidFindingsAndFidApiArg = { }; export type GetCampaignsByCidMetaApiResponse = /** status 200 OK */ Campaign & { selected_testers: number; + /** Array of form factors */ allowed_devices: string[]; }; export type GetCampaignsByCidMetaApiArg = { @@ -809,6 +822,7 @@ export type DeleteCampaignsByCidUsersApiArg = { /** Campaign id */ cid: string; body: { + /** Tryber WP USER ID */ user_id: number; }; }; @@ -817,6 +831,7 @@ export type GetCampaignsByCidUxApiResponse = /** status 200 OK */ { goal: string; users: number; findings?: { + /** this field is the Finding ID */ id: number; title: string; description: string; @@ -917,6 +932,10 @@ export type GetProjectsByPidCampaignsApiArg = { limit?: number; /** Start pagination parameter */ start?: number; + /** Order value (ASC, DESC) */ + order?: string; + /** Order by accepted field */ + orderBy?: string; }; export type GetProjectsByPidUsersApiResponse = /** status 200 OK */ { items: Tenant[]; @@ -962,6 +981,7 @@ export type DeleteProjectsByPidUsersApiArg = { /** Project id */ pid: string; body: { + /** Tryber WP USER ID */ user_id: number; include_shared?: boolean; }; @@ -1136,6 +1156,7 @@ export type DeleteWorkspacesByWidUsersApiArg = { /** Workspace (company, customer) id */ wid: string; body: { + /** Tryber WP USER ID */ user_id: number; include_shared?: boolean; }; @@ -1196,6 +1217,9 @@ export type Campaign = { title: string; customer_title: string; is_public: number; + /** -1: no bug form; + 0: only bug form; + 1: bug form with bug parade'; */ bug_form?: number; type: { id: number; @@ -1221,7 +1245,16 @@ export type Campaign = { base_bug_internal_id?: string; }; export type PlatformObject = { + /** os */ id: number; + /** form_factor + + 0 => smartphone, + 1 => tablet + 2 => pc + 3 => smartwatch + 4 => console + 5 => tv */ deviceType: number; }; export type TemplateCategory = { @@ -1230,17 +1263,21 @@ export type TemplateCategory = { }; export type Template = { title: string; + /** Short description used as preview of template or in templates dropdown */ description?: string; + /** HTML content used to pre-fill the use case editor */ content?: string; category?: TemplateCategory; device_type?: 'webapp' | 'mobileapp'; locale?: 'en' | 'it'; image?: string; + /** The use case created by this template needs a login or not? */ requiresLogin?: boolean; }; export type UseCase = { title: string; description: string; + /** Optional in experiential campaigns */ functionality?: { id?: number; } & Template; @@ -1253,6 +1290,7 @@ export type CampaignWithOutput = Campaign & { }; export type BugTitle = { full: string; + /** Bug title without context. */ compact: string; context?: string[]; }; @@ -1407,6 +1445,7 @@ export type Report = { update_date?: string; }; export type Tenant = { + /** tryber wp_user_id */ id: number; profile_id: number; name: string; @@ -1436,6 +1475,7 @@ export type WidgetBugsByUseCase = { export type WidgetBugsByDevice = { data: ((Smartphone | Desktop | Tablet) & { unique_bugs: number; + /** Unique bugs */ bugs: number; })[]; kind: 'bugsByDevice'; @@ -1444,8 +1484,11 @@ export type WidgetCampaignProgress = { data: { start_date: string; end_date: string; + /** Percentage fixed rate of completion */ usecase_completion: 12.5 | 37.5 | 62.5 | 87.5 | 100; + /** Number of hours from start_date */ time_elapsed: number; + /** Expected amount of hours required to complete the campaign */ expected_duration: number; }; kind: 'campaignProgress'; @@ -1475,6 +1518,7 @@ export type Feature = { name?: string; }; export type User = { + /** This is the main id of the user. Currently is equal to tryber_wp_user_id */ id: number; email: string; role: string; @@ -1499,17 +1543,23 @@ export type Workspace = { picture?: string; url?: string; }; + /** express coins */ coins?: number; + /** Do this workspace have shared items? */ isShared?: boolean; + /** Number of shared items */ sharedItems?: number; }; export type Coin = { id: number; customer_id: number; + /** Number of available coin */ amount: number; agreement_id?: number; + /** This is the single coin price */ price?: number; created_on?: string; + /** On each coin use, the related package will be updated */ updated_on?: string; }; export type BugComment = { @@ -1522,7 +1572,7 @@ export type BugComment = { }; }; export const { - useGetQuery, + use$getQuery, usePostAuthenticateMutation, usePostAnalyticsViewsCampaignsByCidMutation, usePostCampaignsMutation, diff --git a/src/pages/Dashboard/project-items/index.tsx b/src/pages/Dashboard/project-items/index.tsx index 62fde41bf..e422e7805 100644 --- a/src/pages/Dashboard/project-items/index.tsx +++ b/src/pages/Dashboard/project-items/index.tsx @@ -43,7 +43,12 @@ export const ProjectItems = ({ projectId }: { projectId: number }) => { const { filteredCampaigns, isLoading, isFetching } = useGetProjectsByPidCampaignsQuery( - { pid: projectId.toString(), limit: 10000 }, + { + pid: projectId.toString(), + limit: 10000, + orderBy: 'start_date', + order: 'DESC', + }, { selectFromResult: (result) => ({ ...result, From 1f56c87707bfaa63e91fa5453c962298fe11f5a3 Mon Sep 17 00:00:00 2001 From: ZecD Date: Wed, 10 Jan 2024 16:06:03 +0100 Subject: [PATCH 9/9] reduced z index on bug comments badge --- src/pages/Bugs/Content/components/BugHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Bugs/Content/components/BugHeader.tsx b/src/pages/Bugs/Content/components/BugHeader.tsx index 0c6e38726..fb27e145d 100644 --- a/src/pages/Bugs/Content/components/BugHeader.tsx +++ b/src/pages/Bugs/Content/components/BugHeader.tsx @@ -57,7 +57,7 @@ const CommentsBadge = styled.span` border: 1px solid ${appTheme.palette.white}; font-size: 8px; border-radius: ${appTheme.borderRadii.lg}; - z-index: 3000; + z-index: 2; `; export default ({