From 0b1b13a68aaa2884efd88335f27da81c8a0aaf87 Mon Sep 17 00:00:00 2001
From: Akshita Goyal <36129505+gakshita@users.noreply.github.com>
Date: Thu, 5 Sep 2024 16:14:12 +0530
Subject: [PATCH] [WEB-2273] Chore: page alignments (#1042)
* chore: headers + common containers
* fix: filters code splitting
* fix: home header
* fix: header changes
* chore: page alignments fixed
* fix: uncommented filters
* fix: used enums
* fix: cards + filters
* fix: enum changes
* fix: reverted package changes
* fix: reverted package changes
* fix: Card + tags seperated + naming fixed
* fix: card + tags seperated + naming fixed
* fix: mobile headers fixed partially
* fix: build errors + minor css
* fix: ee features alignments
* fix: fixed lint issue
---
.../workspace-active-cycles-list.tsx | 34 +++++++++----------
.../workspace-active-cycles-upgrade.tsx | 6 ++--
.../components/cycles/active-cycles/card.tsx | 8 ++---
web/ee/components/projects/header/root.tsx | 2 +-
.../projects/layouts/attributes.tsx | 2 +-
.../projects/layouts/board/group.tsx | 2 +-
.../projects/layouts/board/root.tsx | 5 +--
.../layouts/gallery/base-gallery-root.tsx | 5 +--
.../projects/layouts/gallery/card.tsx | 2 +-
.../projects/layouts/gallery/details.tsx | 4 +--
.../projects/layouts/gantt/blocks.tsx | 4 +--
.../projects/layouts/list/block.tsx | 8 ++---
.../projects/layouts/list/list-group.tsx | 5 +--
13 files changed, 43 insertions(+), 44 deletions(-)
diff --git a/web/ee/components/active-cycles/workspace-active-cycles-list.tsx b/web/ee/components/active-cycles/workspace-active-cycles-list.tsx
index 87d62916cf..241dd1feb8 100644
--- a/web/ee/components/active-cycles/workspace-active-cycles-list.tsx
+++ b/web/ee/components/active-cycles/workspace-active-cycles-list.tsx
@@ -7,7 +7,7 @@ import { useParams } from "next/navigation";
// ui
import useSWR from "swr";
import { ICycle } from "@plane/types";
-import { Button, Loader } from "@plane/ui";
+import { Button, ContentWrapper, Loader } from "@plane/ui";
// components
import { EmptyState } from "@/components/empty-state";
// constants
@@ -83,22 +83,20 @@ export const WorkspaceActiveCyclesList = observer(() => {
}
return (
-
-
- {cycles.slice(0, cyclesInView).map((cycle: any) => (
-
- ))}
- {cyclesInView < cycles.length && cycles.length > 0 && (
-
- )}
-
+
+ {cycles.slice(0, cyclesInView).map((cycle: any) => (
+
+ ))}
+ {cyclesInView < cycles.length && cycles.length > 0 && (
+
+ )}
{pageCount + 1 < totalPages && cycles.length !== 0 && (
+
);
});
diff --git a/web/ee/components/active-cycles/workspace-active-cycles-upgrade.tsx b/web/ee/components/active-cycles/workspace-active-cycles-upgrade.tsx
index a0a4f47829..33d4a3d56f 100644
--- a/web/ee/components/active-cycles/workspace-active-cycles-upgrade.tsx
+++ b/web/ee/components/active-cycles/workspace-active-cycles-upgrade.tsx
@@ -6,7 +6,7 @@ import Image from "next/image";
// icons
import { Crown } from "lucide-react";
// ui
-import { Button } from "@plane/ui";
+import { Button, ContentWrapper } from "@plane/ui";
// constants
import { WORKSPACE_ACTIVE_CYCLES_DETAILS } from "@/constants/cycle";
// helper
@@ -25,7 +25,7 @@ export const WorkspaceActiveCyclesUpgrade = observer(() => {
const isDarkMode = userProfile?.theme.theme === "dark";
return (
-
-
+
);
});
diff --git a/web/ee/components/cycles/active-cycles/card.tsx b/web/ee/components/cycles/active-cycles/card.tsx
index 009279d5a4..1dfc69ca60 100644
--- a/web/ee/components/cycles/active-cycles/card.tsx
+++ b/web/ee/components/cycles/active-cycles/card.tsx
@@ -3,6 +3,7 @@ import useSWR from "swr";
// types
import { IActiveCycle } from "@plane/types";
// plane web components
+import { Card } from "@plane/ui";
import {
ActiveCyclesProjectTitle,
ActiveCycleHeader,
@@ -43,10 +44,7 @@ export const ActiveCycleInfoCard: FC = (props) => {
}, [progress, cycle]);
return (
-
+
@@ -56,6 +54,6 @@ export const ActiveCycleInfoCard: FC = (props) => {
-
+
);
};
diff --git a/web/ee/components/projects/header/root.tsx b/web/ee/components/projects/header/root.tsx
index b468fbde68..41d613ad47 100644
--- a/web/ee/components/projects/header/root.tsx
+++ b/web/ee/components/projects/header/root.tsx
@@ -38,7 +38,7 @@ export const ProjectsListHeader = observer(() => {
if (!workspaceSlug || !workspaceId) return <>>;
return isProjectGroupingEnabled ? (
-
+
{/* flex-row items-center justify-between gap-x-2 gap-y-4 */}
diff --git a/web/ee/components/projects/layouts/attributes.tsx b/web/ee/components/projects/layouts/attributes.tsx
index 0955830572..301a6b4460 100644
--- a/web/ee/components/projects/layouts/attributes.tsx
+++ b/web/ee/components/projects/layouts/attributes.tsx
@@ -51,7 +51,7 @@ const Attributes: React.FC
= observer((props) => {
e.preventDefault();
};
return (
-
+
= observer((props) => {
const [verticalAlign, setVerticalAlign] = useState<{ [key: string]: boolean }>({});
return (
-
+
{Object.entries(groupByProjectIds)?.map(([groupKey, projectIds]) => (
{
return (
-
+
);
});
diff --git a/web/ee/components/projects/layouts/gallery/base-gallery-root.tsx b/web/ee/components/projects/layouts/gallery/base-gallery-root.tsx
index c6190d5b07..b63e149bc2 100644
--- a/web/ee/components/projects/layouts/gallery/base-gallery-root.tsx
+++ b/web/ee/components/projects/layouts/gallery/base-gallery-root.tsx
@@ -1,5 +1,6 @@
import { observer } from "mobx-react";
// assets
+import { ContentWrapper } from "@plane/ui";
import { useProject } from "@/hooks/store";
import { useProjectFilter } from "@/plane-web/hooks/store/workspace-project-states/use-project-filters";
import { TProject } from "@/plane-web/types/projects";
@@ -16,7 +17,7 @@ export const BaseProjectRoot = observer(() => {
return (
-
+
{filteredProjectIds &&
filteredProjectIds.map((projectId) => {
@@ -25,7 +26,7 @@ export const BaseProjectRoot = observer(() => {
return
;
})}
-
+
);
});
diff --git a/web/ee/components/projects/layouts/gallery/card.tsx b/web/ee/components/projects/layouts/gallery/card.tsx
index 54a5629da4..92e2ccac36 100644
--- a/web/ee/components/projects/layouts/gallery/card.tsx
+++ b/web/ee/components/projects/layouts/gallery/card.tsx
@@ -112,7 +112,7 @@ export const ProjectCard: React.FC
= observer((props) => {
{!project.archived_at && filters?.scope === EProjectScope.ALL_PROJECTS && (
-
+
)}
);
diff --git a/web/ee/components/projects/layouts/gallery/details.tsx b/web/ee/components/projects/layouts/gallery/details.tsx
index a46b975955..580143f0a3 100644
--- a/web/ee/components/projects/layouts/gallery/details.tsx
+++ b/web/ee/components/projects/layouts/gallery/details.tsx
@@ -131,7 +131,7 @@ const Details: React.FC
= observer((props) => {
];
return (
-
+
![]()
= observer((props) => {
)}
-
+
diff --git a/web/ee/components/projects/layouts/gantt/blocks.tsx b/web/ee/components/projects/layouts/gantt/blocks.tsx
index fb0bb0680f..31c2912aa4 100644
--- a/web/ee/components/projects/layouts/gantt/blocks.tsx
+++ b/web/ee/components/projects/layouts/gantt/blocks.tsx
@@ -100,12 +100,12 @@ export const ProjectGanttSidebarBlock: React.FC
= observer((props)
return projectDetails.is_member ? (
{children}
) : (
-
+
{children}
);
diff --git a/web/ee/components/projects/layouts/list/block.tsx b/web/ee/components/projects/layouts/list/block.tsx
index 56005d6c32..7317893913 100644
--- a/web/ee/components/projects/layouts/list/block.tsx
+++ b/web/ee/components/projects/layouts/list/block.tsx
@@ -5,7 +5,7 @@ import { observer } from "mobx-react";
import Link from "next/link";
import { useParams, useRouter } from "next/navigation";
// ui
-import { Spinner, Tooltip, setToast, TOAST_TYPE, Logo } from "@plane/ui";
+import { Spinner, Tooltip, setToast, TOAST_TYPE, Logo, Row } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
@@ -43,10 +43,10 @@ export const ProjectBlock = observer((props: ProjectBlockProps) => {
const projectDetails = getProjectById(projectId);
if (!projectDetails || !currentWorkspace) return
;
return (
-
{
>
-
+
);
});
diff --git a/web/ee/components/projects/layouts/list/list-group.tsx b/web/ee/components/projects/layouts/list/list-group.tsx
index b4de1f946c..9d74bb61ae 100644
--- a/web/ee/components/projects/layouts/list/list-group.tsx
+++ b/web/ee/components/projects/layouts/list/list-group.tsx
@@ -6,6 +6,7 @@ import { cn } from "@plane/editor";
// plane
import { TIssueGroupByOptions, IIssueDisplayProperties } from "@plane/types";
//
+import { Row } from "@plane/ui";
import { useMember, useWorkspace } from "@/hooks/store";
import { useProjectFilter, useWorkspaceProjectStates } from "@/plane-web/hooks/store";
import { groupDetails } from "../board/utils";
@@ -70,7 +71,7 @@ export const ListGroup = observer((props: Props) => {
return groupedProjectIds.length > 0 ? (
-
+
{
toggleListGroup={toggleListGroup}
count={groupedProjectIds.length}
/>
-
+
{shouldExpand && (
)}