From 81561454d60b3dd112bdf2a00bc1a52947b9de58 Mon Sep 17 00:00:00 2001 From: Sushant P Date: Mon, 11 May 2026 13:59:04 -0700 Subject: [PATCH] revert: "fix(site): enlarge checkbox click target in workspace and task tables" (#25159) Reverts coder/coder#24739 --- site/src/pages/TasksPage/TasksTable.tsx | 30 ++++-------- .../pages/WorkspacesPage/WorkspacesTable.tsx | 46 ++++++++----------- 2 files changed, 28 insertions(+), 48 deletions(-) diff --git a/site/src/pages/TasksPage/TasksTable.tsx b/site/src/pages/TasksPage/TasksTable.tsx index 29c5d1904c..ef7b4eee6e 100644 --- a/site/src/pages/TasksPage/TasksTable.tsx +++ b/site/src/pages/TasksPage/TasksTable.tsx @@ -221,27 +221,17 @@ const TaskRow: FC = ({ task, checked, onCheckChange }) => { >
- {/* Wrap the checkbox in a click-absorbing container - * so that near-miss clicks do not bubble up to the - * row's navigation handler. */} -
e.stopPropagation()} - onKeyDown={(e) => { - if (e.key === "Enter" || e.key === " ") { - e.stopPropagation(); - } + { + e.stopPropagation(); }} - > - { - onCheckChange(task.id, Boolean(checked)); - }} - aria-label={`Select task ${task.initial_prompt}`} - /> -
+ onCheckedChange={(checked) => { + onCheckChange(task.id, Boolean(checked)); + }} + aria-label={`Select task ${task.initial_prompt}`} + /> diff --git a/site/src/pages/WorkspacesPage/WorkspacesTable.tsx b/site/src/pages/WorkspacesPage/WorkspacesTable.tsx index e7fedf3993..bcf0571d90 100644 --- a/site/src/pages/WorkspacesPage/WorkspacesTable.tsx +++ b/site/src/pages/WorkspacesPage/WorkspacesTable.tsx @@ -185,36 +185,26 @@ export const WorkspacesTable: FC = ({ >
- {/* Wrap the checkbox in a click-absorbing container - * so that near-miss clicks do not bubble up to the - * row's navigation handler. */} -
e.stopPropagation()} - onKeyDown={(e) => { - if (e.key === "Enter" || e.key === " ") { - e.stopPropagation(); + { + e.stopPropagation(); + }} + onCheckedChange={(checked) => { + if (checked) { + onCheckChange([...checkedWorkspaces, workspace]); + } else { + onCheckChange( + checkedWorkspaces.filter( + (w) => w.id !== workspace.id, + ), + ); } }} - > - { - if (checked) { - onCheckChange([...checkedWorkspaces, workspace]); - } else { - onCheckChange( - checkedWorkspaces.filter( - (w) => w.id !== workspace.id, - ), - ); - } - }} - aria-label={`Select workspace ${workspace.name}`} - /> -
+ aria-label={`Select workspace ${workspace.name}`} + />