From 2c7f04da41c9838fde891b33637736a95f72e8b3 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Tue, 16 Apr 2024 13:49:54 +0200 Subject: [PATCH 1/9] fix: Sidebar in start custom activity Workaround to not hide too much behind the sidebar. The activity needs some refactoring to work in all window sizes properly. --- .../ActivityLibrary/ActivityDetails/ActivityDetails.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx index dcafb56236f..aba0c83c911 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx @@ -144,7 +144,7 @@ const ActivityDetails = (props: Props) => { Date: Tue, 16 Apr 2024 16:49:27 +0200 Subject: [PATCH 2/9] Make activity details screen reactive --- .../ActivityDetails/ActivityDetails.tsx | 24 ++++++++++--------- .../ActivityDetails/TemplateDetails.tsx | 2 +- .../components/IntegrationsTip.tsx | 2 +- .../ActivityDetailsSidebar.tsx | 3 +-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx index aba0c83c911..0b40fa655f5 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx @@ -93,7 +93,7 @@ const ActivityDetails = (props: Props) => { const MOBILE_SETTINGS_HEIGHT = 208 return ( -
+
@@ -104,21 +104,23 @@ const ActivityDetails = (props: Props) => {
Start Activity
-
+
- - - +
+ + + +
diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/TemplateDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/TemplateDetails.tsx index f45191fad8c..2f334d7b8ea 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/TemplateDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/TemplateDetails.tsx @@ -212,7 +212,7 @@ export const TemplateDetails = (props: Props) => { return (
-
+
{__typename === 'FixedActivity' && (
Created by Parabol
diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/components/IntegrationsTip.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/components/IntegrationsTip.tsx index e0cec9c4116..27e33d76790 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/components/IntegrationsTip.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/components/IntegrationsTip.tsx @@ -15,7 +15,7 @@ export const IntegrationsTip = (props: Props) => { const {className, children} = props return ( -
+
diff --git a/packages/client/components/ActivityLibrary/ActivityDetailsSidebar.tsx b/packages/client/components/ActivityLibrary/ActivityDetailsSidebar.tsx index 880b12f59c0..27248f35b0f 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetailsSidebar.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetailsSidebar.tsx @@ -253,10 +253,9 @@ const ActivityDetailsSidebar = (props: Props) => { return ( <> - {isOpen &&
}
Date: Tue, 16 Apr 2024 20:04:46 +0200 Subject: [PATCH 3/9] Fix editing view --- .../ActivityLibrary/ActivityDetails/ActivityDetails.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx index 0b40fa655f5..a932a972013 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx @@ -105,12 +105,7 @@ const ActivityDetails = (props: Props) => {
Start Activity
-
+
{ Date: Thu, 18 Apr 2024 09:30:55 +0200 Subject: [PATCH 4/9] Remove z-index --- packages/client/components/ActivityLibrary/ActivityCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/components/ActivityLibrary/ActivityCard.tsx b/packages/client/components/ActivityLibrary/ActivityCard.tsx index 724e791960b..260013189a5 100644 --- a/packages/client/components/ActivityLibrary/ActivityCard.tsx +++ b/packages/client/components/ActivityLibrary/ActivityCard.tsx @@ -38,7 +38,7 @@ export const ActivityCardImage = (props: PropsWithChildren Card Illustration From e317b04ba7b7e636c4e1f4d6de6c8110d145c1c9 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Thu, 18 Apr 2024 10:47:48 +0200 Subject: [PATCH 5/9] Make all content visible on mobile --- .../ActivityDetails/ActivityDetails.tsx | 7 +- .../ActivityDetailsSidebar.tsx | 139 +++++++++--------- 2 files changed, 71 insertions(+), 75 deletions(-) diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx index a932a972013..d0919a8068d 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx @@ -1,5 +1,4 @@ import graphql from 'babel-plugin-relay/macro' -import clsx from 'clsx' import React, {useEffect, useState} from 'react' import {PreloadedQuery, usePreloadedQuery} from 'react-relay' import {Redirect, useHistory} from 'react-router' @@ -90,11 +89,10 @@ const ActivityDetails = (props: Props) => { }` const isOwner = viewerLowestScope === 'TEAM' - const MOBILE_SETTINGS_HEIGHT = 208 return (
-
+
@@ -136,6 +134,7 @@ const ActivityDetails = (props: Props) => {
+
{ />
-
+
{ const withRecurrence = type === 'teamPrompt' || type === 'retrospective' return ( - <> -
-
-
- Settings - setIsMinimized(!isMinimized)} - > - {isMinimized ? : } - -
+
+
+
+ Settings + setIsMinimized(!isMinimized)} + > + {isMinimized ? : } + +
-
+
+ + {type === 'retrospective' && ( + <> + + + + + )} + {type === 'poker' && ( + + )} + {type === 'action' && ( + )} - > -
- - {type === 'retrospective' && ( - <> - - - - - )} - {type === 'poker' && ( - - )} - {type === 'action' && ( - - )} -
+
-
- {error && {error.message}} - - {/* TODO: scheduling meeting does not work with one-on-one https://github.com/ParabolInc/parabol/issues/8820 */} - - handleStartActivity()} - waiting={submitting} - className='h-14' - > -
Start Activity
-
-
+
+ {error && {error.message}} + + + handleStartActivity()} + waiting={submitting} + className='h-14' + > +
Start Activity
+
- +
) } From f1eab033fe7473ada8ffc76541aaf62010f37cd4 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Thu, 18 Apr 2024 12:20:12 +0200 Subject: [PATCH 6/9] Mobile adaptions --- .../ActivityDetails/ActivityDetails.tsx | 7 +- .../ActivityDetailsSidebar.tsx | 135 +++++++++--------- 2 files changed, 68 insertions(+), 74 deletions(-) diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx index d0919a8068d..36d65a7b639 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx @@ -1,4 +1,5 @@ import graphql from 'babel-plugin-relay/macro' +import clsx from 'clsx' import React, {useEffect, useState} from 'react' import {PreloadedQuery, usePreloadedQuery} from 'react-relay' import {Redirect, useHistory} from 'react-router' @@ -134,24 +135,22 @@ const ActivityDetails = (props: Props) => {
-
+ {!isEditing &&
}
-
+
{ - const {selectedTemplateRef, teamsRef, type, isOpen, preferredTeamId, viewerRef} = props + const {selectedTemplateRef, teamsRef, type, preferredTeamId, viewerRef} = props const [isMinimized, setIsMinimized] = useState(false) const isMobile = !useBreakpoint(Breakpoint.INVOICE) const selectedTemplate = useFragment( @@ -252,80 +251,76 @@ const ActivityDetailsSidebar = (props: Props) => { const withRecurrence = type === 'teamPrompt' || type === 'retrospective' return ( -
-
-
- Settings - setIsMinimized(!isMinimized)} - > - {isMinimized ? : } - -
+ <> +
+
+
+ Settings + setIsMinimized(!isMinimized)} + > + {isMinimized ? : } + +
-
-
- - {type === 'retrospective' && ( - <> - - - - - )} - {type === 'poker' && ( - - )} - {type === 'action' && ( - +
+
+ + {type === 'retrospective' && ( + <> + + + + + )} + {type === 'poker' && ( + + )} + {type === 'action' && ( + + )} +
-
-
- {error && {error.message}} - - - handleStartActivity()} - waiting={submitting} - className='h-14' - > -
Start Activity
-
+
+ {error && {error.message}} + + + handleStartActivity()} + waiting={submitting} + className='h-14' + > +
Start Activity
+
+
-
+ ) } From dfe77ed1f18af90522851507a228ed6ebd3b4d31 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Thu, 18 Apr 2024 14:44:40 +0200 Subject: [PATCH 7/9] More CSS --- .../ActivityDetails/ActivityDetails.tsx | 37 +++++++++---------- .../ActivityDetails/TemplateDetails.tsx | 4 +- .../ActivityDetailsSidebar.tsx | 2 +- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx index 36d65a7b639..621bee4ac14 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx @@ -94,7 +94,7 @@ const ActivityDetails = (props: Props) => { return (
-
+
@@ -104,10 +104,10 @@ const ActivityDetails = (props: Props) => {
Start Activity
-
+
{
-
-
-
- -
- +
+
+
- {!isEditing &&
}
{ />
-
+
{
{activityDescription}
- {integrationsTip} + {integrationsTip} -
+
{prompts && ( <> { return ( <> -
+
Settings From d3cd078b613dd09643fcb16fd2589cf2460afa35 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Tue, 23 Apr 2024 17:08:08 +0200 Subject: [PATCH 8/9] Hide template details image on small screens It provides little value for the amount of screen estate it takes up on phone. --- .../ActivityLibrary/ActivityDetails/ActivityDetails.tsx | 4 ++-- .../components/ActivityLibrary/ActivityDetailsSidebar.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx index 621bee4ac14..b37795d8e05 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx @@ -95,7 +95,7 @@ const ActivityDetails = (props: Props) => {
-
+
@@ -107,7 +107,7 @@ const ActivityDetails = (props: Props) => {
{ return ( <> -
+
Settings From e746b8b01ecc1c2b714354965dc9465fae4deb50 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Thu, 25 Apr 2024 14:00:56 +0200 Subject: [PATCH 9/9] Avoid shrinking and expanding of the sidebar when switching teams --- .../ActivityLibrary/ActivityDetails/ActivityDetails.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx index b37795d8e05..e998e62de5e 100644 --- a/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx +++ b/packages/client/components/ActivityLibrary/ActivityDetails/ActivityDetails.tsx @@ -134,7 +134,7 @@ const ActivityDetails = (props: Props) => {
-
+