Skip to content

Commit 124cf4b

Browse files
committed
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.
1 parent 79f5948 commit 124cf4b

18 files changed

Lines changed: 152 additions & 217 deletions

File tree

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

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ deviation worth stating out loud and worth a comment saying why.
4444
Four components make the frame. They compose in this order and nest no other way.
4545

4646
```
47-
PageShell the page: header (title, one-sentence description, action, backButton) then children
48-
PageSection a group of unrelated decisions under a small grey label, a large gap above it
49-
PageRows the list: flat rows, no card, split by hairline dividers
47+
PageShell the page: header (title, description, action, backButton) then children
48+
PageSection a titled group of unrelated decisions, with a deliberately large gap above it
49+
PageRows the grouped card: rounded-lg border bg-card
5050
Item one row, size="sm", divided from its neighbours by <Separator />
5151
PageEmpty what a section says when it has nothing to list
5252
```
@@ -66,22 +66,21 @@ components above; a screen that sets its own is drifting.
6666
|---------|-----|----------------|
6767
| Page edge (top / sides / bottom) | 48 / 16 / 64px | `PageShell` column (`pt-12` or `pt-8` under the bar, `px-4`, `pb-16`) |
6868
| Title → description | 8px | `PageShell` header |
69-
| Section label → description | 0px | `PageSection` |
7069
| Title block → first content | 32px | `PageShell`: `[&>header+*]:mt-8` |
7170
| Title → tabs, tabs → content | 24px, then 32px | `PageShell`: `[&>header+nav]`, `[&>header+nav+*]` |
7271
| Section → section | 48px | `PageSection` (`mt-12`) |
73-
| Label block → section content | 8px | `PageRows` / `PageEmpty` (`mt-2`) |
72+
| Section heading → description | 4px | `PageSection` |
73+
| 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` | 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 |
7877

7978
The 32px under the title is deliberately tighter than the 48px between sections: the title belongs
8079
to the page it introduces. Those `PageShell` selectors outrank the first child's own `mt-*`, so a
8180
section or notice keeps its usual margin everywhere else and loses it only at the top.
8281

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
8584
(`connections.index.tsx`). A count or filter that belongs to a search sits on the search's row, not
8685
on a line of its own.
8786

@@ -94,13 +93,10 @@ the action is right there. A search with no results uses `IconSearch` and "No ma
9493
## Words Under A Title
9594

9695
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.
104100

105101
## Screens, Not Dialogs
106102

@@ -126,21 +122,19 @@ button.
126122
page's one primary verb, on the title's baseline.
127123
3. Group the page's decisions into `PageSection`s, each with a `title` and, where the grouping is not
128124
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.
132128
5. Read `admin/plugins/index.tsx` for the whole pattern end to end, and
133129
`admin/plugins/$key.tsx` or `admin/components/$name.tsx` for a screen with several sections and
134130
mixed row kinds.
135131

136132
### Procedure 2: Compose a row
137133

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.
144138
2. `ItemContent` holds `ItemTitle` and, where the row needs a second line, `ItemDescription`.
145139
3. `ItemActions` holds the control, or the value when the row is read-only.
146140
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.
178172

179173
### Procedure 4: Sizes and variants
180174

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.
182176
2. `Button size="sm"` for a control inside a row or a dialog footer; `lg` for a page's own actions;
183177
`icon-sm` for a control floating over artwork.
184178
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
252246

253247
| Signal | What it means | Do instead |
254248
|--------|---------------|------------|
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 |
259251
| `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 |
260252
| 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 |
261253
| Children on an element passed to `Item`'s `render` | They replace the row's own children; the row draws empty | Pass a childless element |
262254
| `bg-card` on a row inside a dialog | `--card` equals `--popover`; the row is invisible | `variant="muted"` |
263255
| `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 |
264256
| A pixel constant matching a Tailwind rem token (672, 768, 1024) | Breaks the day a width or the root changes | Measure the element |
265257
| 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` |
266259
| A one-section page whose section has a `title` | The heading repeats the page title | Drop the section title; description on `PageShell` |
267260
| 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 |
268261
| A new `Dialog` nobody asked for | Something with no address, no Back, and no room to grow | A route of its own with `backButton` |

‎CHANGELOG.md‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ Newest first. `Unreleased` is what is on `main` and not yet tagged.
4949
long list never meets a proxy's limit on an address. The web app uses the new operations, and
5050
falls back to the old ones on a server from before them.
5151

52-
**Lighter lists.**
52+
**Shorter page intros.**
5353

54-
- **Settings and list pages read as lists, not admin forms.** Rows sit flat, split by thin lines,
55-
with no box around each list and no icon beside every row. Icons stay where they tell rows apart,
56-
such as app marks and file kinds. Section titles are small grey labels, and each page and section
57-
opens with one short sentence. A longer explanation, such as the full approval rules, is behind
58-
"Learn more".
54+
- **Each settings page and section opens with one short sentence.** A longer explanation, such as
55+
the full approval rules or how Memory shares facts between Bots, is behind "Learn more", and
56+
find-in-page still reaches it. Approvals, Memory, Notifications, Skills, Vault, a skill's page
57+
and New routine are shorter to read.
5958

6059
## 1.2.7
6160

