Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

refactor(subtasks): one checkbox per row, drop the selection checkbox

Andrejcc01ccf7d622
diff --git a/apps/web/src/components/task/subtask-row.tsx b/apps/web/src/components/task/subtask-row.tsx
index 334d74cf4..e5abffbab 100644
--- a/apps/web/src/components/task/subtask-row.tsx
+++ b/apps/web/src/components/task/subtask-row.tsx
@@ -4,7 +4,6 @@ import TaskCardContextMenuContent from "@/components/kanban-board/task-card-cont
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Checkbox } from "@/components/ui/checkbox";
import { ContextMenu, ContextMenuTrigger } from "@/components/ui/context-menu";
-import { cn } from "@/lib/cn";
import { getColumnIcon } from "@/lib/column";
import type Task from "@/types/task";
import SubtaskAssigneePopover from "./subtask-assignee-popover";
@@ -23,7 +22,6 @@ type SubtaskRowProps = {
assignee: {
user?: { image?: string | null; name?: string | null } | null;
} | null;
- onToggleSelection: () => void;
onToggleComplete: () => void;
onNavigate: () => void;
onDeleteClick: () => void;
@@ -40,7 +38,6 @@ export default function SubtaskRow({
canEdit,
selectionRadius,
assignee,
- onToggleSelection,
onToggleComplete,
onNavigate,
onDeleteClick,
@@ -60,22 +57,6 @@ export default function SubtaskRow({
<div
className={`group flex items-center gap-2 py-1 px-2 ${selectionRadius} transition-colors cursor-default ${isSelected ? "bg-primary/10 hover:bg-primary/15" : "hover:bg-accent/50"} ${isFocused ? "ring-1 ring-inset ring-ring/50" : ""}`}
>
- {/* Selection for bulk actions — hover-revealed so it is not
- mistaken for the completion checkbox. */}
- <Checkbox
- checked={isSelected}
- onCheckedChange={onToggleSelection}
- aria-label={t("tasks:subtasks.selectAria", {
- defaultValue: "Select subtask",
- })}
- className={cn(
- "transition-opacity",
- isSelected || isFocused
- ? "opacity-100"
- : "opacity-0 group-hover:opacity-100",
- )}
- />
-
{/* Completion — toggles the subtask done/undone and persists it. */}
<Checkbox
checked={isCompleted}
diff --git a/apps/web/src/components/task/task-subtasks.tsx b/apps/web/src/components/task/task-subtasks.tsx
index 17a1e8ea2..5ba00fad8 100644
--- a/apps/web/src/components/task/task-subtasks.tsx
+++ b/apps/web/src/components/task/task-subtasks.tsx
@@ -371,7 +371,6 @@ export default function TaskSubtasks({
canEdit={canEdit}
selectionRadius={getSelectionRadius(index, isSelected)}
assignee={getAssignee(subtask.task.userId)}
- onToggleSelection={() => toggleSelection(subtask.task.id)}
onToggleComplete={() => handleToggleComplete(taskObj)}
onNavigate={() =>
navigate({