revert: "fix(site): enlarge checkbox click target in workspace and task tables" (#25159)

Reverts coder/coder#24739
This commit is contained in:
Sushant P
2026-05-11 13:59:04 -07:00
committed by GitHub
parent 3e46c7986f
commit 81561454d6
2 changed files with 28 additions and 48 deletions
+10 -20
View File
@@ -221,27 +221,17 @@ const TaskRow: FC<TaskRowProps> = ({ task, checked, onCheckChange }) => {
>
<TableCell>
<div className="flex items-center gap-5">
{/* Wrap the checkbox in a click-absorbing container
* so that near-miss clicks do not bubble up to the
* row's navigation handler. */}
<div
className="flex items-center cursor-default h-[72px] pr-4 -mr-4"
onClick={(e) => e.stopPropagation()}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.stopPropagation();
}
<Checkbox
data-testid={`checkbox-${task.id}`}
checked={checked}
onClick={(e) => {
e.stopPropagation();
}}
>
<Checkbox
data-testid={`checkbox-${task.id}`}
checked={checked}
onCheckedChange={(checked) => {
onCheckChange(task.id, Boolean(checked));
}}
aria-label={`Select task ${task.initial_prompt}`}
/>
</div>
onCheckedChange={(checked) => {
onCheckChange(task.id, Boolean(checked));
}}
aria-label={`Select task ${task.initial_prompt}`}
/>
<AvatarData
title={
<span className="block max-w-[520px] truncate">
@@ -185,36 +185,26 @@ export const WorkspacesTable: FC<WorkspacesTableProps> = ({
>
<TableCell>
<div className="flex items-center gap-5">
{/* Wrap the checkbox in a click-absorbing container
* so that near-miss clicks do not bubble up to the
* row's navigation handler. */}
<div
className="flex items-center cursor-default h-[72px] pr-4 -mr-4"
onClick={(e) => e.stopPropagation()}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.stopPropagation();
<Checkbox
data-testid={`checkbox-${workspace.id}`}
disabled={cantBeChecked(workspace)}
checked={checked}
onClick={(e) => {
e.stopPropagation();
}}
onCheckedChange={(checked) => {
if (checked) {
onCheckChange([...checkedWorkspaces, workspace]);
} else {
onCheckChange(
checkedWorkspaces.filter(
(w) => w.id !== workspace.id,
),
);
}
}}
>
<Checkbox
data-testid={`checkbox-${workspace.id}`}
disabled={cantBeChecked(workspace)}
checked={checked}
onCheckedChange={(checked) => {
if (checked) {
onCheckChange([...checkedWorkspaces, workspace]);
} else {
onCheckChange(
checkedWorkspaces.filter(
(w) => w.id !== workspace.id,
),
);
}
}}
aria-label={`Select workspace ${workspace.name}`}
/>
</div>
aria-label={`Select workspace ${workspace.name}`}
/>
<AvatarData
title={
<div className="flex items-center gap-1">