‎app/src/components/approvals/waiting.tsx‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import {
44
approvalPhrase,
55
approvalWords,
66
} from "@openbot/shared/tool-name";
7-
import { useMutation, useQuery } from "@tanstack/react-query";
8-
import { useNavigate } from "@tanstack/react-router";
9-
import { Fragment, type ReactNode, useState } from "react";
10-
import { BotOrb } from "@/components/agents/bot-orb";
11-
import { ShareDetails, shareOf } from "@/components/approvals/share-details";
127
import {
138
IconDots,
149
IconHandStop,
1510
IconMessageQuestion,
1611
IconX,
1712
} from "@/components/icons";
13+
import { useMutation, useQuery } from "@tanstack/react-query";
14+
import { useNavigate } from "@tanstack/react-router";
15+
import { Fragment, type ReactNode, useState } from "react";
16+
import { BotOrb } from "@/components/agents/bot-orb";
17+
import { ShareDetails, shareOf } from "@/components/approvals/share-details";
1818
import { PageRows } from "@/components/layout/page-shell";
1919
import {
2020
BoardRow,
@@ -63,12 +63,12 @@ import {
6363
decideApprovalMutationOptions,
6464
dismissPersonQuestionMutationOptions,
6565
} from "@/lib/approvals";
66-
import { failureSaid } from "@/lib/load-failure";
6766
import { readFailure } from "@/lib/read-failure";
6867
import { relativeTime } from "@/lib/relative-time";
6968
import type { WaitingWhere } from "@/lib/tasks/groups";
7069
import { cn } from "@/lib/utils";
7170
import { queryClient } from "@/query-client";
71+
import { failureSaid } from "@/lib/load-failure";
7272

7373
type WaitingQuestion = ApprovalInboxData["questions"][number];
7474
type WaitingRequest = ApprovalInboxData["requests"][number];
@@ -823,10 +823,7 @@ export function WaitingForYou({
823823
</p>
824824
) : null}
825825
{rows.length > 0 ? (
826-
<PageRows
827-
// A question and an approval are told apart by their marks, so the tiles stay.
828-
icons
829-
>
826+
<PageRows>
830827
{rows.map((row, index) => (
831828
<Fragment key={row.key}>
832829
{index > 0 ? <Separator /> : null}

‎app/src/components/artifacts/artifacts-page.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,7 @@ export function ArtifactsPage({
247247
))}
248248
</ul>
249249
) : (
250-
<PageRows
251-
// Each row is told apart by what kind of file it is, so the tiles stay.
252-
icons
253-
>
250+
<PageRows>
254251
{artifacts.map((artifact, index) => (
255252
<div key={artifact.id}>
256253
{index > 0 ? <Separator /> : null}

‎app/src/components/bot-profile/access.tsx‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { useMutation, useQuery } from "@tanstack/react-query";
2-
import { Link } from "@tanstack/react-router";
3-
import { Fragment } from "react";
41
import {
52
IconApps,
63
IconBox,
74
IconChevronRight,
85
IconPlug,
96
IconPlus,
107
} from "@/components/icons";
8+
import { useMutation, useQuery } from "@tanstack/react-query";
9+
import { Link } from "@tanstack/react-router";
10+
import { Fragment } from "react";
1111
import {
1212
PageEmpty,
1313
PageRows,
@@ -219,10 +219,7 @@ function YourApps({ agent }: { agent: AgentProfile }) {
219219
Connect an app to let your Bots use it.
220220
</PageEmpty>
221221
) : (
222-
<PageRows
223-
// Each app is told apart by its own mark, so the tiles stay.
224-
icons
225-
>
222+
<PageRows>
226223
{rows.map((app, index) => {
227224
const granted = app.access?.granted ?? false;
228225
const locked = granted && !app.access?.givenByOwner;
@@ -537,10 +534,7 @@ function Granted({
537534
)}
538535
</PageEmpty>
539536
) : (
540-
<PageRows
541-
// Each app is told apart by its own mark, so the tiles stay.
542-
icons
543-
>
537+
<PageRows>
544538
{shownStates.map((app, index) => {
545539
const labels = tools.get(app.key) ?? [];
546540
return (

‎app/src/components/layout/loading-rows.tsx‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { cn } from "@/lib/utils";
77
const WIDTHS = ["w-40", "w-32", "w-48", "w-36", "w-44"] as const;
88

99
/**
10-
* The shape of a list that hasn't loaded yet: the same `Item` rows it will be, with bars where the
11-
* title and description go.
10+
* The shape of a list that hasn't loaded yet: the same card of `Item` rows it will be, with bars
11+
* where the title and description go.
1212
*
1313
* Built from the real `PageRows` and `Item`, so each placeholder row is as tall as a loaded one and
1414
* nothing jumps when the rows arrive. Shown only for a first load: a list that has data keeps it
@@ -20,16 +20,13 @@ const WIDTHS = ["w-40", "w-32", "w-48", "w-36", "w-44"] as const;
2020
export function LoadingRows({
2121
label,
2222
rows = 3,
23-
media = "none",
23+
media = "icon",
2424
className,
2525
}: {
2626
/** What is loading, read once: "Loading your Bots". */
2727
label: string;
2828
rows?: number;
29-
/**
30-
* The leading mark the loaded rows have: a 32px icon tile (only on a list that draws its tiles,
31-
* `PageRows icons`), a round avatar, or none, as most lists have.
32-
*/
29+
/** The leading mark the loaded rows have: a 32px icon tile, or a round avatar. */
3330
media?: "icon" | "avatar" | "none";
3431
className?: string;
3532
}) {

0 commit comments

Comments
 (0)