Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
823885c
chore: project feature enum added
anmolsinghbhatia Jun 9, 2025
c669643
feat: revamp breadcrumb and add navigation dropdown component
anmolsinghbhatia Jun 9, 2025
5cdf1a6
chore: custom search select component refactoring
anmolsinghbhatia Jun 9, 2025
cb21fe4
chore: breadcrumb stories added
anmolsinghbhatia Jun 9, 2025
9cc4845
chore: switch label and breadcrumb link component refactor
anmolsinghbhatia Jun 9, 2025
aef81e2
chore: project navigation helper function added
anmolsinghbhatia Jun 9, 2025
831c255
chore: common breadcrumb component added
anmolsinghbhatia Jun 9, 2025
92559cc
chore: breadcrumb refactoring
anmolsinghbhatia Jun 9, 2025
cb6d939
Merge branch 'preview' of github.com:makeplane/plane into feat-breadc…
anmolsinghbhatia Jun 9, 2025
0a73fa6
Merge branch 'preview' of github.com:makeplane/plane into feat-breadc…
anmolsinghbhatia Jun 10, 2025
f188542
chore: code refactor
anmolsinghbhatia Jun 10, 2025
dc6660d
chore: code refactor
anmolsinghbhatia Jun 11, 2025
12c3e91
Merge branch 'preview' of github.com:makeplane/plane into feat-breadc…
anmolsinghbhatia Jun 16, 2025
8258551
fix: build error
anmolsinghbhatia Jun 16, 2025
cb658c4
fix: nprogress and button tooltip
anmolsinghbhatia Jun 16, 2025
ace3df4
chore: code refactor
anmolsinghbhatia Jun 16, 2025
51d76f1
Merge branch 'preview' of github.com:makeplane/plane into feat-breadc…
anmolsinghbhatia Jun 17, 2025
b3a9670
chore: workspace view breadcrumb improvements
anmolsinghbhatia Jun 17, 2025
08f47b5
chore: code refactor
anmolsinghbhatia Jun 17, 2025
dacc917
chore: code refactor
anmolsinghbhatia Jun 18, 2025
16652a6
chore: code refactor
anmolsinghbhatia Jun 18, 2025
ae0867e
chore: code refactor
anmolsinghbhatia Jun 18, 2025
12f5be7
Merge branch 'preview' of github.com:makeplane/plane into feat-breadc…
anmolsinghbhatia Jun 18, 2025
12b386c
Merge branch 'preview' of github.com:makeplane/plane into feat-breadc…
vamsikrishnamathala Jun 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions admin/core/components/auth-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ export const InstanceHeader: FC = observer(() => {
{breadcrumbItems.length >= 0 && (
<div>
<Breadcrumbs>
<Breadcrumbs.BreadcrumbItem
type="text"
link={
<Breadcrumbs.Item
component={
<BreadcrumbLink
href="/general/"
label="Settings"
Expand All @@ -80,10 +79,9 @@ export const InstanceHeader: FC = observer(() => {
{breadcrumbItems.map(
(item) =>
item.title && (
<Breadcrumbs.BreadcrumbItem
<Breadcrumbs.Item
key={item.title}
type="text"
link={<BreadcrumbLink href={item.href} label={item.title} />}
component={<BreadcrumbLink href={item.href} label={item.title} />}
/>
)
)}
Expand Down
9 changes: 9 additions & 0 deletions packages/constants/src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,12 @@ export const DEFAULT_PROJECT_FORM_VALUES: Partial<IProject> = {
network: 2,
project_lead: null,
};

export enum EProjectFeatureKey {
WORK_ITEMS = "work_items",
CYCLES = "cycles",
MODULES = "modules",
VIEWS = "views",
PAGES = "pages",
INTAKE = "intake",
}
233 changes: 233 additions & 0 deletions packages/ui/src/breadcrumbs/breadcrumbs.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
import type { Meta, StoryObj } from "@storybook/react";
import { Home, Settings, Briefcase, GridIcon, Layers2, FileIcon } from "lucide-react";
import * as React from "react";
import { ContrastIcon, EpicIcon, LayersIcon } from "../icons";
import { Breadcrumbs } from "./breadcrumbs";
import { BreadcrumbNavigationDropdown } from "./navigation-dropdown";

const meta: Meta<typeof Breadcrumbs> = {
title: "UI/Breadcrumbs",
component: Breadcrumbs,
tags: ["autodocs"],
argTypes: {
isLoading: {
control: "boolean",
description: "Shows loading state of breadcrumbs",
},
onBack: {
action: "onBack",
description: "Callback function when back button is clicked",
},
},
};

type TBreadcrumbBlockProps = {
href?: string;
label?: string;
icon?: React.ReactNode;
disableTooltip?: boolean;
};

// TODO: remove this component and use web Link component
const BreadcrumbBlock: React.FC<TBreadcrumbBlockProps> = (props) => {
const { label, icon, disableTooltip = false } = props;

return (
<>
<Breadcrumbs.ItemWrapper label={label} disableTooltip={disableTooltip}>
{icon && <div className="flex size-4 items-center justify-center overflow-hidden !text-[1rem]">{icon}</div>}
{label && <div className="relative line-clamp-1 block max-w-[150px] overflow-hidden truncate">{label}</div>}
</Breadcrumbs.ItemWrapper>
</>
);
};

export default meta;
type Story = StoryObj<typeof Breadcrumbs>;

export const Default: Story = {
args: {
children: [
<Breadcrumbs.Item key="home" component={<BreadcrumbBlock href="/" label="Home" />} />,
<Breadcrumbs.Item key="projects" component={<BreadcrumbBlock href="/projects" label="Projects" />} />,
<Breadcrumbs.Item
key="current"
component={<BreadcrumbBlock href="/projects/current" label="Current Project" />}
/>,
],
},
};

export const WithLoading: Story = {
args: {
isLoading: true,
children: [
<Breadcrumbs.Item key="home" component={<BreadcrumbBlock href="/" label="Home" />} />,
<Breadcrumbs.Item key="projects" component={<BreadcrumbBlock href="/projects" label="Projects" />} />,
],
},
};

export const WithCustomComponent: Story = {
args: {
children: [
<Breadcrumbs.Item key="home" component={<BreadcrumbBlock href="/" label="Home" />} />,
<Breadcrumbs.Item
key="custom"
component={
<div className="flex items-center gap-2">
<span className="size-4 rounded-full bg-blue-500" />
<span>Custom Component</span>
</div>
}
/>,
],
},
};

export const SingleItem: Story = {
args: {
children: [<Breadcrumbs.Item key="home" component={<BreadcrumbBlock href="/" label="Home" />} />],
},
};

export const WithNavigationDropdown: Story = {
args: {
children: [
<Breadcrumbs.Item key="home" component={<BreadcrumbBlock href="/" label="Home" />} />,
<Breadcrumbs.Item
key="projects"
component={
<BreadcrumbNavigationDropdown
selectedItemKey="project-1"
navigationItems={[
{
key: "project-1",
title: "Project Alpha",

action: () => console.log("Project Alpha selected"),
},
{
key: "project-2",
title: "Project Beta",

action: () => console.log("Project Beta selected"),
},
{
key: "project-3",
title: "Project Gamma",

action: () => console.log("Project Gamma selected"),
},
]}
/>
}
showSeparator={false}
/>,
<Breadcrumbs.Item key="settings" component={<BreadcrumbBlock href="/settings" label="Settings" />} />,
],
},
};

export const WithNavigationDropdownAndIcons: Story = {
args: {
children: [
<Breadcrumbs.Item
key="home"
component={<BreadcrumbBlock href="/" label="Home" icon={<Home className="size-3.5" />} />}
/>,
<Breadcrumbs.Item
key="projects"
component={
<BreadcrumbNavigationDropdown
selectedItemKey="project-1"
navigationItems={[
{
key: "project-1",
title: "Project Alpha",
icon: Briefcase,

action: () => console.log("Project Alpha selected"),
},
{
key: "project-2",
title: "Project Beta",
icon: Briefcase,

// disabled: true,
action: () => console.log("Project Beta selected"),
},
{
key: "project-3",
title: "Project Gamma",
icon: Briefcase,

action: () => console.log("Project Gamma selected"),
},
]}
/>
}
showSeparator={false}
/>,
<Breadcrumbs.Item
key="features"
component={
<BreadcrumbNavigationDropdown
selectedItemKey="feature-1"
navigationItems={[
{
key: "feature-1",
title: "Epics",
icon: EpicIcon,

action: () => console.log("Feature Alpha selected"),
},
{
key: "feature-2",
title: "Work items",
icon: LayersIcon,

// disabled: true,
action: () => console.log("Feature Beta selected"),
},
{
key: "feature-3",
title: "Cycles",
icon: ContrastIcon,

action: () => console.log("Feature Gamma selected"),
},
{
key: "feature-3",
title: "Modules",
icon: GridIcon,

action: () => console.log("Feature Gamma selected"),
},
{
key: "feature-3",
title: "Views",
icon: Layers2,

action: () => console.log("Feature Gamma selected"),
},
{
key: "feature-3",
title: "Pages",
icon: FileIcon,

action: () => console.log("Feature Gamma selected"),
},
]}
/>
}
showSeparator={false}
/>,
<Breadcrumbs.Item
key="settings"
component={<BreadcrumbBlock href="/settings" label="Settings" icon={<Settings className="size-3.5" />} />}
isLast
/>,
],
},
};
Loading