From e538bfad1fe0dc8eaca0a87f4654e278dbb7bc00 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Mon, 24 Jun 2024 17:15:35 +0530 Subject: [PATCH] [WEB-1702] chore: fix project archives breadcrumbs and minor ui fixes in profile page. (#4916) * [WEB-1702] chore: fix project archives breadcrumbs. * chore: minor padding fix in profile page. * chore: update archive page breadcrumbs display logic. * chore: add/ update page title. --- .../profile/[userId]/activity/page.tsx | 34 +++++++++++-------- .../[projectId]/archives/cycles/layout.tsx | 2 +- .../(detail)/[projectId]/archives/header.tsx | 11 +++--- .../archives/issues/(list)/layout.tsx | 2 +- .../[projectId]/archives/modules/layout.tsx | 2 +- web/app/profile/appearance/page.tsx | 2 +- web/app/profile/notifications/page.tsx | 2 +- web/app/profile/page.tsx | 2 +- web/app/profile/security/page.tsx | 2 +- 9 files changed, 33 insertions(+), 26 deletions(-) diff --git a/web/app/[workspaceSlug]/(projects)/profile/[userId]/activity/page.tsx b/web/app/[workspaceSlug]/(projects)/profile/[userId]/activity/page.tsx index 8b5ba07e0c..cae273fd4c 100644 --- a/web/app/[workspaceSlug]/(projects)/profile/[userId]/activity/page.tsx +++ b/web/app/[workspaceSlug]/(projects)/profile/[userId]/activity/page.tsx @@ -6,6 +6,7 @@ import { useParams } from "next/navigation"; // ui import { Button } from "@plane/ui"; // components +import { PageHead } from "@/components/core"; import { DownloadActivityButton, WorkspaceActivityListPage } from "@/components/profile"; // constants import { EUserWorkspaceRoles } from "@/constants/workspace"; @@ -50,22 +51,25 @@ const ProfileActivityPage = observer(() => { currentUser?.id === userId && !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER; return ( -
-
-

Recent activity

- {canDownloadActivity && } + <> + +
+
+

Recent activity

+ {canDownloadActivity && } +
+
+ {activityPages} + {pageCount < totalPages && resultsCount !== 0 && ( +
+ +
+ )} +
-
- {activityPages} - {pageCount < totalPages && resultsCount !== 0 && ( -
- -
- )} -
-
+ ); }); diff --git a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/cycles/layout.tsx b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/cycles/layout.tsx index ced92a6ac8..5da3018b3f 100644 --- a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/cycles/layout.tsx +++ b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/cycles/layout.tsx @@ -7,7 +7,7 @@ import { ProjectArchivesHeader } from "../header"; export default function ProjectArchiveCyclesLayout({ children }: { children: React.ReactNode }) { return ( <> - } /> + } /> {children} ); diff --git a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/header.tsx b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/header.tsx index 8d7e934060..5f6db17a8a 100644 --- a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/header.tsx +++ b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/header.tsx @@ -2,7 +2,7 @@ import { FC } from "react"; import { observer } from "mobx-react"; -import { useParams, usePathname } from "next/navigation"; +import { useParams } from "next/navigation"; // ui import { ArchiveIcon, Breadcrumbs, Tooltip } from "@plane/ui"; // components @@ -15,12 +15,15 @@ import { useIssues, useProject } from "@/hooks/store"; import { useAppRouter } from "@/hooks/use-app-router"; import { usePlatformOS } from "@/hooks/use-platform-os"; -export const ProjectArchivesHeader: FC = observer(() => { +type TProps = { + activeTab: 'issues' | 'cycles' | 'modules'; +} + +export const ProjectArchivesHeader: FC = observer((props: TProps) => { + const { activeTab } = props; // router const router = useAppRouter(); const { workspaceSlug, projectId } = useParams(); - const pathname = usePathname(); - const activeTab = pathname.split("/").pop(); // store hooks const { issuesFilter: { issueFilters }, diff --git a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(list)/layout.tsx b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(list)/layout.tsx index d12a5e01dd..eb2df313da 100644 --- a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(list)/layout.tsx +++ b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(list)/layout.tsx @@ -7,7 +7,7 @@ import { ProjectArchivesHeader } from "../../header"; export default function ProjectArchiveIssuesLayout({ children }: { children: React.ReactNode }) { return ( <> - } /> + } /> {children} ); diff --git a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/modules/layout.tsx b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/modules/layout.tsx index 333bcf74d6..c1e48db7c0 100644 --- a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/modules/layout.tsx +++ b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/modules/layout.tsx @@ -7,7 +7,7 @@ import { ProjectArchivesHeader } from "../header"; export default function ProjectArchiveModulesLayout({ children }: { children: React.ReactNode }) { return ( <> - } /> + } /> {children} ); diff --git a/web/app/profile/appearance/page.tsx b/web/app/profile/appearance/page.tsx index 4a4c85d2f1..e3a2840d58 100644 --- a/web/app/profile/appearance/page.tsx +++ b/web/app/profile/appearance/page.tsx @@ -49,7 +49,7 @@ const ProfileAppearancePage = observer(() => { return ( <> - + {userProfile ? ( diff --git a/web/app/profile/notifications/page.tsx b/web/app/profile/notifications/page.tsx index f6bb1e4e51..b39563378b 100644 --- a/web/app/profile/notifications/page.tsx +++ b/web/app/profile/notifications/page.tsx @@ -23,7 +23,7 @@ export default function ProfileNotificationPage() { return ( <> - + { */}
-
+

First name* diff --git a/web/app/profile/security/page.tsx b/web/app/profile/security/page.tsx index 503c099f6e..e1de5ef1f1 100644 --- a/web/app/profile/security/page.tsx +++ b/web/app/profile/security/page.tsx @@ -130,7 +130,7 @@ const SecurityPage = observer(() => { return ( <> - +