Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions apps/app/src/components/settings/UpdatesSettingsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ export function UpdateActionButton({
const ROW_GRID =
"grid min-w-0 grid-cols-[1.5rem_minmax(0,1fr)_auto] items-center gap-3";

/**
* Vertical rhythm for every row in a machine card. `SettingsSection` already
* pads the card (`py-3.5`), so the first and last rows drop their own outer
* padding the way `SettingsRow` does; without the reset a card's own padding
* and the row's stacked to 22px at each end, while `UpdatesRow` — which had
* the reset — sat at 14px, and the bb row's card came out lopsided.
*/
const ROW_SPACING = "py-2 first:pt-0 last:pb-0";

/**
* A row with no destination — bb itself, which has no page of its own to open.
* It borrows `ResourceRow`'s grid rather than its behaviour so its mark, name
Expand All @@ -240,7 +249,7 @@ function UpdatesRow({
}) {
return (
<div
className={cn(ROW_GRID, "py-2.5 text-sm first:pt-0 last:pb-0", className)}
className={cn(ROW_GRID, ROW_SPACING, "text-sm", className)}
>
<span className="flex size-6 shrink-0 items-center justify-center">
{leading}
Expand Down Expand Up @@ -1095,7 +1104,7 @@ export function BbDaemonUpdateRow({

return (
<ResourceRow
className="py-2"
className={ROW_SPACING}
actionsVisibility="always"
openLabel={`Open ${host.name} settings`}
onOpen={() => onOpenMachine(host.id)}
Expand Down Expand Up @@ -1147,7 +1156,7 @@ export function ProviderCliCheckRow({
const { host } = machine;
return (
<ResourceRow
className="py-2"
className={ROW_SPACING}
actionsVisibility="always"
openLabel={`Open ${host.name} settings`}
onOpen={() => onOpenMachine(host.id)}
Expand Down Expand Up @@ -1252,7 +1261,7 @@ export function MachineUpdatesRows({
return (
<ResourceRow
key={provider}
className="py-2"
className={ROW_SPACING}
actionsVisibility="always"
openLabel={`Open ${status.displayName} settings`}
onOpen={() => onOpenProvider(providerId)}
Expand Down
Loading