Skip to content

Commit

Permalink
[UI v2] fix: Fixes acecssibility for breadcrumb lists
Browse files Browse the repository at this point in the history
  • Loading branch information
devinvillarosa committed Jan 8, 2025
1 parent fbffa5c commit 7b4092b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ const NavHeader = () => (
<div className="flex items-center gap-2">
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbLink to="/automations" className="text-xl font-semibold">
Automations
</BreadcrumbLink>
<BreadcrumbItem>
<BreadcrumbLink to="/automations" className="text-xl font-semibold">
Automations
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem className="text-xl font-semibold">
<BreadcrumbPage>Create</BreadcrumbPage>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
} from "@/components/ui/breadcrumb";
Expand All @@ -21,12 +22,14 @@ const Header = () => (
<div className="flex items-center gap-2">
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbLink
to="/concurrency-limits"
className="text-xl font-semibold"
>
Automations
</BreadcrumbLink>
<BreadcrumbItem>
<BreadcrumbLink
to="/concurrency-limits"
className="text-xl font-semibold"
>
Automations
</BreadcrumbLink>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
<Button size="icon" className="h-7 w-7" variant="outline">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ export const NavHeader = ({ tag }: NavHeaderProps) => {
<div className="flex items-center gap-2">
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbLink
to="/concurrency-limits"
className="text-xl font-semibold"
>
Concurrency Limits
</BreadcrumbLink>
<BreadcrumbItem>
<BreadcrumbLink
to="/concurrency-limits"
className="text-xl font-semibold"
>
Concurrency Limits
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem className="text-xl font-semibold">
<BreadcrumbPage>{tag}</BreadcrumbPage>
Expand Down
33 changes: 20 additions & 13 deletions ui-v2/src/components/ui/run-card/run-card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { components } from "@/api/prefect";
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbSeparator,
Expand Down Expand Up @@ -80,25 +81,31 @@ const ConcurrencyLimitTaskRunBreadcrumb = ({
<Breadcrumb>
<BreadcrumbList>
{flow && (
<BreadcrumbLink
className="text-lg font-semibold"
to="/flows/flow/$id"
params={{ id: flow.id }}
>
{flow.name}
</BreadcrumbLink>
<BreadcrumbItem>
<BreadcrumbLink
className="text-lg font-semibold"
to="/flows/flow/$id"
params={{ id: flow.id }}
>
{flow.name}
</BreadcrumbLink>
</BreadcrumbItem>
)}
{flow && flowRun && <BreadcrumbSeparator />}
{flowRun && (
<BreadcrumbLink to="/runs/flow-run/$id" params={{ id: flowRun.id }}>
{flowRun.name}
</BreadcrumbLink>
<BreadcrumbItem>
<BreadcrumbLink to="/runs/flow-run/$id" params={{ id: flowRun.id }}>
{flowRun.name}
</BreadcrumbLink>
</BreadcrumbItem>
)}
{flowRun && taskRun && <BreadcrumbSeparator />}
{taskRun && (
<BreadcrumbLink to="/runs/task-run/$id" params={{ id: taskRun.id }}>
{taskRun.name}
</BreadcrumbLink>
<BreadcrumbItem>
<BreadcrumbLink to="/runs/task-run/$id" params={{ id: taskRun.id }}>
{taskRun.name}
</BreadcrumbLink>
</BreadcrumbItem>
)}
</BreadcrumbList>
</Breadcrumb>
Expand Down

0 comments on commit 7b4092b

Please sign in to comment.