diff --git a/assets/js/collaborative-editor/components/Breadcrumbs.tsx b/assets/js/collaborative-editor/components/Breadcrumbs.tsx
index 7e80dad358..a293c4cff8 100644
--- a/assets/js/collaborative-editor/components/Breadcrumbs.tsx
+++ b/assets/js/collaborative-editor/components/Breadcrumbs.tsx
@@ -1,32 +1,21 @@
-import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/react';
import { useMemo } from 'react';
import { cn } from '../../utils/cn';
export function Breadcrumbs({ children }: { children: React.ReactNode[] }) {
- // Split: Last item is always the title (always visible)
- // Of the remaining breadcrumbs, show only the last one, hide the rest
- const { hiddenItems, visibleBreadcrumb, title } = useMemo(() => {
+ // Split: Last item is always the title (workflow name)
+ // All other breadcrumbs are visible: Projects > Project Name > ...
+ const { visibleBreadcrumbs, title } = useMemo(() => {
if (children.length === 0) {
- return { hiddenItems: [], visibleBreadcrumb: null, title: null };
+ return { visibleBreadcrumbs: [], title: null };
}
- // Last child is the title
+ // Last child is the title (workflow name)
const titleItem = children[children.length - 1];
const breadcrumbs = children.slice(0, -1);
- if (breadcrumbs.length > 1) {
- // Hide all but the last breadcrumb
- return {
- hiddenItems: breadcrumbs.slice(0, -1),
- visibleBreadcrumb: breadcrumbs[breadcrumbs.length - 1],
- title: titleItem,
- };
- }
-
return {
- hiddenItems: [],
- visibleBreadcrumb: breadcrumbs[0] ?? null,
+ visibleBreadcrumbs: breadcrumbs,
title: titleItem,
};
}, [children]);
@@ -34,33 +23,30 @@ export function Breadcrumbs({ children }: { children: React.ReactNode[] }) {
const items = useMemo(() => {
const result: React.ReactNode[] = [];
- // Add ellipsis dropdown if there are hidden items
- if (hiddenItems.length > 0) {
- result.push(
);
- }
-
- // Add visible breadcrumb (if exists)
- if (visibleBreadcrumb) {
- // Only show separator if there are hidden items (ellipsis dropdown before this)
- if (hiddenItems.length > 0) {
+ // Add visible breadcrumbs
+ visibleBreadcrumbs.forEach((breadcrumb, index) => {
+ // Add separator - skip after first item (project picker pill)
+ if (index > 1) {
result.push(
);
}
result.push(
-
- {visibleBreadcrumb}
+
+ {breadcrumb}
);
- }
+ });
- // Add title (with separator only if there's something before it)
+ // Add title (with separator only if there's more than just project picker)
if (title) {
- // Show separator if there are hidden items OR a visible breadcrumb
- if (hiddenItems.length > 0 || visibleBreadcrumb !== null) {
+ if (visibleBreadcrumbs.length > 1) {
result.push(
@@ -85,33 +71,6 @@ export function Breadcrumbs({ children }: { children: React.ReactNode[] }) {
);
}
-function BreadcrumbDropdown({ items }: { items: React.ReactNode[] }) {
- return (
-
-
-
-
-
- );
-}
export function BreadcrumbLink({
href,
icon,
@@ -167,3 +126,22 @@ export function BreadcrumbText({
);
}
+
+export function BreadcrumbProjectPicker({
+ children,
+ onClick,
+}: {
+ children: React.ReactNode;
+ onClick?: (e: React.MouseEvent) => void;
+}) {
+ return (
+
+ );
+}
diff --git a/assets/js/collaborative-editor/components/ConfigureAdaptorModal.tsx b/assets/js/collaborative-editor/components/ConfigureAdaptorModal.tsx
index e1b2e5ccb9..a2539d0e82 100644
--- a/assets/js/collaborative-editor/components/ConfigureAdaptorModal.tsx
+++ b/assets/js/collaborative-editor/components/ConfigureAdaptorModal.tsx
@@ -480,10 +480,8 @@ export function ConfigureAdaptorModal({