⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
fix(web): let task labels use card width
Bryan Nathan243a0a58070f
diff --git a/apps/web/src/components/kanban-board/task-labels.test.tsx b/apps/web/src/components/kanban-board/task-labels.test.tsxindex bb7c865f0..414797274 100644--- a/apps/web/src/components/kanban-board/task-labels.test.tsx+++ b/apps/web/src/components/kanban-board/task-labels.test.tsx@@ -14,4 +14,15 @@ describe("TaskLabels", () => {expect(screen.getByText("Bug")).toBeVisible();});++ it("uses the card width instead of an arbitrary label-name cap", () => {+ const name = "Client: Totem";+ render(<TaskLabels labels={[{ id: "label-1", name, color: "purple" }]} />);++ const labelName = screen.getByText(name);+ expect(labelName).not.toHaveClass("max-w-20");+ expect(labelName).toHaveClass("min-w-0", "truncate");+ expect(labelName).toHaveAttribute("title", name);+ expect(labelName.parentElement).toHaveClass("max-w-full", "min-w-0");+ });});diff --git a/apps/web/src/components/kanban-board/task-labels.tsx b/apps/web/src/components/kanban-board/task-labels.tsxindex 9b6af8273..9f781140f 100644--- a/apps/web/src/components/kanban-board/task-labels.tsx+++ b/apps/web/src/components/kanban-board/task-labels.tsx@@ -40,20 +40,22 @@ export function TaskLabels({if (!labels.length) return null;return (- <div className="flex flex-wrap gap-1">+ <div className="flex min-w-0 flex-wrap gap-1">{labels.map((label: { id: string; name: string; color: string }) => (<Badgekey={label.id}variant="outline"- className="px-2 py-0.5 text-[10px] flex items-center"+ className="max-w-full min-w-0 px-2 py-0.5 text-[10px] flex items-center"><span- className="inline-block w-1.5 h-1.5 mr-1 rounded-full"+ className="inline-block w-1.5 h-1.5 mr-1 shrink-0 rounded-full"style={{backgroundColor: validColor(label.color),}}/>- <span className="max-w-20 truncate">{label.name}</span>+ <span className="min-w-0 truncate" title={label.name}>+ {label.name}+ </span></Badge>))}</div>