Skip to content

Commit 17aef66

Browse files
authored
The line under a row's name is text-sm, in muted-foreground (#2721)
ItemDescription was text-xs, a step below the title. It is now text-sm, the title's size, as in shadcn's own Item. The title's medium weight and foreground color set it apart from the detail in muted-foreground. Three screens that forced it back to text-xs no longer do: the allowed models list, a team's models and Browse apps on Apps. A title over a one-line description comes to 69px (was 65px). The look's type rule says where the line is text-sm.
1 parent 27b3868 commit 17aef66

6 files changed

Lines changed: 11 additions & 9 deletions

File tree

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

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

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

‎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 className="text-xs">
803+
<ItemDescription>
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
@@ -181,7 +181,7 @@ export function PageRows({
181181
* inside a card of divided rows painted a hover as a floating pill: a middle row has no corners,
182182
* and the first and last cannot be concentric with the card while sitting a border inside it.
183183
*
184-
* Every row is at least 56px, whatever it holds. A title over a description is 67px; a lone
184+
* Every row is at least 56px, whatever it holds. A title over a description is 71px; a lone
185185
* line would be 47px and look stunted beside it, so it is held up to the floor. A description
186186
* that wraps to a second line still grows the row rather than being clipped.
187187
*/

‎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 className="text-xs">
296+
<ItemDescription>
297297
The organization no longer allows it, so nobody runs
298298
it. Saving takes it off.
299299
</ItemDescription>
300300
) : model.efforts?.length ? (
301-
<ItemDescription className="text-xs">
301+
<ItemDescription>
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 67px, a single line to 47px.
47+
* A title over a one-line description comes to 71px, 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-
// 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",
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",
157157
className,
158158
)}
159159
{...props}

‎docs/app-guidelines.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ changes, for every screen at once, in a change agreed first.
220220
1. **Colors.** Only the scheme's tokens, as above.
221221
2. **Type.** Figtree on Tailwind's own type scale, in whole pixels: `text-xs` is 12px, `text-sm`
222222
14px, `text-base` 16px and a page title's `text-2xl` 24px. Controls, rows and navigation are
223-
`text-sm`; labels, times and counts are `text-xs`. No text size written by hand (`text-[13px]`).
223+
`text-sm`; labels, times and counts are `text-xs`. The line under a row's name in a card
224+
(`ItemDescription`) is `text-sm` too, in `muted-foreground`: the name's weight and color set it
225+
apart. No text size written by hand (`text-[13px]`).
224226
3. **Corners.** All from `--radius`, 10px, the design's radius base. Controls are `rounded-md`
225227
(8px), cards and the page's panel `rounded-lg` (10px), menus, dialogs and the message box
226228
`rounded-xl` (14px), round things `rounded-full`. `rounded-none` squares a part off. No other

0 commit comments

Comments
 (0)