From cb4cb922b9cb0784125878d6931544c5ca87bd97 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Mon, 21 Jul 2025 18:39:03 -0700 Subject: [PATCH] improvement: design revisions and various overflow handling --- .../components/OrgSidebar/OrgSidebar.tsx | 4 +- .../ProjectSelect/ProjectSelect.tsx | 2 +- .../components/AllProjectView.tsx | 81 +++++++------- .../ProjectsPage/components/MyProjectView.tsx | 104 ++++++++++-------- .../components/ProjectListToggle.tsx | 2 +- .../OverviewPage/components/utils/index.ts | 2 +- 6 files changed, 110 insertions(+), 85 deletions(-) diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSidebar.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSidebar.tsx index 0bab1fcb5..7b2e5f154 100644 --- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSidebar.tsx +++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSidebar.tsx @@ -1,12 +1,12 @@ import { faBook, faCog, - faCubes, faDoorClosed, faInfinity, faMoneyBill, faPlug, faShare, + faTable, faUserCog, faUsers, faUserTie @@ -56,7 +56,7 @@ export const OrgSidebar = ({ isHidden }: Props) => {
- +
Projects
diff --git a/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx b/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx index 37d5f9ce9..b66717a5c 100644 --- a/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx +++ b/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx @@ -110,7 +110,7 @@ export const ProjectSelect = () => {
- +
{currentWorkspace?.name}
diff --git a/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx b/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx index 7d63243c6..52d8e5368 100644 --- a/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx +++ b/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx @@ -17,6 +17,7 @@ import { twMerge } from "tailwind-merge"; import { createNotification } from "@app/components/notifications"; import { OrgPermissionCan } from "@app/components/permissions"; import { + Badge, Button, DropdownMenu, DropdownMenuContent, @@ -26,6 +27,7 @@ import { FormControl, IconButton, Input, + Lottie, Modal, ModalContent, Pagination, @@ -33,7 +35,7 @@ import { Tooltip } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; -import { getProjectHomePage, getProjectTitle } from "@app/helpers/project"; +import { getProjectHomePage, getProjectLottieIcon, getProjectTitle } from "@app/helpers/project"; import { getUserTablePreference, PreferenceKey, @@ -216,14 +218,17 @@ export const AllProjectView = ({
- - - +
+ + + +
( -
- )} - +
+
+
-
- {getProjectTitle(workspace.type)}{" "} - {workspace.description ? `- ${workspace.description}` : ""} +
+

{workspace.name}

+

+ {getProjectTitle(workspace.type)}{" "} + {workspace.description ? `- ${workspace.description}` : ""} +

+ {workspace.isMember ? ( + + + Joined + + ) : ( +
+ +
+ )}
))} diff --git a/frontend/src/pages/organization/ProjectsPage/components/MyProjectView.tsx b/frontend/src/pages/organization/ProjectsPage/components/MyProjectView.tsx index 57db07e15..e9eb251e9 100644 --- a/frontend/src/pages/organization/ProjectsPage/components/MyProjectView.tsx +++ b/frontend/src/pages/organization/ProjectsPage/components/MyProjectView.tsx @@ -192,47 +192,46 @@ export const MyProjectView = ({ }); }} key={workspace.id} - className="relative flex h-36 min-w-72 cursor-pointer flex-col rounded-md border border-mineshaft-500 bg-mineshaft-800 p-4 transition-all hover:border-mineshaft-400" + className="cursor-pointer overflow-clip rounded border border-l-[4px] border-mineshaft-600 border-l-mineshaft-400 bg-mineshaft-800 p-4 transition-transform duration-100 hover:scale-[103%] hover:border-l-primary hover:bg-mineshaft-700" >
-
- +
+
-
-
-
-
{workspace.name}
-
-
- {isFavorite ? ( - { - e.stopPropagation(); - removeProjectFromFavorites(workspace.id); - }} - /> - ) : ( - { - e.stopPropagation(); - addProjectToFavorites(workspace.id); - }} - /> - )} -
-
-
+
+

{workspace.name}

+

{getProjectTitle(workspace.type)} -

+

+
+
+ {isFavorite ? ( + { + e.stopPropagation(); + removeProjectFromFavorites(workspace.id); + }} + /> + ) : ( + { + e.stopPropagation(); + addProjectToFavorites(workspace.id); + }} + /> + )}
-
+

{workspace.description || "No description"} -

+

); const renderProjectListItem = (workspace: Workspace, isFavorite: boolean, index: number) => ( @@ -247,18 +246,26 @@ export const MyProjectView = ({ }); }} key={workspace.id} - className={`group grid h-16 min-w-72 cursor-pointer grid-cols-6 border-l border-r border-t border-mineshaft-600 bg-mineshaft-800 px-6 hover:bg-mineshaft-700 ${ + className={`group flex min-w-72 cursor-pointer border-l border-r border-t border-mineshaft-600 bg-mineshaft-800 px-6 py-3 hover:bg-mineshaft-700 ${ index === 0 && "rounded-t-md" }`} > -
-
{workspace.name}
-
- {getProjectTitle(workspace.type)}{" "} - {workspace.description ? `- ${workspace.description}` : ""} +
+
+ +
+
+

{workspace.name}

+

+ {getProjectTitle(workspace.type)}{" "} + {workspace.description ? `- ${workspace.description}` : ""} +

-
+
{isFavorite ? ( +
{isProjectViewLoading && Array.apply(0, Array(3)).map((_x, i) => (
No projects match search...
); + } else if (filteredWorkspaces.length === 0) { + projectsComponents = ( +
+ +
No projects match filters...
+
+ ); } + return (
@@ -457,7 +475,7 @@ export const MyProjectView = ({ {(isAllowed) => (