From 3355be9c9c2878eeed2aa46b97dfe81e97585fce Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Sat, 11 May 2024 14:47:56 +0530 Subject: [PATCH] [WEB-1254] chore: list layout indentation enhancement and cycle list page ui improvement (#4435) * chore: list layout indentation improvement * chore: cycle list layout spacing and date ui updated * chore: platform ui improvement --- .../cycles/board/cycles-board-card.tsx | 16 +++++---- .../cycles/list/cycle-list-item-action.tsx | 14 +++++--- .../cycles/list/cycles-list-item.tsx | 2 +- web/components/headers/cycle-issues.tsx | 1 - web/components/headers/cycles.tsx | 1 - web/components/headers/global-issues.tsx | 4 +-- web/components/headers/module-issues.tsx | 1 - web/components/headers/modules-list.tsx | 1 - web/components/headers/page-details.tsx | 4 +-- web/components/headers/pages.tsx | 3 +- web/components/headers/project-inbox.tsx | 2 +- web/components/headers/project-issues.tsx | 1 - .../headers/project-view-issues.tsx | 1 - web/components/headers/project-views.tsx | 9 ++--- web/components/headers/projects.tsx | 1 - .../issues/issue-layouts/list/block-root.tsx | 2 +- .../issues/issue-layouts/list/block.tsx | 33 ++++++++++--------- .../issues/issue-layouts/list/default.tsx | 2 +- .../issues/issue-layouts/save-filter-view.tsx | 2 +- .../pages/list/block-item-action.tsx | 26 +++++---------- 20 files changed, 58 insertions(+), 68 deletions(-) diff --git a/web/components/cycles/board/cycles-board-card.tsx b/web/components/cycles/board/cycles-board-card.tsx index ec6d80921cb..6410077987b 100644 --- a/web/components/cycles/board/cycles-board-card.tsx +++ b/web/components/cycles/board/cycles-board-card.tsx @@ -2,7 +2,7 @@ import { FC, MouseEvent, useRef } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; import { useRouter } from "next/router"; -import { Info } from "lucide-react"; +import { CalendarCheck2, CalendarClock, Info, MoveRight } from "lucide-react"; // types import type { TCycleGroups } from "@plane/types"; // ui @@ -226,12 +226,14 @@ export const CyclesBoardCard: FC = observer((props) => {
- {isDateValid ? ( - - {renderFormattedDate(startDate) ?? "_ _"} - {renderFormattedDate(endDate) ?? "_ _"} - - ) : ( - No due date + {isDateValid && ( +
+ + {renderFormattedDate(startDate)} + + + {renderFormattedDate(endDate)} +
)}
diff --git a/web/components/cycles/list/cycle-list-item-action.tsx b/web/components/cycles/list/cycle-list-item-action.tsx index 1f3d2ef6525..05db2e2fa5f 100644 --- a/web/components/cycles/list/cycle-list-item-action.tsx +++ b/web/components/cycles/list/cycle-list-item-action.tsx @@ -1,6 +1,6 @@ import React, { FC, MouseEvent } from "react"; import { observer } from "mobx-react"; -import { User2 } from "lucide-react"; +import { CalendarCheck2, CalendarClock, MoveRight, User2 } from "lucide-react"; // types import { ICycle, TCycleGroups } from "@plane/types"; // ui @@ -106,9 +106,15 @@ export const CycleListItemAction: FC = observer((props) => { return ( <> -
- {renderDate && `${renderFormattedDate(startDate) ?? `_ _`} - ${renderFormattedDate(endDate) ?? `_ _`}`} -
+ {renderDate && ( +
+ + {renderFormattedDate(startDate)} + + + {renderFormattedDate(endDate)} +
+ )} {currentCycle && (
= observer((props) => { ) : progress === 100 ? ( ) : ( - {`${progress}%`} + {`${progress}%`} )} } diff --git a/web/components/headers/cycle-issues.tsx b/web/components/headers/cycle-issues.tsx index e9e89256b11..602e32235c1 100644 --- a/web/components/headers/cycle-issues.tsx +++ b/web/components/headers/cycle-issues.tsx @@ -281,7 +281,6 @@ export const CycleIssuesHeader: React.FC = observer(() => { toggleCreateIssueModal(true, EIssuesStoreType.CYCLE); }} size="sm" - prependIcon={} > Add Issue diff --git a/web/components/headers/cycles.tsx b/web/components/headers/cycles.tsx index e5c88d3f5a8..d58bcb31bb7 100644 --- a/web/components/headers/cycles.tsx +++ b/web/components/headers/cycles.tsx @@ -61,7 +61,6 @@ export const CyclesHeader: FC = observer(() => { )}
diff --git a/web/components/headers/module-issues.tsx b/web/components/headers/module-issues.tsx index 5bbaa83e1fa..d28cdb988d3 100644 --- a/web/components/headers/module-issues.tsx +++ b/web/components/headers/module-issues.tsx @@ -288,7 +288,6 @@ export const ModuleIssuesHeader: React.FC = observer(() => { toggleCreateIssueModal(true, EIssuesStoreType.MODULE); }} size="sm" - prependIcon={} > Add Issue diff --git a/web/components/headers/modules-list.tsx b/web/components/headers/modules-list.tsx index 881af67aaf4..e1b2378098b 100644 --- a/web/components/headers/modules-list.tsx +++ b/web/components/headers/modules-list.tsx @@ -63,7 +63,6 @@ export const ModulesListHeader: React.FC = observer(() => { )} diff --git a/web/components/headers/pages.tsx b/web/components/headers/pages.tsx index aed050848a5..707048af4d5 100644 --- a/web/components/headers/pages.tsx +++ b/web/components/headers/pages.tsx @@ -59,14 +59,13 @@ export const PagesHeader = observer(() => {
)} diff --git a/web/components/headers/project-inbox.tsx b/web/components/headers/project-inbox.tsx index 80a39862b49..c5661fe919d 100644 --- a/web/components/headers/project-inbox.tsx +++ b/web/components/headers/project-inbox.tsx @@ -70,7 +70,7 @@ export const ProjectInboxHeader: FC = observer(() => { issue={undefined} /> - diff --git a/web/components/headers/project-issues.tsx b/web/components/headers/project-issues.tsx index 9f64c0d3a0b..f3e6cd0e873 100644 --- a/web/components/headers/project-issues.tsx +++ b/web/components/headers/project-issues.tsx @@ -229,7 +229,6 @@ export const ProjectIssuesHeader: React.FC = observer(() => { toggleCreateIssueModal(true, EIssuesStoreType.PROJECT); }} size="sm" - prependIcon={} >
Add
Issue diff --git a/web/components/headers/project-view-issues.tsx b/web/components/headers/project-view-issues.tsx index 1e21d10c749..3d8d151d083 100644 --- a/web/components/headers/project-view-issues.tsx +++ b/web/components/headers/project-view-issues.tsx @@ -241,7 +241,6 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => { toggleCreateIssueModal(true, EIssuesStoreType.PROJECT_VIEW); }} size="sm" - prependIcon={} > Add Issue diff --git a/web/components/headers/project-views.tsx b/web/components/headers/project-views.tsx index c79934aec2f..e3093e72aed 100644 --- a/web/components/headers/project-views.tsx +++ b/web/components/headers/project-views.tsx @@ -61,13 +61,8 @@ export const ProjectViewsHeader: React.FC = observer(() => {
-
diff --git a/web/components/headers/projects.tsx b/web/components/headers/projects.tsx index ba75832e0b2..4326038178f 100644 --- a/web/components/headers/projects.tsx +++ b/web/components/headers/projects.tsx @@ -167,7 +167,6 @@ export const ProjectsHeader = observer(() => { {isAuthorizedUser && ( - )} +
+
+ +
+ {issue.sub_issues_count > 0 && ( + + )} +
{displayProperties && displayProperties?.key && (
@@ -118,7 +121,7 @@ export const IssueBlock: React.FC = observer((props: IssueBlock
{issue?.is_draft ? ( - +

{issue.name}

) : ( @@ -132,7 +135,7 @@ export const IssueBlock: React.FC = observer((props: IssueBlock className="w-full truncate cursor-pointer text-sm text-custom-text-100" disabled={!!issue?.tempId} > - +

{issue.name}

@@ -151,7 +154,7 @@ export const IssueBlock: React.FC = observer((props: IssueBlock {!issue?.tempId ? ( <> = (props) => { (_list: IGroupByColumn) => validateEmptyIssueGroups(is_list ? issueIds : issueIds?.[_list.id]) && (
-
+
= (props) => { onClose={() => setViewModal(false)} /> -
diff --git a/web/components/pages/list/block-item-action.tsx b/web/components/pages/list/block-item-action.tsx index f9fb57f0fa7..dbe9269a816 100644 --- a/web/components/pages/list/block-item-action.tsx +++ b/web/components/pages/list/block-item-action.tsx @@ -50,24 +50,16 @@ export const BlockItemAction: FC = observer((props) => { return ( <> {/* page details */} -
- {/* Labels - */} -
- - - -
- - {/* 10m read - */} -
- - {access === 0 ? : } - -
+
+ + + +
+
+ + {access === 0 ? : } +
- {/* vertical divider */}