Repository navigation
Wrap the Activity list's timestamp under its event at narrow widths - #52451
Conversation
The time's narrow-width query measured whatever container hosted the list (the whole pane, or nothing in fixtures), and Tailwind's @max-[340px] is width < 340px, so a 340px pane kept the time beside every line. The list is now its own named container and wraps the time below 320px of list width.
Its class assertions test UI wiring, which the repository's test rules keep out of unit tests; the fixtures show the wrap instead.
Shows the item pane's Activity time under each line at a 340px pane and beside it at 560px, notes included.
Keeps the item pane fixture file within its line limit.
…wraps The full-row basis and indent moved to a wrapper, so the time's hover area and tooltip stay on the date instead of the whole row.
[Low impact] The PR appears safe to merge; no actionable issues were found. Summary
Reviews (1) · Last reviewed commit: "fix(bot-items): keep the activity time's..." · Reviewed by Greptile |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ELI5
In a bot item's Activity, each event line has its time on the right. In the narrowest item pane the time stayed beside every line and squeezed the text into a thin column, so a line with a note grew very tall. Now, in a narrow pane, the time moves under its line and the text gets the full width.
What Changed
BotItemActivityList) is now its own named width container (@container/item-activity), and an event's time wraps under its line when the list is under 320px wide (a pane of about 340px).BotItemPaneEventLines), and the Activity list fixtures gain a 560px width and lines with notes.Why
The time's narrow-width rule (
@max-[340px]) named no container, so it measured the whole item pane instead of the list. That rule matches widths under 340px, so a 340px pane never matched, and the time stayed beside each event, leaving the text about 160px. Measuring the list itself makes the wrap follow the room the lines really have, wherever the list is placed.Linked Issue
N/A (internal change).
Visual Proof
Headless component fixture renders with made-up data. Before is these fixtures with
main'sBotItemActivityList.tsx, so the data is identical.Item pane at 340px:
Item pane at 560px, after (pixel-identical to
main; the time stays beside each line):Hovering a wrapped time at 340px: the tooltip's arrow points at the date. The tooltip box is pinned to the fixture's left viewport edge, which is a limit of the fixture frame, not the app.
Testing
Platforms: the change is renderer CSS only, checked in headless Chromium fixture renders on macOS; it does not depend on the platform, SSH or remote hosts.
Rows at 560px and 700px are pixel-identical to
main. Mobile has no such width rule: its Activity keeps the time beside each line at the phone's full width, so it is unchanged.Performance
None, because this is CSS only: one more container query box on the Activity list, evaluated by the browser on layout like the pane's existing one. No new rendering, state or JavaScript.
Risk
Level: Low. The list now has inline-size containment, so anything inside it that is fixed-positioned would be placed relative to the list; nothing inside it is (tooltips and menus render outside it). Wider panes render as before. Back out with a plain revert.
AI Disclosure
N/A (internal contributor).
Review
N/A.
Agent skill upstream boundary
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)