chore: breadcrumbs ui component (#2458)

* chore: swap breadcrumbs component with plane/ui component

* chore: breadcrumb refactor
This commit is contained in:
Anmol Singh Bhatia 2023-10-17 17:25:02 +05:30 committed by GitHub
parent 123634f5e8
commit b0c1af2b25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 403 additions and 183 deletions

View File

@ -0,0 +1,59 @@
import * as React from "react";
// icons
import { MoveLeft } from "lucide-react";
type BreadcrumbsProps = {
onBack: () => void;
children: any;
};
const Breadcrumbs = ({ onBack, children }: BreadcrumbsProps) => (
<>
<div className="flex w-full flex-grow items-center overflow-hidden overflow-ellipsis whitespace-nowrap">
<button
type="button"
className="group grid h-7 w-7 flex-shrink-0 cursor-pointer place-items-center rounded border border-custom-sidebar-border-200 text-center text-sm hover:bg-custom-sidebar-background-90"
onClick={onBack}
>
<MoveLeft className="h-4 w-4 text-custom-sidebar-text-200 group-hover:text-custom-sidebar-text-100" />
</button>
{children}
</div>
</>
);
type BreadcrumbItemProps = {
title?: string;
link?: JSX.Element;
icon?: any;
unshrinkTitle?: boolean;
};
const BreadcrumbItem: React.FC<BreadcrumbItemProps> = ({
title,
link,
icon,
unshrinkTitle = false,
}) => (
<>
{link ? (
link
) : (
<div
className={`truncate px-3 text-sm ${
unshrinkTitle ? "flex-shrink-0" : ""
}`}
>
<p className={`truncate ${icon ? "flex items-center gap-2" : ""}`}>
{icon}
<span className="break-words">{title}</span>
</p>
</div>
)}
</>
);
Breadcrumbs.BreadcrumbItem = BreadcrumbItem;
export { Breadcrumbs, BreadcrumbItem };

View File

@ -0,0 +1 @@
export * from "./breadcrumbs";

View File

@ -5,3 +5,4 @@ export * from "./spinners";
export * from "./loader"; export * from "./loader";
export * from "./tooltip"; export * from "./tooltip";
export * from "./icons"; export * from "./icons";
export * from "./breadcrumbs";

View File

@ -1,10 +1,10 @@
import { FC } from "react"; import * as React from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import { ArrowLeft, Plus } from "lucide-react"; import { ArrowLeft, Plus } from "lucide-react";
// components
import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs";
// ui // ui
import { Button } from "@plane/ui"; import { Breadcrumbs, BreadcrumbItem, Button } from "@plane/ui";
// helpers // helpers
import { truncateText } from "helpers/string.helper"; import { truncateText } from "helpers/string.helper";
@ -12,7 +12,7 @@ export interface ICyclesHeader {
name: string | undefined; name: string | undefined;
} }
export const CyclesHeader: FC<ICyclesHeader> = (props) => { export const CyclesHeader: React.FC<ICyclesHeader> = (props) => {
const { name } = props; const { name } = props;
// router // router
const router = useRouter(); const router = useRouter();
@ -20,9 +20,9 @@ export const CyclesHeader: FC<ICyclesHeader> = (props) => {
return ( return (
<div <div
className={`relative flex w-full flex-shrink-0 flex-row z-10 items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4`} className={`relative z-10 flex w-full flex-shrink-0 flex-row items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4`}
> >
<div className="flex items-center gap-2 flex-grow w-full whitespace-nowrap overflow-ellipsis"> <div className="flex w-full flex-grow items-center gap-2 overflow-ellipsis whitespace-nowrap">
<div className="block md:hidden"> <div className="block md:hidden">
<button <button
type="button" type="button"
@ -33,8 +33,16 @@ export const CyclesHeader: FC<ICyclesHeader> = (props) => {
</button> </button>
</div> </div>
<div> <div>
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(name ?? "Project", 32)} Cycles`} /> <BreadcrumbItem title={`${truncateText(name ?? "Project", 32)} Cycles`} />
</Breadcrumbs> </Breadcrumbs>
</div> </div>

View File

@ -1,10 +1,10 @@
import { Dispatch, FC, SetStateAction } from "react"; import { Dispatch, FC, SetStateAction } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import { ArrowLeft, Plus } from "lucide-react"; import { ArrowLeft, Plus } from "lucide-react";
// components // components
import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs";
// ui // ui
import { Button, Tooltip } from "@plane/ui"; import { Breadcrumbs, BreadcrumbItem, Button, Tooltip } from "@plane/ui";
import { Icon } from "components/ui"; import { Icon } from "components/ui";
// helper // helper
import { replaceUnderscoreIfSnakeCase, truncateText } from "helpers/string.helper"; import { replaceUnderscoreIfSnakeCase, truncateText } from "helpers/string.helper";
@ -34,9 +34,9 @@ export const ModulesHeader: FC<IModulesHeader> = (props) => {
return ( return (
<div <div
className={`relative flex w-full flex-shrink-0 flex-row z-10 items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4`} className={`relative z-10 flex w-full flex-shrink-0 flex-row items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4`}
> >
<div className="flex items-center gap-2 flex-grow w-full whitespace-nowrap overflow-ellipsis"> <div className="flex w-full flex-grow items-center gap-2 overflow-ellipsis whitespace-nowrap">
<div className="block md:hidden"> <div className="block md:hidden">
<button <button
type="button" type="button"
@ -47,9 +47,17 @@ export const ModulesHeader: FC<IModulesHeader> = (props) => {
</button> </button>
</div> </div>
<div> <div>
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
<BreadcrumbItem title={`${truncateText(name ?? "Project", 32)} Cycles`} /> link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(name ?? "Project", 32)} Modules`} />
</Breadcrumbs> </Breadcrumbs>
</div> </div>
</div> </div>
@ -62,7 +70,7 @@ export const ModulesHeader: FC<IModulesHeader> = (props) => {
> >
<button <button
type="button" type="button"
className={`grid h-7 w-7 place-items-center rounded p-1 outline-none hover:bg-custom-sidebar-background-80 duration-300 ${ className={`grid h-7 w-7 place-items-center rounded p-1 outline-none duration-300 hover:bg-custom-sidebar-background-80 ${
modulesView === option.type ? "bg-custom-sidebar-background-80" : "text-custom-sidebar-text-200" modulesView === option.type ? "bg-custom-sidebar-background-80" : "text-custom-sidebar-text-200"
}`} }`}
onClick={() => setModulesView(option.type)} onClick={() => setModulesView(option.type)}

View File

@ -1,7 +1,7 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { ArrowLeft } from "lucide-react"; import { ArrowLeft } from "lucide-react";
// components // components
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs } from "@plane/ui";
export const ProfilePreferencesHeader = () => { export const ProfilePreferencesHeader = () => {
const router = useRouter(); const router = useRouter();
@ -21,7 +21,7 @@ export const ProfilePreferencesHeader = () => {
</button> </button>
</div> </div>
<div> <div>
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="My Profile Preferences" /> <BreadcrumbItem title="My Profile Preferences" />
</Breadcrumbs> </Breadcrumbs>
</div> </div>

View File

@ -9,8 +9,7 @@ import { useMobxStore } from "lib/mobx/store-provider";
import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "components/issues"; import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "components/issues";
import { ProjectAnalyticsModal } from "components/analytics"; import { ProjectAnalyticsModal } from "components/analytics";
// ui // ui
import { Button } from "@plane/ui"; import { Breadcrumbs, BreadcrumbItem, Button } from "@plane/ui";
import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs";
// types // types
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueLayouts } from "types"; import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueLayouts } from "types";
// constants // constants
@ -115,8 +114,16 @@ export const ProjectIssuesHeader: FC = observer(() => {
</button> </button>
</div> </div>
<div> <div>
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Issues`} /> <BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Issues`} />
</Breadcrumbs> </Breadcrumbs>
</div> </div>

View File

@ -1,11 +1,11 @@
import { FC, useState } from "react"; import { FC, useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
// icons // icons
import { ArrowLeft, Plus } from "lucide-react"; import { ArrowLeft, Link, Plus } from "lucide-react";
// components // components
import { CreateUpdateProjectViewModal } from "components/views"; import { CreateUpdateProjectViewModal } from "components/views";
// components // components
import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs"; import { Breadcrumbs, BreadcrumbItem } from "@plane/ui";
// ui // ui
import { PrimaryButton } from "components/ui"; import { PrimaryButton } from "components/ui";
// helpers // helpers
@ -40,8 +40,16 @@ export const ProjectViewsHeader: FC<IProjectViewsHeader> = (props) => {
</button> </button>
</div> </div>
<div> <div>
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(title ?? "Project", 32)} Cycles`} /> <BreadcrumbItem title={`${truncateText(title ?? "Project", 32)} Cycles`} />
</Breadcrumbs> </Breadcrumbs>
</div> </div>

View File

@ -1,8 +1,7 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { ArrowLeft, Search, Plus } from "lucide-react"; import { ArrowLeft, Search, Plus } from "lucide-react";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs, Button } from "@plane/ui";
import { Button } from "@plane/ui";
// helper // helper
import { truncateText } from "helpers/string.helper"; import { truncateText } from "helpers/string.helper";
// hooks // hooks
@ -30,7 +29,7 @@ export const ProjectsHeader = observer(() => {
</button> </button>
</div> </div>
<div> <div>
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(currentWorkspace?.name ?? "Workspace", 32)} Projects`} title={`${truncateText(currentWorkspace?.name ?? "Workspace", 32)} Projects`}
unshrinkTitle={false} unshrinkTitle={false}

View File

@ -1,7 +1,7 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { ArrowLeft } from "lucide-react"; import { ArrowLeft } from "lucide-react";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs } from "@plane/ui";
export const WorkspaceAnalyticsHeader = () => { export const WorkspaceAnalyticsHeader = () => {
const router = useRouter(); const router = useRouter();
@ -22,7 +22,7 @@ export const WorkspaceAnalyticsHeader = () => {
</button> </button>
</div> </div>
<div> <div>
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Workspace Analytics" /> <BreadcrumbItem title="Workspace Analytics" />
</Breadcrumbs> </Breadcrumbs>
</div> </div>

View File

@ -1,3 +1,4 @@
import { useRouter } from "next/router";
// hooks // hooks
import { useWorkspaceMyMembership } from "contexts/workspace-member.context"; import { useWorkspaceMyMembership } from "contexts/workspace-member.context";
// layouts // layouts
@ -5,24 +6,27 @@ import { WorkspaceAuthorizationLayout } from "layouts/auth-layout-legacy";
// components // components
import { ProfileNavbar, ProfileSidebar } from "components/profile"; import { ProfileNavbar, ProfileSidebar } from "components/profile";
// ui // ui
import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs"; import { Breadcrumbs, BreadcrumbItem } from "@plane/ui";
type Props = { type Props = {
children: React.ReactNode; children: React.ReactNode;
className?: string; className?: string;
}; };
export const ProfileAuthWrapper = (props: Props) => ( export const ProfileAuthWrapper = (props: Props) => {
<WorkspaceAuthorizationLayout const router = useRouter();
breadcrumbs={ return (
<Breadcrumbs> <WorkspaceAuthorizationLayout
<BreadcrumbItem title="User Profile" /> breadcrumbs={
</Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
} <BreadcrumbItem title="User Profile" />
> </Breadcrumbs>
<ProfileLayout {...props} /> }
</WorkspaceAuthorizationLayout> >
); <ProfileLayout {...props} />
</WorkspaceAuthorizationLayout>
);
};
const ProfileLayout: React.FC<Props> = ({ children, className }) => { const ProfileLayout: React.FC<Props> = ({ children, className }) => {
const { memberRole } = useWorkspaceMyMembership(); const { memberRole } = useWorkspaceMyMembership();

View File

@ -11,8 +11,7 @@ import useMyIssuesFilters from "hooks/my-issues/use-my-issues-filter";
// components // components
import { MyIssuesView, MyIssuesViewOptions } from "components/issues"; import { MyIssuesView, MyIssuesViewOptions } from "components/issues";
// ui // ui
import { Button } from "@plane/ui"; import { Breadcrumbs, BreadcrumbItem, Button } from "@plane/ui";
import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs";
// types // types
import type { NextPage } from "next"; import type { NextPage } from "next";
import useUser from "hooks/use-user"; import useUser from "hooks/use-user";
@ -78,7 +77,7 @@ const MyIssuesPage: NextPage = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="My Issues" /> <BreadcrumbItem title="My Issues" />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -11,8 +11,7 @@ import { RichReadOnlyEditor } from "@plane/rich-text-editor";
// icons // icons
import { History, MessageSquare } from "lucide-react"; import { History, MessageSquare } from "lucide-react";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs, ExternalLinkIcon, Loader } from "@plane/ui";
import { ExternalLinkIcon, Loader } from "@plane/ui";
// fetch-keys // fetch-keys
import { USER_ACTIVITY } from "constants/fetch-keys"; import { USER_ACTIVITY } from "constants/fetch-keys";
// helper // helper
@ -33,7 +32,7 @@ const ProfileActivity = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="My Profile Activity" /> <BreadcrumbItem title="My Profile Activity" />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -14,9 +14,8 @@ import { WorkspaceAuthorizationLayout } from "layouts/auth-layout-legacy";
import { ImagePickerPopover, ImageUploadModal } from "components/core"; import { ImagePickerPopover, ImageUploadModal } from "components/core";
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { Button, Input, Spinner } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button, Input, Spinner } from "@plane/ui";
import { CustomSearchSelect, CustomSelect } from "components/ui"; import { CustomSearchSelect, CustomSelect } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons // icons
import { User2, UserCircle2 } from "lucide-react"; import { User2, UserCircle2 } from "lucide-react";
// types // types
@ -147,7 +146,7 @@ const Profile: NextPage = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="My Profile" /> <BreadcrumbItem title="My Profile" />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,6 +1,7 @@
import React, { useCallback, useEffect, useState } from "react"; import React, { useCallback, useEffect, useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR, { mutate } from "swr"; import useSWR, { mutate } from "swr";
@ -16,8 +17,7 @@ import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy";
// components // components
import { IssueDetailsSidebar, IssueMainContent } from "components/issues"; import { IssueDetailsSidebar, IssueMainContent } from "components/issues";
// ui // ui
import { Breadcrumbs } from "components/breadcrumbs"; import { ArchiveIcon, Breadcrumbs, Loader } from "@plane/ui";
import { ArchiveIcon, Loader } from "@plane/ui";
// icons // icons
import { History } from "lucide-react"; import { History } from "lucide-react";
// types // types
@ -145,11 +145,18 @@ const ArchivedIssueDetailsPage: NextPage = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<Breadcrumbs.BreadcrumbItem <Breadcrumbs.BreadcrumbItem
title={`${truncateText(issueDetails?.project_detail.name ?? "Project", 32)} Issues`} link={
link={`/${workspaceSlug}/projects/${projectId as string}/issues`} <Link href={`/${workspaceSlug}/projects/${projectId as string}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(
issueDetails?.project_detail.name ?? "Project",
32
)} Issues`}</p>
</a>
</Link>
}
/> />
<Breadcrumbs.BreadcrumbItem <Breadcrumbs.BreadcrumbItem
title={`Issue ${issueDetails?.project_detail.identifier ?? "Project"}-${ title={`Issue ${issueDetails?.project_detail.identifier ?? "Project"}-${

View File

@ -1,4 +1,5 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -13,10 +14,9 @@ import { truncateText } from "helpers/string.helper";
// components // components
import { IssuesFilterView, IssuesView } from "components/core"; import { IssuesFilterView, IssuesView } from "components/core";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { ArchiveIcon, BreadcrumbItem, Breadcrumbs } from "@plane/ui";
// icons // icons
import { X } from "lucide-react"; import { X } from "lucide-react";
import { ArchiveIcon } from "@plane/ui";
// types // types
import type { NextPage } from "next"; import type { NextPage } from "next";
// fetch-keys // fetch-keys
@ -38,8 +38,16 @@ const ProjectArchivedIssues: NextPage = () => {
<IssueViewContextProvider> <IssueViewContextProvider>
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Archived Issues`} /> <BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Archived Issues`} />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,8 +1,8 @@
import React, { useState } from "react"; import React, { useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
// icons // icons
import { ContrastIcon } from "@plane/ui";
import { ArrowLeft } from "lucide-react"; import { ArrowLeft } from "lucide-react";
// layouts // layouts
import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy"; import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy";
@ -19,9 +19,9 @@ import { CycleService } from "services/cycle.service";
import useToast from "hooks/use-toast"; import useToast from "hooks/use-toast";
import useUserAuth from "hooks/use-user-auth"; import useUserAuth from "hooks/use-user-auth";
// ui // ui
import { BreadcrumbItem, Breadcrumbs, ContrastIcon } from "@plane/ui";
import { CustomMenu } from "components/ui"; import { CustomMenu } from "components/ui";
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// images // images
import emptyCycle from "public/empty-state/cycle.svg"; import emptyCycle from "public/empty-state/cycle.svg";
// helpers // helpers
@ -97,11 +97,18 @@ const SingleCycle: React.FC = () => {
/> />
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <Breadcrumbs.BreadcrumbItem
title={`${truncateText(cycleDetails?.project_detail.name ?? "Project", 32)} Cycles`} link={
link={`/${workspaceSlug}/projects/${projectId}/cycles`} <Link href={`/${workspaceSlug}/projects/${projectId}/cycles`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(
cycleDetails?.project_detail.name ?? "Project",
32
)} Cycles`}</p>
</a>
</Link>
}
/> />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,4 +1,5 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -13,7 +14,7 @@ import { truncateText } from "helpers/string.helper";
// components // components
import { IssuesFilterView, IssuesView } from "components/core"; import { IssuesFilterView, IssuesView } from "components/core";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs } from "@plane/ui";
// icons // icons
import { X, PenSquare } from "lucide-react"; import { X, PenSquare } from "lucide-react";
// types // types
@ -37,8 +38,16 @@ const ProjectDraftIssues: NextPage = () => {
<IssueViewContextProvider> <IssueViewContextProvider>
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Draft Issues`} /> <BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Draft Issues`} />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,4 +1,6 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import { NextPage } from "next"; import { NextPage } from "next";
import useSWR from "swr"; import useSWR from "swr";
// hooks // hooks
@ -11,7 +13,7 @@ import { ProjectInboxHeader } from "components/headers";
// helper // helper
import { truncateText } from "helpers/string.helper"; import { truncateText } from "helpers/string.helper";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs } from "@plane/ui";
const ProjectInbox: NextPage = () => { const ProjectInbox: NextPage = () => {
const router = useRouter(); const router = useRouter();
@ -37,8 +39,16 @@ const ProjectInbox: NextPage = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "", 32)} Inbox`} /> <BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "", 32)} Inbox`} />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,6 +1,7 @@
import React, { useCallback, useEffect } from "react"; import React, { useCallback, useEffect } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR, { mutate } from "swr"; import useSWR, { mutate } from "swr";
@ -16,8 +17,7 @@ import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy";
import { IssueDetailsSidebar, IssueMainContent } from "components/issues"; import { IssueDetailsSidebar, IssueMainContent } from "components/issues";
// ui // ui
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
import { Breadcrumbs } from "components/breadcrumbs"; import { Breadcrumbs, Loader } from "@plane/ui";
import { Loader } from "@plane/ui";
// images // images
import emptyIssue from "public/empty-state/issue.svg"; import emptyIssue from "public/empty-state/issue.svg";
// types // types
@ -120,11 +120,18 @@ const IssueDetailsPage: NextPage = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<Breadcrumbs.BreadcrumbItem <Breadcrumbs.BreadcrumbItem
title={`${truncateText(issueDetails?.project_detail.name ?? "Project", 32)} Issues`} link={
link={`/${workspaceSlug}/projects/${projectId as string}/issues`} <Link href={`/${workspaceSlug}/projects/${projectId as string}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(
issueDetails?.project_detail.name ?? "Project",
32
)} Issues`}</p>
</a>
</Link>
}
/> />
<Breadcrumbs.BreadcrumbItem <Breadcrumbs.BreadcrumbItem
title={`Issue ${issueDetails?.project_detail.identifier ?? "Project"}-${ title={`Issue ${issueDetails?.project_detail.identifier ?? "Project"}-${

View File

@ -1,8 +1,7 @@
import React, { useState } from "react"; import React, { useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
// icons
import { DiceIcon } from "@plane/ui";
// services // services
import { ModuleService } from "services/module.service"; import { ModuleService } from "services/module.service";
// hooks // hooks
@ -16,9 +15,9 @@ import { ModuleDetailsSidebar } from "components/modules";
import { ModuleLayoutRoot } from "components/issues"; import { ModuleLayoutRoot } from "components/issues";
import { ModuleIssuesHeader } from "components/headers"; import { ModuleIssuesHeader } from "components/headers";
// ui // ui
import { BreadcrumbItem, Breadcrumbs, DiceIcon } from "@plane/ui";
import { CustomMenu } from "components/ui"; import { CustomMenu } from "components/ui";
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// images // images
import emptyModule from "public/empty-state/module.svg"; import emptyModule from "public/empty-state/module.svg";
// helpers // helpers
@ -93,11 +92,18 @@ const SingleModule: React.FC = () => {
/> />
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(moduleDetails?.project_detail.name ?? "Project", 32)} Modules`} link={
link={`/${workspaceSlug}/projects/${projectId}/modules`} <Link href={`/${workspaceSlug}/projects/${projectId}/modules`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(
moduleDetails?.project_detail.name ?? "Project",
32
)} Modules`}</p>
</a>
</Link>
}
/> />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,4 +1,5 @@
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
@ -27,10 +28,9 @@ import { CreateUpdateBlockInline, SinglePageBlock } from "components/pages";
import { CreateLabelModal } from "components/labels"; import { CreateLabelModal } from "components/labels";
import { CreateBlock } from "components/pages/create-block"; import { CreateBlock } from "components/pages/create-block";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
import { CustomSearchSelect } from "components/ui"; import { CustomSearchSelect } from "components/ui";
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
import { TextArea, Loader, ToggleSwitch, Tooltip } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, TextArea, Loader, ToggleSwitch, Tooltip } from "@plane/ui";
// images // images
import emptyPage from "public/empty-state/page.svg"; import emptyPage from "public/empty-state/page.svg";
// icons // icons
@ -306,8 +306,16 @@ const SinglePage: NextPage = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Pages`} /> <BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Pages`} />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,4 +1,5 @@
import { useState, Fragment } from "react"; import { useState, Fragment } from "react";
import Link from "next/link";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import dynamic from "next/dynamic"; import dynamic from "next/dynamic";
@ -19,8 +20,7 @@ import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy";
// components // components
import { RecentPagesList, CreateUpdatePageModal, TPagesListProps } from "components/pages"; import { RecentPagesList, CreateUpdatePageModal, TPagesListProps } from "components/pages";
// ui // ui
import { Button } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button } from "@plane/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// types // types
import { TPageViewProps } from "types"; import { TPageViewProps } from "types";
import type { NextPage } from "next"; import type { NextPage } from "next";
@ -94,8 +94,16 @@ const ProjectPages: NextPage = () => {
/> />
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="Projects" link={`/${workspaceSlug}/projects`} /> <BreadcrumbItem
link={
<Link href={`/${workspaceSlug}/projects`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p>Projects</p>
</a>
</Link>
}
/>
<BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Pages`} /> <BreadcrumbItem title={`${truncateText(projectDetails?.name ?? "Project", 32)} Pages`} />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR, { mutate } from "swr"; import useSWR, { mutate } from "swr";
@ -16,7 +17,7 @@ import useToast from "hooks/use-toast";
import { AutoArchiveAutomation, AutoCloseAutomation } from "components/automation"; import { AutoArchiveAutomation, AutoCloseAutomation } from "components/automation";
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs } from "@plane/ui";
// types // types
import type { NextPage } from "next"; import type { NextPage } from "next";
import { IProject } from "types"; import { IProject } from "types";
@ -76,11 +77,15 @@ const AutomationsSettings: NextPage = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(projectDetails?.name ?? "Project", 32)}`} link={
link={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`} <Link href={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(projectDetails?.name ?? "Project", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Automations Settings" unshrinkTitle /> <BreadcrumbItem title="Automations Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,5 +1,6 @@
import React, { useState } from "react"; import React, { useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR, { mutate } from "swr"; import useSWR, { mutate } from "swr";
// services // services
import { ProjectService, ProjectEstimateService } from "services/project"; import { ProjectService, ProjectEstimateService } from "services/project";
@ -14,9 +15,8 @@ import { SettingsSidebar } from "components/project";
import useToast from "hooks/use-toast"; import useToast from "hooks/use-toast";
import useUserAuth from "hooks/use-user-auth"; import useUserAuth from "hooks/use-user-auth";
// ui // ui
import { Button, Loader } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button, Loader } from "@plane/ui";
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons // icons
import { Plus } from "lucide-react"; import { Plus } from "lucide-react";
// images // images
@ -112,11 +112,15 @@ const EstimatesSettings: NextPage = () => {
/> />
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(projectDetails?.name ?? "Project", 32)}`} link={
link={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`} <Link href={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(projectDetails?.name ?? "Project", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Estimates Settings" unshrinkTitle /> <BreadcrumbItem title="Estimates Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,5 +1,7 @@
import React from "react"; import React from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR, { mutate } from "swr"; import useSWR, { mutate } from "swr";
// services // services
import { ProjectService } from "services/project"; import { ProjectService } from "services/project";
@ -12,8 +14,7 @@ import useUserAuth from "hooks/use-user-auth";
// components // components
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { ContrastIcon, DiceIcon, ToggleSwitch } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, ContrastIcon, DiceIcon, ToggleSwitch } from "@plane/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons // icons
import { FileText, Inbox, Layers } from "lucide-react"; import { FileText, Inbox, Layers } from "lucide-react";
// types // types
@ -140,11 +141,15 @@ const FeaturesSettings: NextPage = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(projectDetails?.name ?? "Project", 32)}`} link={
link={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`} <Link href={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(projectDetails?.name ?? "Project", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Features Settings" unshrinkTitle /> <BreadcrumbItem title="Features Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,5 +1,7 @@
import { useState } from "react"; import { useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
import { Disclosure, Transition } from "@headlessui/react"; import { Disclosure, Transition } from "@headlessui/react";
// layouts // layouts
@ -8,8 +10,7 @@ import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy";
import { ProjectService } from "services/project"; import { ProjectService } from "services/project";
// components // components
import { DeleteProjectModal, ProjectDetailsForm, ProjectDetailsFormLoader, SettingsSidebar } from "components/project"; import { DeleteProjectModal, ProjectDetailsForm, ProjectDetailsFormLoader, SettingsSidebar } from "components/project";
import { Button, Loader } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button, Loader } from "@plane/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
import { ChevronDown, ChevronUp } from "lucide-react"; import { ChevronDown, ChevronUp } from "lucide-react";
// helpers // helpers
import { truncateText } from "helpers/string.helper"; import { truncateText } from "helpers/string.helper";
@ -58,11 +59,15 @@ const GeneralSettings: NextPage = observer(() => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(projectDetails?.name ?? "Project", 32)}`} link={
link={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`} <Link href={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(projectDetails?.name ?? "Project", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="General Settings" unshrinkTitle /> <BreadcrumbItem title="General Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -13,8 +14,7 @@ import { ProjectService } from "services/project";
import { SettingsSidebar, SingleIntegration } from "components/project"; import { SettingsSidebar, SingleIntegration } from "components/project";
// ui // ui
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs, Loader } from "@plane/ui";
import { Loader } from "@plane/ui";
// images // images
import emptyIntegration from "public/empty-state/integration.svg"; import emptyIntegration from "public/empty-state/integration.svg";
// types // types
@ -55,11 +55,15 @@ const ProjectIntegrations: NextPage = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(projectDetails?.name ?? "Project", 32)}`} link={
link={`/${workspaceSlug}/projects/${projectId}/issues`} <Link href={`/${workspaceSlug}/projects/${projectId}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(projectDetails?.name ?? "Project", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Integrations Settings" unshrinkTitle /> <BreadcrumbItem title="Integrations Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,6 +1,7 @@
import React, { useState, useRef } from "react"; import React, { useState, useRef } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -21,9 +22,8 @@ import {
} from "components/labels"; } from "components/labels";
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { Button, Loader } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button, Loader } from "@plane/ui";
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// images // images
import emptyLabel from "public/empty-state/label.svg"; import emptyLabel from "public/empty-state/label.svg";
// types // types
@ -104,11 +104,15 @@ const LabelsSettings: NextPage = () => {
/> />
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(projectDetails?.name ?? "Project", 32)}`} link={
link={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`} <Link href={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(projectDetails?.name ?? "Project", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Labels Settings" unshrinkTitle /> <BreadcrumbItem title="Labels Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -18,9 +18,8 @@ import ConfirmProjectMemberRemove from "components/project/confirm-project-membe
import SendProjectInvitationModal from "components/project/send-project-invitation-modal"; import SendProjectInvitationModal from "components/project/send-project-invitation-modal";
import { MemberSelect, SettingsSidebar } from "components/project"; import { MemberSelect, SettingsSidebar } from "components/project";
// ui // ui
import { Button, Loader } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button, Loader } from "@plane/ui";
import { CustomMenu, CustomSelect } from "components/ui"; import { CustomMenu, CustomSelect } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons // icons
import { ChevronDown, X } from "lucide-react"; import { ChevronDown, X } from "lucide-react";
// types // types
@ -201,11 +200,15 @@ const MembersSettings: NextPage = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(projectDetails?.name ?? "Project", 32)}`} link={
link={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`} <Link href={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(projectDetails?.name ?? "Project", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Members Settings" unshrinkTitle /> <BreadcrumbItem title="Members Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,6 +1,7 @@
import React, { useState } from "react"; import React, { useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -15,8 +16,7 @@ import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy";
import { CreateUpdateStateInline, DeleteStateModal, SingleState, StateGroup } from "components/states"; import { CreateUpdateStateInline, DeleteStateModal, SingleState, StateGroup } from "components/states";
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { Loader } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Loader } from "@plane/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons // icons
import { Plus } from "lucide-react"; import { Plus } from "lucide-react";
// helpers // helpers
@ -61,11 +61,15 @@ const StatesSettings: NextPage = () => {
/> />
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(projectDetails?.name ?? "Project", 32)}`} link={
link={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`} <Link href={`/${workspaceSlug}/projects/${projectDetails?.id}/issues`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(projectDetails?.name ?? "Project", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="States Settings" unshrinkTitle /> <BreadcrumbItem title="States Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,4 +1,5 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -10,11 +11,10 @@ import { ProjectAuthorizationWrapper } from "layouts/auth-layout-legacy";
// components // components
import { ProjectViewLayoutRoot } from "components/issues"; import { ProjectViewLayoutRoot } from "components/issues";
// ui // ui
import { BreadcrumbItem, Breadcrumbs, PhotoFilterIcon } from "@plane/ui";
import { CustomMenu } from "components/ui"; import { CustomMenu } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
// icons // icons
import { PhotoFilterIcon } from "@plane/ui";
// images // images
import emptyView from "public/empty-state/view.svg"; import emptyView from "public/empty-state/view.svg";
// helpers // helpers
@ -51,10 +51,15 @@ const SingleView: React.FC = () => {
return ( return (
<ProjectAuthorizationWrapper <ProjectAuthorizationWrapper
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${activeProject?.name ?? "Project"} Views`} link={
link={`/${workspaceSlug}/projects/${activeProject?.id}/cycles`} <Link href={`/${workspaceSlug}/projects/${activeProject?.id}/cycles`}>
<a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${activeProject?.name ?? "Project"} Views`}</p>
</a>
</Link>
}
/> />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -11,8 +12,7 @@ import { WorkspaceAuthorizationLayout } from "layouts/auth-layout-legacy";
// component // component
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { Button } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button } from "@plane/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// types // types
import type { NextPage } from "next"; import type { NextPage } from "next";
// fetch-keys // fetch-keys
@ -24,9 +24,8 @@ import { truncateText } from "helpers/string.helper";
const workspaceService = new WorkspaceService(); const workspaceService = new WorkspaceService();
const BillingSettings: NextPage = () => { const BillingSettings: NextPage = () => {
const { const router = useRouter();
query: { workspaceSlug }, const { workspaceSlug } = router.query;
} = useRouter();
const { data: activeWorkspace } = useSWR(workspaceSlug ? WORKSPACE_DETAILS(workspaceSlug as string) : null, () => const { data: activeWorkspace } = useSWR(workspaceSlug ? WORKSPACE_DETAILS(workspaceSlug as string) : null, () =>
workspaceSlug ? workspaceService.getWorkspace(workspaceSlug as string) : null workspaceSlug ? workspaceService.getWorkspace(workspaceSlug as string) : null
@ -35,11 +34,15 @@ const BillingSettings: NextPage = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`} link={
link={`/${workspaceSlug}`} <Link href={`/${workspaceSlug}`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Billing & Plans Settings" unshrinkTitle /> <BreadcrumbItem title="Billing & Plans Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,4 +1,5 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -10,7 +11,7 @@ import { WorkspaceAuthorizationLayout } from "layouts/auth-layout-legacy";
import ExportGuide from "components/exporter/guide"; import ExportGuide from "components/exporter/guide";
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs } from "@plane/ui";
// types // types
import type { NextPage } from "next"; import type { NextPage } from "next";
// fetch-keys // fetch-keys
@ -32,11 +33,15 @@ const ImportExport: NextPage = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`} link={
link={`/${workspaceSlug}`} <Link href={`/${workspaceSlug}`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Export Settings" unshrinkTitle /> <BreadcrumbItem title="Export Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -1,4 +1,5 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -10,7 +11,7 @@ import { WorkspaceAuthorizationLayout } from "layouts/auth-layout-legacy";
import IntegrationGuide from "components/integration/guide"; import IntegrationGuide from "components/integration/guide";
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs } from "@plane/ui";
// types // types
import type { NextPage } from "next"; import type { NextPage } from "next";
// fetch-keys // fetch-keys
@ -32,11 +33,15 @@ const ImportExport: NextPage = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`} link={
link={`/${workspaceSlug}`} <Link href={`/${workspaceSlug}`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Import/ Export Settings" unshrinkTitle /> <BreadcrumbItem title="Import/ Export Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -21,8 +21,7 @@ import { SettingsSidebar } from "components/project";
// ui // ui
import { Disclosure, Transition } from "@headlessui/react"; import { Disclosure, Transition } from "@headlessui/react";
import { CustomSelect } from "components/ui"; import { CustomSelect } from "components/ui";
import { Button, Input, Spinner } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button, Input, Spinner } from "@plane/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons // icons
import { ChevronDown, ChevronUp, Pencil } from "lucide-react"; import { ChevronDown, ChevronUp, Pencil } from "lucide-react";
// helpers // helpers
@ -159,7 +158,7 @@ const WorkspaceSettings: NextPage = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title={`${truncateText(activeWorkspace?.name ?? "Workspace", 32)} Settings`} /> <BreadcrumbItem title={`${truncateText(activeWorkspace?.name ?? "Workspace", 32)} Settings`} />
</Breadcrumbs> </Breadcrumbs>
} }

View File

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import Link from "next/link";
import useSWR from "swr"; import useSWR from "swr";
@ -14,8 +15,7 @@ import { SingleIntegrationCard } from "components/integration";
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { IntegrationAndImportExportBanner } from "components/ui"; import { IntegrationAndImportExportBanner } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; import { BreadcrumbItem, Breadcrumbs, Loader } from "@plane/ui";
import { Loader } from "@plane/ui";
// types // types
import type { NextPage } from "next"; import type { NextPage } from "next";
// fetch-keys // fetch-keys
@ -42,11 +42,15 @@ const WorkspaceIntegrations: NextPage = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`} link={
link={`/${workspaceSlug}`} <Link href={`/${workspaceSlug}`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Integrations Settings" unshrinkTitle /> <BreadcrumbItem title="Integrations Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>

View File

@ -18,9 +18,8 @@ import ConfirmWorkspaceMemberRemove from "components/workspace/confirm-workspace
import SendWorkspaceInvitationModal from "components/workspace/send-workspace-invitation-modal"; import SendWorkspaceInvitationModal from "components/workspace/send-workspace-invitation-modal";
import { SettingsSidebar } from "components/project"; import { SettingsSidebar } from "components/project";
// ui // ui
import { Button, Loader } from "@plane/ui"; import { BreadcrumbItem, Breadcrumbs, Button, Loader } from "@plane/ui";
import { CustomMenu, CustomSelect } from "components/ui"; import { CustomMenu, CustomSelect } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons // icons
import { ChevronDown, X } from "lucide-react"; import { ChevronDown, X } from "lucide-react";
// types // types
@ -101,11 +100,15 @@ const MembersSettings: NextPage = () => {
return ( return (
<WorkspaceAuthorizationLayout <WorkspaceAuthorizationLayout
breadcrumbs={ breadcrumbs={
<Breadcrumbs> <Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem <BreadcrumbItem
title={`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`} link={
link={`/${workspaceSlug}`} <Link href={`/${workspaceSlug}`}>
linkTruncate <a className={`border-r-2 border-custom-sidebar-border-200 px-3 text-sm `}>
<p className="truncate">{`${truncateText(activeWorkspace?.name ?? "Workspace", 32)}`}</p>
</a>
</Link>
}
/> />
<BreadcrumbItem title="Members Settings" unshrinkTitle /> <BreadcrumbItem title="Members Settings" unshrinkTitle />
</Breadcrumbs> </Breadcrumbs>