Skip to content

feat(activity): phone rows use the web's compact spacing (two-line preview kept) - #5123

Closed
stamp-build[bot] wants to merge 5 commits into
mainfrom
agent/sindresorhus/activity-phone-compact
Closed

stamp-build[bot] wants to merge 5 commits into
mainfrom
agent/sindresorhus/activity-phone-compact

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

sindresorhus from raft opened this pull request through Stamp
View in Stamp →


Summary

Phone (narrow) Activity rows now use the web's compact list-cell spacing, raft-ui InboxItem density="compact", as decided by artin. The phone keeps its two-line preview; only the wide layout uses one line. The wide layout was already aligned in #5073. This PR applies the same ActivityRowLayout values to the phone.

Values (phone, by touch): before → after

Before After Web source
Row fill shape (selected / pressed / menu-open / hover) full-bleed rectangle rounded (RaftRadius.Control), inset 8dp from each side lib/list-cell.ts --cell-inset-x:8px, --cell-radius
Content inset from the screen edge 16dp 20dp (8dp shape inset + 12dp inside it) list-cell.ts --cell-pad-x:12px; patterns/lists.md "20px from the list's edges on a phone"
Padding above / below 12dp 8dp inbox-item.recipe.ts pointer-coarse:py-2
Row min height none 56dp pointer-coarse:min-h-14
Dividers between rows 1dp hairline from 64dp none lists.md "lists have no dividers"; inbox-item.md "Draw no line between items"
Gap between rows 0 2dp lists.md list gap-0.5
Space above the first row 4dp 8dp lists.md py-2
Day heading inset 16dp 20dp (the rows' content line) lists.md "One edge"
Excerpt lines 2 (reserved) 2 (unchanged, per artin) (web phone uses 1 via InboxItemLine)
Title → excerpt gap 0 0 (unchanged) compact itemBody mt-0
Leading avatar / tile 35dp in a 36dp slot, vertically centered unchanged itemLeading size-9, compact items-center

With a mouse or trackpad in a narrow window (RaftScale.Compact + RaftPointerInput.Fine), the row keeps 12dp above and below and has no minimum height. That is the web's py-3 below md, since md:pointer-fine only applies from 768px. The inline padding stays at 12dp inside the shape.

Swipe actions, unread marks, the hover Done button and day-group headings are unchanged. Swipe layers still span the full row, as SWIPE_LAYER_CLASS does on the web.

Web refs: raft-design 7c3dcbb3 (packages/ui/src/components/inbox-item/inbox-item.recipe.ts, inbox-item.md, packages/ui/src/lib/list-cell.ts, design/patterns/lists.md); slock origin/staging e6808e9ee (features/thread/InboxRow.tsx uses density="compact" at every width).

Screenshots

The 21 phone Activity row goldens (screens.activity.rows*, screens.activity.object-rows*, screens.activity.task-rows*, activity.app-bot.dm-rows*, hover.activity-row*) were re-recorded in CI (Test run 44675369935, record_screenshots=true). No other golden changed beyond tolerance. ActivityConversationRowsScreenshotTest now lays out its rows the way SharedActivityList does: 8dp top padding, 2dp gap, headings on the content edge.

Visual-testing components.home.activity.results (run 44675389296, publish=false): Android and React now share the 20dp content and heading edge and have no dividers. The remaining difference is the intended two-line preview.

Changeset

Needs a changeset for 1.28 after the 1.27 cut (change-logs/1.28.0 doesn't exist on main yet).

@stamp-build stamp-build Bot mentioned this pull request Nov 20, 2026
26 tasks
sindresorhus and others added 5 commits November 20, 2026 07:02
…eview kept)

Phone Activity rows take raft-ui InboxItem density="compact" as a list cell
(raft-design patterns/lists.md, components/inbox-item.md): the state shape 8dp
in from each side, the content 12dp inside it (20dp from the screen's edge),
8dp above and below with a 56dp minimum by touch (12dp, no minimum, with a
mouse in a narrow window), rows 2dp apart with no hairline, 8dp above the
first row, day headings on the 20dp content line. The two reserved excerpt
lines stay.

Goldens of the phone Activity rows removed for a CI re-record.

Signed-off-by: sindresorhus <raft+sindresorhus@agents.stamp.build>
…5369935)

Signed-off-by: sindresorhus <raft+sindresorhus@agents.stamp.build>
…t-ui listColumnMargin)

Signed-off-by: sindresorhus <raft+sindresorhus@agents.stamp.build>
… run 44680263340)

Signed-off-by: sindresorhus <raft+sindresorhus@agents.stamp.build>
Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Signed-off-by: sindresorhus <raft+sindresorhus@agents.stamp.build>
@stamp-build
stamp-build Bot force-pushed the agent/sindresorhus/activity-phone-compact branch 2 times, most recently from d99b08c to 0625940 Compare November 20, 2026 07:02
@stamp-build

stamp-build Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Merged by Stamp in batch f356d08303126c2b0360de0f6b9a24cf: a89faf8 . The batch passed its required CI; this PR is closed because its commit was included by fast-forward.

Review in stamp.build

@stamp-build stamp-build Bot closed this Nov 20, 2026
@stamp-build
stamp-build Bot deleted the agent/sindresorhus/activity-phone-compact branch November 20, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants