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 4e3633f
Browse filesBrowse the repository at this point in the historyBrowse files
PageRows draws no card: rows sit flat on the panel, split by hairline
dividers, with their text lined up under the section label. A row's icon
tile is hidden unless the list sets `icons`, which the Apps lists, a
Bot's apps, Reconnect, Artifacts and waiting items keep. Item size="sm"
is 8px top and bottom, about 53px with a description.
PageSection titles are 13px medium grey labels. PageSection and
PageShell take `learnMore`, which puts the longer explanation behind a
"Learn more" disclosure. Approvals, Memory, Notifications, Skills, Vault,
Skill detail and New routine open with one sentence each.
Docs (app guidelines rules 7 and 11, design system, screen-layout skill),
the ui-card test and the look-guard allowlist follow.
| Controls stacked inside a section | 12px | the screen, with `gap-3`|
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 |
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 |
77
78
78
79
The 32px under the title is deliberately tighter than the 48px between sections: the title belongs
79
80
to the page it introduces. Those `PageShell` selectors outrank the first child's own `mt-*`, so a
80
81
section or notice keeps its usual margin everywhere else and loses it only at the top.
81
82
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
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
84
85
(`connections.index.tsx`). A count or filter that belongs to a search sits on the search's row, not
85
86
on a line of its own.
86
87
@@ -90,6 +91,17 @@ sentence of description saying how the first one arrives, and an `action` — th
90
91
page already has — when there is one to offer. Don't repeat "Add one with X" in the description when
91
92
the action is right there. A search with no results uses `IconSearch` and "No matches".
92
93
94
+
## Words Under A Title
95
+
96
+
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.
104
+
93
105
## Screens, Not Dialogs
94
106
95
107
**A dialog is used only where the request explicitly asks for one. Everything else is a new
@@ -107,25 +119,28 @@ button.
107
119
108
120
### Procedure 1: Lay out a screen
109
121
110
-
1. Open with `PageShell`, giving it `title` and `description`. Leave `width` alone.
122
+
1. Open with `PageShell`, giving it `title` and a one-sentence `description` (Words Under A Title).
123
+
Leave `width` alone.
111
124
2. On a detail screen reached from a list, pass `backButton={{ label, linkProps }}` — it draws a
112
125
chevron-left bar above the header. Do not put a Back button in `action`; `action` is for the
113
126
page's one primary verb, on the title's baseline.
114
127
3. Group the page's decisions into `PageSection`s, each with a `title` and, where the grouping is not
115
-
self-evident, a `description`.
116
-
4. Give each section one `PageRows` card. Rows go inside it as `Item size="sm"`, with `<Separator />`
117
-
between them and none after the last. `PageRows` is a card with dividers, not a stack of cards —
118
-
gaps between rows are the wrong shape.
128
+
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.
119
132
5. Read `admin/plugins/index.tsx` for the whole pattern end to end, and
120
133
`admin/plugins/$key.tsx` or `admin/components/$name.tsx` for a screen with several sections and
121
134
mixed row kinds.
122
135
123
136
### Procedure 2: Compose a row
124
137
125
-
1.`ItemMedia variant="icon"` holds a leading icon from `@/components/icons`, drawn as a 16px glyph on
126
-
a 32px muted tile. It is what makes a card of rows scannable; a row without one reads as a
127
-
paragraph. Pass the bare icon — the variant sizes and colours it — and use plain `ItemMedia` only
128
-
for something that is its own picture, such as a Bot's avatar.
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.
129
144
2.`ItemContent` holds `ItemTitle` and, where the row needs a second line, `ItemDescription`.
130
145
3.`ItemActions` holds the control, or the value when the row is read-only.
131
146
4.`ItemHeader` and `ItemFooter` are `basis-full`, so they wrap onto a line of their own inside the
@@ -163,7 +178,7 @@ itself when the screen behind it changes something.
163
178
164
179
### Procedure 4: Sizes and variants
165
180
166
-
1.`Item size="sm"` for rows inside a card. `default` only for a row standing on its own.
181
+
1.`Item size="sm"` for rows inside a list. `default` only for a row standing on its own.
167
182
2.`Button size="sm"` for a control inside a row or a dialog footer; `lg` for a page's own actions;
168
183
`icon-sm` for a control floating over artwork.
169
184
3.`Item variant` — pick **one for the whole screen**. `muted` is a fill with no border; `outline` is
@@ -237,8 +252,10 @@ is actually on screen. The root was once 15px, and every constant taken from the
237
252
238
253
| Signal | What it means | Do instead |
239
254
|--------|---------------|------------|
240
-
| 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`|
241
-
| Rows separated by `gap-*` instead of `<Separator />`| A stack of cards rather than one card of rows |`<Separator />` between rows, none after the last |
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`|
242
259
|`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 |
243
260
| 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 |
244
261
| Children on an element passed to `Item`'s `render`| They replace the row's own children; the row draws empty | Pass a childless element |
0 commit comments