Skip to content

Commit ade0691

Browse files
samejrclaude
andcommitted
fix(webapp): tighten settings row descriptions
Drops the row description a size (small to extra-small, 14px to 12px) and halves the title-to-description gap, both in the shared settings layout so every settings page follows. The gap moves to an exported constant, since the profile page hand-rolls its rows to match the Profile section's heights. Also describes what the Icon contrast switch does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 34ad34f commit ade0691

2 files changed

Lines changed: 30 additions & 17 deletions

File tree

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export function SettingsRowTitle({
114114
);
115115
}
116116

117-
/** Description/subtitle typography for a row. */
117+
/** Description/subtitle typography for a row - a step down from the title. */
118118
export function SettingsRowDescription({
119119
children,
120120
className,
@@ -123,12 +123,16 @@ export function SettingsRowDescription({
123123
className?: string;
124124
}) {
125125
return (
126-
<Paragraph variant="small" className={className}>
126+
<Paragraph variant="extra-small" className={className}>
127127
{children}
128128
</Paragraph>
129129
);
130130
}
131131

132+
/** Title-to-description spacing, kept in one place so every settings row and
133+
* anything hand-rolling the pair reads the same. */
134+
export const SETTINGS_ROW_TITLE_GAP = "space-y-0.5";
135+
132136
/**
133137
* A single settings row: title + description on the left, action on the right.
134138
*
@@ -170,7 +174,7 @@ export function SettingsRow({
170174
)}
171175
>
172176
{children ?? (
173-
<div className="flex-1 space-y-1">
177+
<div className={cn("flex-1", SETTINGS_ROW_TITLE_GAP)}>
174178
{title ? (
175179
<SettingsRowTitle htmlFor={htmlFor} className={titleClassName}>
176180
{title}
@@ -229,7 +233,7 @@ export function SettingsAlertRow({
229233

230234
return (
231235
<SettingsRow action={action}>
232-
<div className="flex-1 space-y-1">
236+
<div className={cn("flex-1", SETTINGS_ROW_TITLE_GAP)}>
233237
<div className="flex items-center gap-1.5">
234238
<Icon className={cn("size-4 shrink-0", color)} />
235239
<SettingsRowTitle className={color}>{title}</SettingsRowTitle>

apps/webapp/app/routes/account._index/route.tsx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import { InputGroup } from "~/components/primitives/InputGroup";
2020
import { Label } from "~/components/primitives/Label";
2121
import { Switch } from "~/components/primitives/Switch";
2222
import { NavBar, PageTitle } from "~/components/primitives/PageHeader";
23-
import { Paragraph } from "~/components/primitives/Paragraph";
23+
import {
24+
SETTINGS_ROW_TITLE_GAP,
25+
SettingsRowDescription,
26+
} from "~/components/primitives/SettingsLayout";
2427
import { CUSTOMIZE_SIDEBAR_PARAM } from "~/components/navigation/sideMenuTypes";
2528
import { ALL_THEME_OPTIONS, THEME_OPTIONS_BY_VALUE } from "~/components/themeOptions";
2629
import { prisma } from "~/db.server";
@@ -44,6 +47,7 @@ import { requireUser, requireUserId } from "~/services/session.server";
4447
import { emailSchema, MAX_EMAIL_LENGTH } from "~/utils/emailValidation";
4548
import { accountPath, v3EnvironmentPath } from "~/utils/pathBuilder";
4649
import { pageMeta } from "~/utils/pageTitle";
50+
import { cn } from "~/utils/cn";
4751

4852
export const meta = pageMeta("Your profile");
4953

@@ -345,12 +349,12 @@ export default function Page() {
345349
{customizeSidebarPath && (
346350
<div className="flex min-h-16 w-full items-center border-b border-grid-dimmed">
347351
<div className="flex w-full items-center justify-between gap-4">
348-
<InputGroup className="flex-1">
352+
<div className={cn("flex-1", SETTINGS_ROW_TITLE_GAP)}>
349353
<Label>App sidebar</Label>
350-
<Paragraph variant="small">
354+
<SettingsRowDescription>
351355
Customize sidebar item visibility, order and rename favorites
352-
</Paragraph>
353-
</InputGroup>
356+
</SettingsRowDescription>
357+
</div>
354358
<div className="flex flex-none items-center">
355359
<LinkButton to={customizeSidebarPath} variant="secondary/small">
356360
Customize
@@ -361,10 +365,12 @@ export default function Page() {
361365
)}
362366
<div className="flex min-h-16 w-full items-center border-b border-grid-dimmed">
363367
<div className="flex w-full items-center justify-between gap-4">
364-
<InputGroup className="flex-1">
368+
<div className={cn("flex-1", SETTINGS_ROW_TITLE_GAP)}>
365369
<Label>Interface theme</Label>
366-
<Paragraph variant="small">Choose your interface color scheme</Paragraph>
367-
</InputGroup>
370+
<SettingsRowDescription>
371+
Choose your interface color scheme
372+
</SettingsRowDescription>
373+
</div>
368374
<div className="flex flex-none items-center">
369375
<Select<ThemePreference, ThemePreference>
370376
aria-label="Interface theme"
@@ -410,10 +416,10 @@ export default function Page() {
410416
{theme !== "classic" && (
411417
<div className="flex min-h-16 w-full items-center border-b border-grid-dimmed">
412418
<div className="flex w-full items-center justify-between gap-4">
413-
<InputGroup className="flex-1">
419+
<div className={cn("flex-1", SETTINGS_ROW_TITLE_GAP)}>
414420
<Label>Contrast</Label>
415-
<Paragraph variant="small">Adjust the interface contrast</Paragraph>
416-
</InputGroup>
421+
<SettingsRowDescription>Adjust the interface contrast</SettingsRowDescription>
422+
</div>
417423
<div className="flex flex-none items-center">
418424
<Slider
419425
variant="settings"
@@ -445,9 +451,12 @@ export default function Page() {
445451
)}
446452
<div className="flex min-h-16 w-full items-center border-b border-grid-dimmed">
447453
<div className="flex w-full items-center justify-between gap-4">
448-
<InputGroup className="flex-1">
454+
<div className={cn("flex-1", SETTINGS_ROW_TITLE_GAP)}>
449455
<Label>Icon contrast</Label>
450-
</InputGroup>
456+
<SettingsRowDescription>
457+
Increase the contrast of icons and badges
458+
</SettingsRowDescription>
459+
</div>
451460
<div className="flex flex-none items-center">
452461
<Switch
453462
variant="medium"

0 commit comments

Comments
 (0)