From a8a5873d8839bb1dde58cc043c6ff6aa08a75881 Mon Sep 17 00:00:00 2001 From: Saheb Giri <47132373+iamsahebgiri@users.noreply.github.com> Date: Thu, 30 Mar 2023 20:45:15 +0530 Subject: [PATCH] fix: add icons to dropdown and replace link icon (#630) --- .../core/board-view/single-issue.tsx | 17 +++++++-- .../core/list-view/single-issue.tsx | 19 ++++++++-- apps/app/components/cycles/sidebar.tsx | 4 +-- .../components/cycles/single-cycle-card.tsx | 4 +-- .../components/issues/my-issues-list-item.tsx | 8 ++++- apps/app/components/modules/sidebar.tsx | 4 +-- .../components/modules/single-module-card.tsx | 36 ++++++++----------- .../project/single-project-card.tsx | 30 ++++++++++++---- .../project/single-sidebar-project.tsx | 27 +++++++++++--- 9 files changed, 104 insertions(+), 45 deletions(-) diff --git a/apps/app/components/core/board-view/single-issue.tsx b/apps/app/components/core/board-view/single-issue.tsx index e5c113ffa..fd36eeb95 100644 --- a/apps/app/components/core/board-view/single-issue.tsx +++ b/apps/app/components/core/board-view/single-issue.tsx @@ -225,17 +225,28 @@ export const SingleBoardIssue: React.FC = ({
{type && !isNotAllowed && ( - Edit issue + + + + Edit issue + + {type !== "issue" && removeIssue && ( <>Remove from {type} )} handleDeleteIssue(issue)}> - Delete issue + + + Delete issue + - Copy issue link + + + Copy issue Link + )} diff --git a/apps/app/components/core/list-view/single-issue.tsx b/apps/app/components/core/list-view/single-issue.tsx index cb9b397ad..b5e31dd9c 100644 --- a/apps/app/components/core/list-view/single-issue.tsx +++ b/apps/app/components/core/list-view/single-issue.tsx @@ -257,16 +257,29 @@ export const SingleListIssue: React.FC = ({ )} {type && !isNotAllowed && ( - Edit issue + + + + Edit issue + + {type !== "issue" && removeIssue && ( <>Remove from {type} )} handleDeleteIssue(issue)}> - Delete issue + + + Delete issue + + + + + + Copy issue link + - Copy issue link )}
diff --git a/apps/app/components/cycles/sidebar.tsx b/apps/app/components/cycles/sidebar.tsx index 79b841df9..d7d886fd0 100644 --- a/apps/app/components/cycles/sidebar.tsx +++ b/apps/app/components/cycles/sidebar.tsx @@ -15,10 +15,10 @@ import { ChartPieIcon, ArrowLongRightIcon, TrashIcon, - DocumentDuplicateIcon, UserCircleIcon, ChevronDownIcon, DocumentIcon, + LinkIcon, } from "@heroicons/react/24/outline"; // ui import { CustomMenu, Loader, ProgressBar } from "components/ui"; @@ -295,7 +295,7 @@ export const CycleDetailsSidebar: React.FC = ({ - + Copy Link diff --git a/apps/app/components/cycles/single-cycle-card.tsx b/apps/app/components/cycles/single-cycle-card.tsx index be789d343..f99cc7fc8 100644 --- a/apps/app/components/cycles/single-cycle-card.tsx +++ b/apps/app/components/cycles/single-cycle-card.tsx @@ -18,7 +18,7 @@ import { CalendarDaysIcon } from "@heroicons/react/20/solid"; import { TargetIcon } from "components/icons"; import { ChevronDownIcon, - DocumentDuplicateIcon, + LinkIcon, PencilIcon, StarIcon, TrashIcon, @@ -318,7 +318,7 @@ export const SingleCycleCard: React.FC = ({ )} - + Copy Cycle Link diff --git a/apps/app/components/issues/my-issues-list-item.tsx b/apps/app/components/issues/my-issues-list-item.tsx index f933e95f9..273382427 100644 --- a/apps/app/components/issues/my-issues-list-item.tsx +++ b/apps/app/components/issues/my-issues-list-item.tsx @@ -22,6 +22,7 @@ import { IIssue, Properties } from "types"; import { USER_ISSUE } from "constants/fetch-keys"; import { copyTextToClipboard, truncateText } from "helpers/string.helper"; import useToast from "hooks/use-toast"; +import { LinkIcon } from "@heroicons/react/24/outline"; type Props = { issue: IIssue; @@ -167,7 +168,12 @@ export const MyIssuesListItem: React.FC = ({ issue, properties, projectId )} - Copy issue link + + + + Copy issue link + + diff --git a/apps/app/components/modules/sidebar.tsx b/apps/app/components/modules/sidebar.tsx index 7c986078c..f272eff0f 100644 --- a/apps/app/components/modules/sidebar.tsx +++ b/apps/app/components/modules/sidebar.tsx @@ -12,7 +12,6 @@ import { CalendarDaysIcon, ChartPieIcon, ChevronDownIcon, - DocumentDuplicateIcon, DocumentIcon, PlusIcon, TrashIcon, @@ -41,6 +40,7 @@ import { IIssue, IModule, ModuleLink, UserAuth } from "types"; import { MODULE_DETAILS } from "constants/fetch-keys"; // constant import { MODULE_STATUS } from "constants/module"; +import { LinkIcon } from "@heroicons/react/20/solid"; const defaultValues: Partial = { lead: "", @@ -334,7 +334,7 @@ export const ModuleDetailsSidebar: React.FC = ({ - + Copy Link diff --git a/apps/app/components/modules/single-module-card.tsx b/apps/app/components/modules/single-module-card.tsx index cf7cbaeff..63e0c2e99 100644 --- a/apps/app/components/modules/single-module-card.tsx +++ b/apps/app/components/modules/single-module-card.tsx @@ -14,12 +14,7 @@ import { DeleteModuleModal } from "components/modules"; // ui import { AssigneesList, Avatar, CustomMenu, Tooltip } from "components/ui"; // icons -import { - DocumentDuplicateIcon, - PencilIcon, - StarIcon, - TrashIcon, -} from "@heroicons/react/24/outline"; +import { LinkIcon, PencilIcon, StarIcon, TrashIcon } from "@heroicons/react/24/outline"; import { CalendarMonthIcon, TargetIcon } from "components/icons"; // helpers @@ -127,14 +122,14 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule }) setIsOpen={setModuleDeleteModal} data={module} /> -
+
-

