From 22bbdd5ab89382c9c641489ca02f9170bb01357e Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Fri, 29 Dec 2023 22:07:52 +0530 Subject: [PATCH 1/3] fix: add validations --- web/components/cycles/sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/cycles/sidebar.tsx b/web/components/cycles/sidebar.tsx index 18c233d6c..f3576fb00 100644 --- a/web/components/cycles/sidebar.tsx +++ b/web/components/cycles/sidebar.tsx @@ -274,7 +274,7 @@ export const CycleDetailsSidebar: React.FC = observer((props) => { [workspaceSlug, projectId, cycleId, issueFilters, updateFilters] ); - const cycleStatus = cycleDetails.status.toLocaleLowerCase(); + const cycleStatus = cycleDetails?.status.toLocaleLowerCase(); const isCompleted = cycleStatus === "completed"; const isStartValid = new Date(`${cycleDetails?.start_date}`) <= new Date(); From 4263e9b507471ee7470c2e04f83809e15219e92c Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Sat, 30 Dec 2023 11:05:15 +0530 Subject: [PATCH 2/3] Style: custom theme UI fixes (#3284) * style: fix `background-color` inconsistency in issue layout when custom theme is applied. * fix: theme dropdown overlapping with input color picker icons (z-index issue). --- web/components/core/theme/theme-switch.tsx | 2 +- .../issues/issue-layouts/roots/project-layout-root.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/components/core/theme/theme-switch.tsx b/web/components/core/theme/theme-switch.tsx index 78364562f..60ef272a2 100644 --- a/web/components/core/theme/theme-switch.tsx +++ b/web/components/core/theme/theme-switch.tsx @@ -46,7 +46,7 @@ export const ThemeSwitch: FC = (props) => { } onChange={onChange} input - width="w-full" + width="w-full z-20" > {THEME_OPTIONS.map((themeOption) => ( diff --git a/web/components/issues/issue-layouts/roots/project-layout-root.tsx b/web/components/issues/issue-layouts/roots/project-layout-root.tsx index db30e4b7c..39f6872cc 100644 --- a/web/components/issues/issue-layouts/roots/project-layout-root.tsx +++ b/web/components/issues/issue-layouts/roots/project-layout-root.tsx @@ -48,7 +48,7 @@ export const ProjectLayoutRoot: React.FC = observer(() => { {Object.keys(getIssues ?? {}).length == 0 ? ( ) : ( -
+
{activeLayout === "list" ? ( ) : activeLayout === "kanban" ? ( From 6e702d6cc7014b1d96e8417624a5eca42456631a Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Sat, 30 Dec 2023 21:32:18 +0530 Subject: [PATCH 3/3] fix: project settings form not loading new data while switching between projects --- web/components/project/form.tsx | 12 +++++++++++- .../projects/[projectId]/settings/index.tsx | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/web/components/project/form.tsx b/web/components/project/form.tsx index 9af8c7831..2911e083b 100644 --- a/web/components/project/form.tsx +++ b/web/components/project/form.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import { FC, useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; // components import EmojiIconPicker from "components/emoji-icon-picker"; @@ -42,6 +42,7 @@ export const ProjectDetailsForm: FC = (props) => { control, setValue, setError, + reset, formState: { errors, isSubmitting }, } = useForm({ defaultValues: { @@ -51,6 +52,15 @@ export const ProjectDetailsForm: FC = (props) => { }, }); + useEffect(() => { + if (!project) return; + reset({ + ...project, + emoji_and_icon: project.emoji ?? project.icon_prop, + workspace: (project.workspace as IWorkspace).id, + }); + }, [project, reset]); + const handleIdentifierChange = (event: React.ChangeEvent) => { const { value } = event.target; diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx index ef815ac82..bdff9bf10 100644 --- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx +++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx @@ -29,7 +29,7 @@ const GeneralSettingsPage: NextPageWithLayout = observer(() => { const { workspaceSlug, projectId } = router.query; // api call to fetch project details useSWR( - workspaceSlug && projectId ? "PROJECT_DETAILS" : null, + workspaceSlug && projectId ? `PROJECT_DETAILS_${projectId}` : null, workspaceSlug && projectId ? () => projectStore.fetchProjectDetails(workspaceSlug.toString(), projectId.toString()) : null