mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-05 21:39:54 +02:00
fix sidebar issue pin labels (#4334)
This commit is contained in:
@@ -172,7 +172,8 @@ describe("PinRow", () => {
|
||||
it("renders loaded details", async () => {
|
||||
detail.current = { isPending: false, isError: false, data: { identifier: "MUL-123", title: "Keep this pin", status: "todo" }, error: null };
|
||||
render(<AppSidebar />);
|
||||
expect(await screen.findByText("MUL-123 Keep this pin")).toBeInTheDocument();
|
||||
expect(await screen.findByText("Keep this pin")).toBeInTheDocument();
|
||||
expect(screen.queryByText("MUL-123 Keep this pin")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("does not also highlight the parent workspace nav for an active pin", async () => {
|
||||
@@ -186,7 +187,7 @@ describe("PinRow", () => {
|
||||
|
||||
const { container } = render(<AppSidebar />);
|
||||
|
||||
expect((await screen.findByText("MUL-123 Keep this pin")).closest("button")).toHaveAttribute(
|
||||
expect((await screen.findByText("Keep this pin")).closest("button")).toHaveAttribute(
|
||||
"data-active",
|
||||
"true",
|
||||
);
|
||||
|
||||
@@ -286,7 +286,7 @@ function PinRow({
|
||||
if (issueQuery.isPending) return <PinSkeleton />;
|
||||
if (issueQuery.isError || !issueQuery.data) return null;
|
||||
const issue = issueQuery.data;
|
||||
const label = issue.identifier ? `${issue.identifier} ${issue.title}` : issue.title;
|
||||
const label = issue.title;
|
||||
const iconNode = (
|
||||
/* Override parent [&_svg]:size-4 — pinned items need smaller icons to match sm size */
|
||||
<StatusIcon status={issue.status} className="!size-3.5 shrink-0" />
|
||||
|
||||
Reference in New Issue
Block a user