+

{truncateText(module.name, 75)}

@@ -142,7 +137,7 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule })
-
+
{module?.status?.replace("-", " ")}
{module.is_favorite ? ( @@ -157,20 +152,20 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule }) - + Edit Module - + Delete Module - - + + Copy Module Link @@ -191,7 +186,7 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule })
-
+
Progress
@@ -204,19 +199,18 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule })
{isNaN(completionPercentage) ? 0 : completionPercentage.toFixed(0)}%
-
+

Last updated: - - {renderShortDateWithYearFormat(lastUpdated)} - + + {renderShortDateWithYearFormat(lastUpdated)} +

- { - module.members_detail.length>0 && + {module.members_detail.length > 0 && (
- } + )}
diff --git a/apps/app/components/project/single-project-card.tsx b/apps/app/components/project/single-project-card.tsx index 21f9b7128..e366a3906 100644 --- a/apps/app/components/project/single-project-card.tsx +++ b/apps/app/components/project/single-project-card.tsx @@ -14,8 +14,14 @@ import useToast from "hooks/use-toast"; // ui import { CustomMenu, Loader, Tooltip } from "components/ui"; // icons -import { CalendarDaysIcon, PencilIcon, PlusIcon } from "@heroicons/react/24/outline"; -import { StarIcon } from "@heroicons/react/20/solid"; +import { + CalendarDaysIcon, + LinkIcon, + PencilIcon, + PlusIcon, + StarIcon, + TrashIcon, +} from "@heroicons/react/24/outline"; // helpers import { renderShortNumericDateFormat } from "helpers/date-time.helper"; import { copyTextToClipboard, truncateText } from "helpers/string.helper"; @@ -213,20 +219,32 @@ export const SingleProjectCard: React.FC = ({ {isOwner && ( setDeleteProject(project.id)}> - Delete project + + + Delete project + )} {project.is_favorite ? ( - Remove from favorites + + + Remove from favorites + ) : ( - Add to favorites + + + Add to favorites + )} - Copy project link + + + Copy project link +
diff --git a/apps/app/components/project/single-sidebar-project.tsx b/apps/app/components/project/single-sidebar-project.tsx index 8d25ad3ea..d9a60be9d 100644 --- a/apps/app/components/project/single-sidebar-project.tsx +++ b/apps/app/components/project/single-sidebar-project.tsx @@ -6,7 +6,12 @@ import { Disclosure, Transition } from "@headlessui/react"; // ui import { CustomMenu } from "components/ui"; // icons -import { ChevronDownIcon, DocumentTextIcon } from "@heroicons/react/24/outline"; +import { + ChevronDownIcon, + DocumentTextIcon, + StarIcon, + TrashIcon, +} from "@heroicons/react/24/outline"; import { ContrastIcon, LayerDiagonalIcon, @@ -111,20 +116,32 @@ export const SingleSidebarProject: React.FC = ({ {!sidebarCollapse && ( - Delete project + + + Delete project + {handleAddToFavorites && ( - Add to favorites + + + Add to favorites + )} {handleRemoveFromFavorites && ( - Remove from favorites + + + Remove from favorites + )} - Copy project link + + + Copy project link + )}