Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 4 additions & 11 deletions echo/frontend/src/components/layout/ProjectOverviewLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,11 @@ export const ProjectOverviewLayout = () => {
style={{ backgroundColor: "var(--app-background)" }}
>
<LoadingOverlay visible={projectQuery.isLoading} />
{project && (isPrivate || project.language) && (
{project && isPrivate && (
<Group gap={8} align="center" wrap="nowrap" px="xs">
{isPrivate && (
<Tooltip label={t`Private · only invited people can see this`}>
<IconLock size={16} color="var(--mantine-color-gray-6)" />
</Tooltip>
)}
{project.language && (
<Badge size="xs" variant="light" color="gray">
{String(project.language).toUpperCase()}
</Badge>
)}
<Tooltip label={t`Private · only invited people can see this`}>
<IconLock size={16} color="var(--mantine-color-gray-6)" />
</Tooltip>
</Group>
)}
<TabsWithRouter
Expand Down
30 changes: 21 additions & 9 deletions echo/frontend/src/features/sidebar/breadcrumbs/AppBreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const PROJECT_SECTION_LABELS: Record<string, string> = {
conversation: "Conversation",
conversations: "Conversations",
export: "Export",
home: "Home",
home: "Overview",
"host-guide": "Host guide",
integrations: "Integrations",
library: "Explore",
Expand Down Expand Up @@ -62,8 +62,7 @@ const ORG_SETTINGS_LABELS: Record<string, string> = {
usage: "Usage and tier",
};

// Brand: "Breadcrumbs for deep nesting only". Render only when there
// are 2+ meaningful crumbs to show.
// Render when there is at least 1 meaningful crumb to show.
export const AppBreadcrumbs = () => {
const { view, params } = useSidebarView();
const { orgId: routeOrgId, organisationId } = useParams<{
Expand Down Expand Up @@ -93,9 +92,9 @@ export const AppBreadcrumbs = () => {
switch (view) {
case "inbox":
case "help":
return [];
return out;
case "user-home":
return [];
return out;
case "user-settings": {
out.push({ href: "/settings/account", label: "User settings" });
const section = params.section;
Expand Down Expand Up @@ -137,8 +136,22 @@ export const AppBreadcrumbs = () => {
}
return out;
}
case "workspace-home":
return workspace ? [...out, { label: workspace.name }] : [];
case "workspace-home": {
if (!workspace) return out;
out.push({
href: `/w/${workspace.id}/home`,
label: workspace.name,
});
const section = params.section;
if (window.location.pathname.endsWith("/projects/new")) {
out.push({ label: "New project" });
} else if (section === "home" || !section) {
out.push({ label: "Overview" });
} else {
out.push({ label: "Overview" });
}
return out;
}
case "workspace-settings": {
if (workspace) {
out.push({
Expand Down Expand Up @@ -195,8 +208,7 @@ export const AppBreadcrumbs = () => {
return out;
}, [view, params, workspace, orgNameForId, projectQuery.data?.name]);

// Brand: hide breadcrumbs when there's only one crumb.
if (crumbs.length < 2) return null;
if (crumbs.length === 0) return null;

return (
<nav
Expand Down
6 changes: 3 additions & 3 deletions echo/frontend/src/features/sidebar/views/org/OrgHomeView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Trans } from "@lingui/react/macro";
import { Folder, Gear, House, UserPlus } from "@phosphor-icons/react";
import { AppWindow, Folder, Gear, UserPlus } from "@phosphor-icons/react";
import { useQuery } from "@tanstack/react-query";
import { useMemo } from "react";
import { useParams } from "react-router";
Expand Down Expand Up @@ -100,8 +100,8 @@ export const OrgHomeView = () => {
{!isExternal && (
<NavItem
to={`${base}/overview`}
label={<Trans>Home</Trans>}
icon={House}
label={<Trans>Overview</Trans>}
icon={AppWindow}
end
/>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Trans } from "@lingui/react/macro";
import {
AppWindow,
BookOpen,
Broadcast,
ChatCircleDots,
ChatCircleText,
FileText,
Gear,
Graph,
House,
PaintBrush,
} from "@phosphor-icons/react";
import { useParams } from "react-router";
Expand Down Expand Up @@ -55,7 +55,7 @@ export const ProjectHomeView = () => {
</div>
)}

<NavItem to={`${base}/home`} label={<Trans>Home</Trans>} icon={House} />
<NavItem to={`${base}/home`} label={<Trans>Overview</Trans>} icon={AppWindow} />
<NavItem
to={`${base}/chats/new`}
label={<Trans>Ask</Trans>}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Trans } from "@lingui/react/macro";
import { Gear, House, Plus, PushPin } from "@phosphor-icons/react";
import { AppWindow, Gear, Plus, PushPin } from "@phosphor-icons/react";
import { useMemo } from "react";
import { useParams } from "react-router";
import { useWorkspace } from "@/hooks/useWorkspace";
Expand Down Expand Up @@ -43,7 +43,7 @@ export const WorkspaceHomeView = () => {
</div>
)}

<NavItem to={`${base}/home`} label={<Trans>Home</Trans>} icon={House} />
<NavItem to={`${base}/home`} label={<Trans>Overview</Trans>} icon={AppWindow} />
{canCreateProject && (
<NavItem
to={`${base}/projects/new`}
Expand Down
Loading