From 022a286eba75255c3cb4decb08eb29f6b91a2170 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 21 Feb 2024 18:19:49 +0530 Subject: [PATCH] [WEB-482] chore: issue sidebar improvement (#3733) * chore: module-select dropdown improvement * chore: issue sidebar subscription loader added * chore: issue sidebar improvement * fix: peek overview exception error --- web/components/dropdowns/module.tsx | 4 +- .../issues/issue-detail/sidebar.tsx | 32 ++++++------ .../issues/issue-detail/subscription.tsx | 50 +++++++++++-------- .../issues/peek-overview/properties.tsx | 2 +- 4 files changed, 49 insertions(+), 39 deletions(-) diff --git a/web/components/dropdowns/module.tsx b/web/components/dropdowns/module.tsx index 57b02ee56..63f4738a0 100644 --- a/web/components/dropdowns/module.tsx +++ b/web/components/dropdowns/module.tsx @@ -88,13 +88,13 @@ const ButtonContent: React.FC = (props) => { ) : value.length > 0 ? ( -
+
{value.map((moduleId) => { const moduleDetails = getModuleById(moduleId); return (
{!hideIcon && } {!hideText && ( diff --git a/web/components/issues/issue-detail/sidebar.tsx b/web/components/issues/issue-detail/sidebar.tsx index 1c93385c0..4a891fed2 100644 --- a/web/components/issues/issue-detail/sidebar.tsx +++ b/web/components/issues/issue-detail/sidebar.tsx @@ -133,7 +133,7 @@ export const IssueDetailsSidebar: React.FC = observer((props) => {
Properties
{/* TODO: render properties using a common component */} -
+
@@ -269,8 +269,8 @@ export const IssueDetailsSidebar: React.FC = observer((props) => { )} {projectDetails?.module_view && ( -
-
+
+
Module
@@ -376,20 +376,20 @@ export const IssueDetailsSidebar: React.FC = observer((props) => { disabled={!is_editable} />
-
-
-
- - Labels -
-
- +
+
+ + Labels +
+
+ +
diff --git a/web/components/issues/issue-detail/subscription.tsx b/web/components/issues/issue-detail/subscription.tsx index 8d05140b3..ebd213dac 100644 --- a/web/components/issues/issue-detail/subscription.tsx +++ b/web/components/issues/issue-detail/subscription.tsx @@ -2,7 +2,7 @@ import { FC, useState } from "react"; import { Bell, BellOff } from "lucide-react"; import { observer } from "mobx-react-lite"; // UI -import { Button } from "@plane/ui"; +import { Button, Loader } from "@plane/ui"; // hooks import { useIssueDetail } from "hooks/store"; import useToast from "hooks/use-toast"; @@ -49,24 +49,34 @@ export const IssueSubscription: FC = observer((props) => { }; return ( -
- -
+ <> + {subscription ? ( +
+ +
+ ) : ( + <> + + + + + )} + ); }); diff --git a/web/components/issues/peek-overview/properties.tsx b/web/components/issues/peek-overview/properties.tsx index 7a241e070..10bba9f11 100644 --- a/web/components/issues/peek-overview/properties.tsx +++ b/web/components/issues/peek-overview/properties.tsx @@ -102,7 +102,7 @@ export const PeekOverviewProperties: FC = observer((pro buttonVariant={issue?.assignee_ids?.length > 1 ? "transparent-without-text" : "transparent-with-text"} className="w-3/4 flex-grow group" buttonContainerClassName="w-full text-left" - buttonClassName={`text-sm justify-between ${issue?.assignee_ids.length > 0 ? "" : "text-custom-text-400"}`} + buttonClassName={`text-sm justify-between ${issue?.assignee_ids?.length > 0 ? "" : "text-custom-text-400"}`} hideIcon={issue.assignee_ids?.length === 0} dropdownArrow dropdownArrowClassName="h-3.5 w-3.5 hidden group-hover:inline"