Skip to content

Commit 7cd8342

Browse files
committed
Type scale only; Desktop's setup window on the same scale; docs on how sizes change
The line under a row's name (ItemDescription) and the three screens that set it moved to their own pull request, so this one is the type scale alone. A title over a one-line description is 67px on the new scale (was 65px). OpenBot Desktop's setup window had its own copy of the 15/16 scale. It now uses Tailwind's whole-pixel steps too, so setup and the app match. At 16px the Docker Desktop hand-off needs a fifth line at the smallest window (720x560), so the page holds five lines there instead of four. "Sizes stay" in the look and in design-system.md now says how a size changes: only with its scale, for every screen at once, agreed first.
1 parent 5f0d188 commit 7cd8342

11 files changed

Lines changed: 28 additions & 29 deletions

File tree

‎.claude/skills/openbot-screen-layout/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ components above; a screen that sets its own is drifting.
7272
| Section heading → description | 4px | `PageSection` |
7373
| Heading block → section content | 16px | `PageRows` / `PageEmpty` (`mt-4`) |
7474
| Controls stacked inside a section | 12px | the screen, with `gap-3` |
75-
| A row in `PageRows` | 71px with a description, never under 56px | `Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
75+
| A row in `PageRows` | 67px with a description, never under 56px | `Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
7676
| Divider between rows | inset 16px from both edges | `PageRows`, on every horizontal `Separator` inside it |
7777

7878
The 32px under the title is deliberately tighter than the 48px between sections: the title belongs

‎CHANGELOG.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Newest first. `Unreleased` is what is on `main` and not yet tagged.
2424
- **Text is larger and on whole pixels.** The app's type scale was 15/16 of Tailwind's, so each
2525
size was a fraction of a pixel. It is now Tailwind's own: rows, names and fields are 14px (were
2626
13.125px), labels, times and counts 12px (were 11.25px), body text 16px and page titles 24px.
27-
The line under a row's name is 14px in a muted color, the same size as the name (was 11.25px).
28-
Rows with a description are 6px taller. OpenBot Desktop's setup window keeps its own scale.
27+
Rows with a description are 2px taller. OpenBot Desktop's setup window uses the same scale.
2928

3029
**OpenBot Desktop.**
3130

