You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 124cf4b
Browse filesBrowse the repository at this point in the historyBrowse files
Narrow to shorter page intros; keep the row look as it is
Rows, icon tiles, Item sizes and section headings go back to what main
has. What stays: PageShell and PageSection take `learnMore`, and a new
PageIntro draws the one-sentence description with "Learn more" after it.
Closed, the longer text is hidden until found, so find-in-page still
reaches it. The Skills intro now leads with what to do.
| Controls stacked inside a section | 12px | the screen, with `gap-3`|
75
-
| A row in `PageRows`| about 53px with a description, never under 48px |`Item size="sm"` (`py-2 gap-3`), `PageRows` (`min-h-12`) |
76
-
| Row text → column edge | 0px: the text lines up with the label above |`PageRows` (`-mx-2`, rows `px-2`) |
77
-
| Divider between rows | lined up with the rows' text |`PageRows`, on every horizontal `Separator` inside it |
75
+
| A row in `PageRows`| 65px with a description, never under 56px |`Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
76
+
| Divider between rows | inset 16px from both edges |`PageRows`, on every horizontal `Separator` inside it |
78
77
79
78
The 32px under the title is deliberately tighter than the 48px between sections: the title belongs
80
79
to the page it introduces. Those `PageShell` selectors outrank the first child's own `mt-*`, so a
81
80
section or notice keeps its usual margin everywhere else and loses it only at the top.
82
81
83
-
A page with one section gives that section no `title`: the page title already names it, and a label
84
-
32px below it says the same thing twice. Put the description on `PageShell` instead
82
+
A page with one section gives that section no `title`: the page title already names it, and a second
83
+
heading 32px below the first says the same thing twice. Put the description on `PageShell` instead
85
84
(`connections.index.tsx`). A count or filter that belongs to a search sits on the search's row, not
86
85
on a line of its own.
87
86
@@ -94,13 +93,10 @@ the action is right there. A search with no results uses `IconSearch` and "No ma
94
93
## Words Under A Title
95
94
96
95
A page's `description` and a section's `description` are each **one short sentence**: what the page
97
-
or the group is for. A longer explanation (how rules combine, what happens in each case, an
98
-
exception) goes in `learnMore`, on `PageShell` or `PageSection`. It opens under the sentence when the
99
-
person presses "Learn more", and stays in the page while closed, so find-in-page reaches it. A
100
-
section whose title and rows already say it needs no description.
101
-
102
-
The section title is a label, not a heading to read: 13px, medium weight, `muted-foreground`. The
103
-
rows under it are what a person reads.
96
+
or the group is for, or what to do on it. A longer explanation (how rules combine, what happens in
97
+
each case, an exception) goes in `learnMore`, on `PageShell` or `PageSection`. It opens under the
98
+
sentence when the person presses "Learn more". While closed it is hidden until found, so
99
+
find-in-page still reaches it. A section whose title and rows already say it needs no description.
104
100
105
101
## Screens, Not Dialogs
106
102
@@ -126,21 +122,19 @@ button.
126
122
page's one primary verb, on the title's baseline.
127
123
3. Group the page's decisions into `PageSection`s, each with a `title` and, where the grouping is not
128
124
self-evident, a one-sentence `description`.
129
-
4. Give each section one `PageRows`. Rows go inside it as `Item size="sm"`, with `<Separator />`
130
-
between them and none after the last. `PageRows` is a flat list with dividers, not a card and not
131
-
a stack of cards: gaps between rows are the wrong shape.
125
+
4. Give each section one `PageRows` card. Rows go inside it as `Item size="sm"`, with `<Separator />`
126
+
between them and none after the last. `PageRows` is a card with dividers, not a stack of cards —
127
+
gaps between rows are the wrong shape.
132
128
5. Read `admin/plugins/index.tsx` for the whole pattern end to end, and
133
129
`admin/plugins/$key.tsx` or `admin/components/$name.tsx` for a screen with several sections and
134
130
mixed row kinds.
135
131
136
132
### Procedure 2: Compose a row
137
133
138
-
1. A row has no leading icon by default: a glyph beside every row repeats what its title says.
139
-
Give the rows icons only where the icon tells them apart: an app's mark, a file's kind. Then
140
-
each row's `ItemMedia variant="icon"` holds the icon from `@/components/icons` (a 16px glyph on a
141
-
32px tile), and the list is `<PageRows icons>`. Without `icons`, `PageRows` does not draw the
142
-
tile. Plain `ItemMedia` is for something that is its own picture, such as a Bot's avatar or an
143
-
app's logo, and is always drawn.
134
+
1.`ItemMedia variant="icon"` holds a leading icon from `@/components/icons`, drawn as a 16px glyph on
135
+
a 32px muted tile. It is what makes a card of rows scannable; a row without one reads as a
136
+
paragraph. Pass the bare icon — the variant sizes and colours it — and use plain `ItemMedia` only
137
+
for something that is its own picture, such as a Bot's avatar.
144
138
2.`ItemContent` holds `ItemTitle` and, where the row needs a second line, `ItemDescription`.
145
139
3.`ItemActions` holds the control, or the value when the row is read-only.
146
140
4.`ItemHeader` and `ItemFooter` are `basis-full`, so they wrap onto a line of their own inside the
@@ -178,7 +172,7 @@ itself when the screen behind it changes something.
178
172
179
173
### Procedure 4: Sizes and variants
180
174
181
-
1.`Item size="sm"` for rows inside a list. `default` only for a row standing on its own.
175
+
1.`Item size="sm"` for rows inside a card. `default` only for a row standing on its own.
182
176
2.`Button size="sm"` for a control inside a row or a dialog footer; `lg` for a page's own actions;
183
177
`icon-sm` for a control floating over artwork.
184
178
3.`Item variant` — pick **one for the whole screen**. `muted` is a fill with no border; `outline` is
@@ -252,17 +246,16 @@ is actually on screen. The root was once 15px, and every constant taken from the
252
246
253
247
| Signal | What it means | Do instead |
254
248
|--------|---------------|------------|
255
-
| A hand-written `rounded-lg border border-border bg-card` div wrapping rows | A card around a list, which `PageRows` no longer draws | Use `PageRows`|
256
-
| Rows separated by `gap-*` instead of `<Separator />`| A stack of cards rather than one list of rows |`<Separator />` between rows, none after the last |
257
-
|`<PageRows icons>` on a list whose icons are one per kind of setting | A tile that repeats the title, the look this layout dropped | Leave `icons` off; keep it for app marks and file kinds |
258
-
| A page or section description of two or more sentences | A paragraph between the title and the rows | One sentence; the rest in `learnMore`|
249
+
| A hand-written `rounded-lg border border-border bg-card` div wrapping rows |`PageRows` re-implemented, and it will drift from the other seven screens | Use `PageRows`|
250
+
| Rows separated by `gap-*` instead of `<Separator />`| A stack of cards rather than one card of rows |`<Separator />` between rows, none after the last |
259
251
|`width="wide"` on anything that is not a table | Prose width is the default for a reason; wide was for the audit log | Leave `width` alone |
260
252
| A `max-w-*`, `p-*` or text size invented for one screen | A fifth container width, which is what this layout exists to stop | Reach for the existing component |
261
253
| Children on an element passed to `Item`'s `render`| They replace the row's own children; the row draws empty | Pass a childless element |
262
254
|`bg-card` on a row inside a dialog |`--card` equals `--popover`; the row is invisible |`variant="muted"`|
263
255
|`Item variant="outline"` and `variant="muted"` on one screen | Reads as two kinds of list and invites a distinction that is not there | One variant per screen |
264
256
| A pixel constant matching a Tailwind rem token (672, 768, 1024) | Breaks the day a width or the root changes | Measure the element |
265
257
| An `mt-*` on a screen's first block, or a gap between blocks not in the Rhythm table | A second spacing scale, which is what made every screen feel slightly off | Let `PageShell` and `PageSection` space it |
258
+
| A page or section description of two or more sentences | A paragraph between the title and the rows | One sentence; the rest in `learnMore`|
266
259
| A one-section page whose section has a `title`| The heading repeats the page title | Drop the section title; description on `PageShell`|
267
260
| A `Switch` on a row that needs two or more values | Half the change happens in place and half somewhere else | A summary, a chevron, and a screen |
268
261
| A new `Dialog` nobody asked for | Something with no address, no Back, and no room to grow | A route of its own with `backButton`|
0 commit comments