Skip to content

Commit 3a3e863

Browse files
authored
chore(webapp): bulk action cancel as default (#2437)
* Switches “replay” and “cancel” options in the list * Fixed incorrect cancel icon being used * Fixes the alignment of the radiobuttons
1 parent f5f14c4 commit 3a3e863

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

apps/webapp/app/components/BulkActionFilterSummary.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { appliedSummary, dateFromString, timeFilterRenderValues } from "./runs/v
1111
import { formatNumber } from "~/utils/numberFormatter";
1212
import { SpinnerWhite } from "./primitives/Spinner";
1313
import { ArrowPathIcon, CheckIcon, XCircleIcon } from "@heroicons/react/20/solid";
14+
import { XCircleIcon as XCircleIconOutline } from "@heroicons/react/24/outline";
1415
import assertNever from "assert-never";
1516
import { AppliedFilter } from "./primitives/AppliedFilter";
1617
import { runStatusTitle } from "./runs/v3/TaskRunStatus";
@@ -244,7 +245,7 @@ function Action({ action }: { action: BulkActionAction }) {
244245
case "cancel":
245246
return (
246247
<span>
247-
<XCircleIcon className="mb-0.5 inline-block size-4 text-error" />
248+
<XCircleIconOutline className="mb-0.5 inline-block size-4 text-error" />
248249
<span className="ml-0.5 text-text-bright">Canceled</span>
249250
</span>
250251
);

apps/webapp/app/components/primitives/RadioButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const variants = {
3939
description: {
4040
button:
4141
"w-full p-2.5 hover:data-[state=checked]:bg-white/[4%] data-[state=checked]:bg-white/[4%] transition data-[disabled]:opacity-70 hover:border-charcoal-600 border-charcoal-650 hover:data-[state=checked]:border-charcoal-600 border rounded-md",
42-
label: "text-text-bright font-semibold -mt-1 text-left text-sm",
42+
label: "text-text-bright font-semibold -mt-0.5 text-left text-sm",
4343
description: "text-text-dimmed -mt-0 text-left",
4444
inputPosition: "mt-0",
4545
icon: "w-8 h-8 mb-2",

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -324,25 +324,25 @@ export function CreateBulkActionInspector({
324324
}}
325325
>
326326
<RadioGroupItem
327-
id="action-replay"
327+
id="action-cancel"
328328
label={
329329
<span className="inline-flex items-center gap-1">
330-
<ArrowPathIcon className="mb-0.5 size-4 text-blue-400" /> Replay runs
330+
<XCircleIcon className="size-4 text-error" /> Cancel runs
331331
</span>
332332
}
333-
description="Replays all selected runs, regardless of current status."
334-
value={"replay"}
333+
description="Cancels all runs still in progress. Any finished runs won’t be canceled."
334+
value={"cancel"}
335335
variant="description"
336336
/>
337337
<RadioGroupItem
338-
id="action-cancel"
338+
id="action-replay"
339339
label={
340340
<span className="inline-flex items-center gap-1">
341-
<XCircleIcon className="mb-0.5 size-4 text-error" /> Cancel runs
341+
<ArrowPathIcon className="size-4 text-blue-400" /> Replay runs
342342
</span>
343343
}
344-
description="Cancels all runs still in progress. Any finished runs won’t be canceled."
345-
value={"cancel"}
344+
description="Replays all selected runs, regardless of current status."
345+
value={"replay"}
346346
variant="description"
347347
/>
348348
</RadioGroup>
@@ -450,8 +450,8 @@ function bulkActionModeFromString(value: string | undefined): BulkActionMode {
450450
}
451451

452452
function bulkActionActionFromString(value: string | undefined): BulkActionAction {
453-
if (!value) return "replay";
453+
if (!value) return "cancel";
454454
const parsed = BulkActionAction.safeParse(value);
455-
if (!parsed.success) return "replay";
455+
if (!parsed.success) return "cancel";
456456
return parsed.data;
457457
}

0 commit comments

Comments
 (0)