‎app/src/components/admin/controls/model-sections.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ export function AllowedModelsDialog({
800800
* listing doesn't have is titled by its full name, which is all it has.
801801
*/}
802802
{modelFacts(model.name === defaultName, model.model) ? (
803-
<ItemDescription>
803+
<ItemDescription className="text-xs">
804804
{modelFacts(model.name === defaultName, model.model)}
805805
</ItemDescription>
806806
) : null}

‎app/src/components/layout/page-parts.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function PageRows({
173173
* inside a card of divided rows painted a hover as a floating pill: a middle row has no corners,
174174
* and the first and last cannot be concentric with the card while sitting a border inside it.
175175
*
176-
* Every row is at least 56px, whatever it holds. A title over a description is 71px; a lone
176+
* Every row is at least 56px, whatever it holds. A title over a description is 67px; a lone
177177
* line would be 47px and look stunted beside it, so it is held up to the floor. A description
178178
* that wraps to a second line still grows the row rather than being clipped.
179179
*/

‎app/src/components/teams/team-models.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,12 @@ function TeamModelsDialog({
293293
<ItemTitle>{model.label}</ItemTitle>
294294
{/* By its name, as the Allowed models dialog lists it: the id is nobody's to read. */}
295295
{model.withdrawn ? (
296-
<ItemDescription>
296+
<ItemDescription className="text-xs">
297297
The organization no longer allows it, so nobody runs
298298
it. Saving takes it off.
299299
</ItemDescription>
300300
) : model.efforts?.length ? (
301-
<ItemDescription>
301+
<ItemDescription className="text-xs">
302302
Thinking:{" "}
303303
{model.efforts.map(effortLabel).join(", ")}
304304
</ItemDescription>

‎app/src/components/ui/item.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const itemVariants = cva(
4444
},
4545
/*
4646
* Linear's settings row: 16px in from every edge and 12px between media, text and actions.
47-
* A title over a one-line description comes to 71px, a single line to 47px.
47+
* A title over a one-line description comes to 67px, a single line to 47px.
4848
*/
4949
size: {
5050
default: "gap-3 px-4 py-3.5",
@@ -152,8 +152,8 @@ function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
152152
<p
153153
data-slot="item-description"
154154
className={cn(
155-
// The title's size, as in shadcn. The weight and the muted color tell the detail from the name.
156-
"line-clamp-2 text-left text-sm font-normal text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
155+
// A size below the title, so the two lines read as a label and its detail rather than two labels.
156+
"line-clamp-2 text-left text-xs font-normal text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
157157
className,
158158
)}
159159
{...props}

‎app/src/routes/_authed/_app/connections.index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ function BrowseTile({
10551055
</RowMark>
10561056
<ItemContent className="min-w-0 gap-0.5">
10571057
<ItemTitle className="block w-auto truncate">{browse.title}</ItemTitle>
1058-
<ItemDescription className="line-clamp-1">
1058+
<ItemDescription className="line-clamp-1 text-xs">
10591059
{browse.description}
10601060
</ItemDescription>
10611061
</ItemContent>

‎desktop/src/setup-page-first.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,9 @@ main:has(> .sheet.welcome.page-first) .rail .tile.with-marks > .cloud-marks {
457457
gap: 16px;
458458
}
459459

460-
/* Room for the full Docker directions: four lines in Figtree at the smallest window, 720x560. */
460+
/* Room for the full Docker directions: five lines in Figtree at the smallest window, 720x560. */
461461
.update-progress .journey.handing-off .journey-said {
462-
min-height: 4lh;
462+
min-height: 5lh;
463463
}
464464

465465
.update-progress > .update-data-reassurance {

‎desktop/src/styles.css‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* `bun run tokens:generate` rather than approximated, so the
66
* window someone sets up in looks like the product it turns into: Figtree, OpenBot's lavender frame
77
* with a white card on it, its near-black primary button, its periwinkle focus ring, its 10px radius
8-
* and its type scale (on a 15px base, as the app sets text). The app's shadcn names are kept as
8+
* and its type scale (Tailwind's, in whole pixels, as the app's). The app's shadcn names are kept as
99
* written (`--background`, `--card`, `--muted-foreground`, ...) and the names these screens were
1010
* first written against are mapped onto them below, so every rule still reads one vocabulary.
1111
*
@@ -46,13 +46,13 @@
4646
--radius-lg: var(--radius);
4747
--radius-xl: calc(var(--radius) * 1.4);
4848

49-
/* OpenBot's type scale: Tailwind's sizes times 15/16 (theme.css `@theme`). */
50-
--text-xs: 0.703125rem; /* 11.25px */
51-
--text-sm: 0.8203125rem; /* 13.125px */
52-
--text-base: 0.9375rem; /* 15px */
53-
--text-lg: 1.0546875rem; /* 16.875px */
54-
--text-2xl: 1.40625rem; /* 22.5px */
55-
--text-3xl: 1.7578125rem; /* 28.125px */
49+
/* OpenBot's type scale: Tailwind's own, in whole pixels, as the app's (theme.css). */
50+
--text-xs: 0.75rem; /* 12px */
51+
--text-sm: 0.875rem; /* 14px */
52+
--text-base: 1rem; /* 16px */
53+
--text-lg: 1.125rem; /* 18px */
54+
--text-2xl: 1.5rem; /* 24px */
55+
--text-3xl: 1.875rem; /* 30px */
5656

5757
/* Tailwind's shadows, which the app's cards and popovers use. */
5858
--shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);

‎docs/app-guidelines.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ data is already written down, in the skills under `.claude/skills/`:
213213
### The look
214214

215215
The web app keeps one look, drawn by the primitives in `app/src/components/ui` and the scheme's
216-
tokens. A screen draws with them and adds no look of its own. Sizes stay: this look changes how
217-
things are drawn, not how big they are.
216+
tokens. A screen draws with them and adds no look of its own. Sizes come from the scales: a
217+
screen takes the step it needs and never sets one of its own. A size changes only when its scale
218+
changes, for every screen at once, in a change agreed first.
218219

219220
1. **Colors.** Only the scheme's tokens, as above.
220221
2. **Type.** Figtree on Tailwind's own type scale, in whole pixels: `text-xs` is 12px, `text-sm`
221222
14px, `text-base` 16px and a page title's `text-2xl` 24px. Controls, rows and navigation are
222-
`text-sm`. The line under a row's name is `text-sm` too, in `muted-foreground`. Labels, times
223-
and counts are `text-xs`. No text size written by hand (`text-[13px]`).
223+
`text-sm`; labels, times and counts are `text-xs`. No text size written by hand (`text-[13px]`).
224224
3. **Corners.** All from `--radius`, 10px, the design's radius base. Controls are `rounded-md`
225225
(8px), cards and the page's panel `rounded-lg` (10px), menus, dialogs and the message box
226226
`rounded-xl` (14px), round things `rounded-full`. `rounded-none` squares a part off. No other

0 commit comments

Comments
 (0)