Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-8246: fix(issues): smaller sidebar headings, trailing arrow (#9579)

Multica Eveb18ed90235c6
diff --git a/packages/views/issues/components/issue-sidebar-section.test.tsx b/packages/views/issues/components/issue-sidebar-section.test.tsx
index 28481bb5b7..cace172cd2 100644
--- a/packages/views/issues/components/issue-sidebar-section.test.tsx
+++ b/packages/views/issues/components/issue-sidebar-section.test.tsx
@@ -14,7 +14,7 @@ describe("issue sidebar disclosure", () => {
expect(toggle).not.toHaveBeenCalled();
expect(screen.queryByRole("button", { name: "References" })).not.toBeInTheDocument();
expect(screen.queryByText("0")).not.toBeInTheDocument();
- expect(screen.getByText("References").previousElementSibling).toHaveAttribute("aria-hidden", "true");
+ expect(screen.getByText("References").nextElementSibling).toBeNull();
fireEvent.click(screen.getByRole("button", { name: "Add reference" }));
expect(add).toHaveBeenCalledOnce();
});
@@ -31,6 +31,8 @@ describe("issue sidebar disclosure", () => {
}
render(<Example />);
const disclosure = screen.getByRole("button", { name: "References 2" });
+ // The disclosure arrow trails the title text instead of leading it.
+ expect(screen.getByText("References").nextElementSibling).toHaveAttribute("aria-hidden", "true");
fireEvent.click(screen.getByRole("button", { name: "Add reference" }));
expect(add).toHaveBeenCalledOnce();
expect(disclosure).toHaveAttribute("aria-expanded", "true");
diff --git a/packages/views/issues/components/issue-sidebar-section.tsx b/packages/views/issues/components/issue-sidebar-section.tsx
index 87e81f05b6..71f60a6222 100644
--- a/packages/views/issues/components/issue-sidebar-section.tsx
+++ b/packages/views/issues/components/issue-sidebar-section.tsx
@@ -2,7 +2,6 @@
import type { ReactNode } from "react";
import { ChevronRight } from "lucide-react";
-import { Badge } from "@multica/ui/components/ui/badge";
import { Button, buttonVariants } from "@multica/ui/components/ui/button";
import { cn } from "@multica/ui/lib/utils";
@@ -28,19 +27,18 @@ export function IssueSidebarSectionHeader({
size="sm"
aria-expanded={open}
onClick={() => onOpenChange(!open)}
- className={cn("min-w-0 flex-1 shrink justify-start text-body font-medium aria-expanded:bg-transparent active:not-aria-[haspopup]:translate-y-0", !open && "text-muted-foreground")}
+ className={cn("min-w-0 flex-1 shrink justify-start text-caption font-medium aria-expanded:bg-transparent active:not-aria-[haspopup]:translate-y-0", !open && "text-muted-foreground")}
>
- <ChevronRight aria-hidden="true" className={cn("!size-3 shrink-0 text-faint-foreground transition-transform motion-reduce:transition-none", open && "rotate-90")} />
<span className="truncate">{title}</span>
+ <ChevronRight aria-hidden="true" className={cn("!size-3 shrink-0 text-faint-foreground transition-transform motion-reduce:transition-none", open && "rotate-90")} />
{count !== undefined && count > 0 && (
<>
{" "}
- <Badge variant="secondary" className="min-w-5 rounded-md px-1.5 text-micro tabular-nums text-muted-foreground">{count}</Badge>
+ <span data-slot="section-count" className="shrink-0 rounded-xs bg-muted px-1 text-micro font-medium tabular-nums text-muted-foreground">{count}</span>
</>
)}
</Button> : (
- <div id={id} className={cn(buttonVariants({ variant: "ghost", size: "sm" }), "min-w-0 flex-1 shrink justify-start text-body font-medium hover:bg-transparent dark:hover:bg-transparent")}>
- <span aria-hidden="true" className="size-3 shrink-0" />
+ <div id={id} className={cn(buttonVariants({ variant: "ghost", size: "sm" }), "min-w-0 flex-1 shrink justify-start text-caption font-medium hover:bg-transparent dark:hover:bg-transparent")}>
<span className="truncate">{title}</span>
</div>
)}
diff --git a/packages/views/issues/components/metadata-section.test.tsx b/packages/views/issues/components/metadata-section.test.tsx
index 202de707c2..1d4855cc32 100644
--- a/packages/views/issues/components/metadata-section.test.tsx
+++ b/packages/views/issues/components/metadata-section.test.tsx
@@ -24,7 +24,7 @@ describe("MetadataSection", () => {
renderWithI18n(<MetadataSection metadata={metadata} />);
const header = screen.getByRole("button", { name: "Metadata 4" });
expect(header).toHaveAttribute("aria-expanded", "false");
- expect(within(header).getByText("4")).toHaveAttribute("data-slot", "badge");
+ expect(within(header).getByText("4")).toHaveAttribute("data-slot", "section-count");
expect(screen.queryByText("pipeline_status")).not.toBeInTheDocument();
fireEvent.click(header);
expect(screen.getByText("waiting_review")).toBeVisible();