From 96ad751e115fd8eaef4116fbd59871b9e7ac7299 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Thu, 16 Mar 2023 01:36:21 +0530 Subject: [PATCH] style: new workspace dashboard design (#454) * style: workspace dashboard * feat: activity graph --- apps/app/components/ui/custom-menu.tsx | 18 +- .../components/workspace/activity-graph.tsx | 156 +++++++++++ .../workspace/completed-issues-graph.tsx | 79 ++++++ .../components/workspace/home-cards-list.tsx | 37 --- .../components/workspace/home-greetings.tsx | 31 --- apps/app/components/workspace/index.ts | 9 +- apps/app/components/workspace/issues-list.tsx | 105 +++++++ .../components/workspace/issues-pie-chart.tsx | 142 ++++++++++ .../app/components/workspace/issues-stats.tsx | 54 ++++ apps/app/constants/fetch-keys.ts | 1 + apps/app/constants/project.ts | 17 ++ apps/app/constants/state.ts | 9 + apps/app/contexts/user.context.tsx | 3 +- apps/app/helpers/date-time.helper.ts | 2 +- apps/app/hooks/use-issues.tsx | 2 +- apps/app/pages/[workspaceSlug]/index.tsx | 258 ++++-------------- apps/app/services/user.service.ts | 10 +- apps/app/types/users.d.ts | 5 + 18 files changed, 654 insertions(+), 284 deletions(-) create mode 100644 apps/app/components/workspace/activity-graph.tsx create mode 100644 apps/app/components/workspace/completed-issues-graph.tsx delete mode 100644 apps/app/components/workspace/home-cards-list.tsx delete mode 100644 apps/app/components/workspace/home-greetings.tsx create mode 100644 apps/app/components/workspace/issues-list.tsx create mode 100644 apps/app/components/workspace/issues-pie-chart.tsx create mode 100644 apps/app/components/workspace/issues-stats.tsx create mode 100644 apps/app/constants/state.ts diff --git a/apps/app/components/ui/custom-menu.tsx b/apps/app/components/ui/custom-menu.tsx index 1eacd5ba9..f37d2202f 100644 --- a/apps/app/components/ui/custom-menu.tsx +++ b/apps/app/components/ui/custom-menu.tsx @@ -12,9 +12,11 @@ type Props = { className?: string; ellipsis?: boolean; verticalEllipsis?: boolean; + height?: "sm" | "md" | "rg" | "lg"; width?: "sm" | "md" | "lg" | "xl" | "auto"; textAlignment?: "left" | "center" | "right"; noBorder?: boolean; + noChevron?: boolean; optionsPosition?: "left" | "right"; customButton?: JSX.Element; }; @@ -33,9 +35,11 @@ const CustomMenu = ({ className = "", ellipsis = false, verticalEllipsis = false, + height = "md", width = "auto", textAlignment, noBorder = false, + noChevron = false, optionsPosition = "right", customButton, }: Props) => ( @@ -77,7 +81,7 @@ const CustomMenu = ({ }`} > {label} - {!noBorder &&