Mobile web UI [5/7]: Give notification body text the width of its card - #297
Conversation
There was a problem hiding this comment.
Pull request overview
Improves mobile list-page layouts and notification card readability without changing desktop behavior.
Changes:
- Moves notification badges above card text on small screens.
- Reduces mobile page padding across three list pages.
- Corrects
PageHeadertitle flex sizing and priority-dot alignment.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
web/src/pages/TasksPage.tsx |
Reduces mobile content padding. |
web/src/pages/PlansPage.tsx |
Reduces mobile content padding. |
web/src/pages/NotificationsPage.tsx |
Improves mobile card width, badge layout, and dot alignment. |
web/src/components/ui/PageHeader.tsx |
Prevents title growth from displacing actions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
f8f2ec3 to
b5bbb34
Compare
|
Rebased onto the updated #296. One hunk from this PR is gone: the No review comments on this one otherwise. |
The status/type badges sat beside the text in a `shrink-0` column, so they held a fixed ~127px of a 330px row whatever the viewport. On a phone that left the body wrapping at 191px — a third of the card spent on two short chips, and prose breaking every four or five words. Below `sm` the badges take a row of their own above the title and the text gets the full card: body width goes 191px → 346px. Only spans move, so nothing changes about the tab order. Two things found alongside it: - the page scroll containers used `p-6`, so 48px of a 412px viewport went to padding before the card's own `p-4`. Now `p-4 md:p-6` on the three list pages. - the priority dot was centred against the whole title block, so a title long enough to wrap left the dot floating beside its second line rather than marking the first. Aligned to the top with a small offset. Desktop is unchanged: the badges stay beside the title from `sm` up. Refs #271
b5bbb34 to
749189c
Compare
Follow-up on #271, stacked on #296. Reported from the phone: notification body text was not using the width of its card.
The measurement
The card's inner row is 330px on a 412px viewport, but the body only got 191px:
Two short chips (
pending,notify) held over a third of the card, and prose broke every four or five words.The change
Below
smthe badges take a row of their own above the title, and the text gets the full card. Body width 191px → 346px (+81%).Two things found alongside it:
p-6— 48px of a 412px viewport spent on padding before the card's ownp-4. Nowp-4 md:p-6across the three list pages.Also corrects a line from #295
PageHeader's title wentflex-1→flex-autoin #296 to stop the filter row collapsing it. That fixed the collapse but introduced a smaller problem:flex-autogrows to fill the line, which pushed the action buttons onto a row of their own and cost a row of vertical space.The title never needed to grow —
md:ml-autoon the actions is what right-aligns them on desktop.flex-initial(0 1 auto) sizes to content, which is the property that keeps the filter row from collapsing it, still truncates viamin-w-0, and lets the actions sit alongside.For the record, all three values behave differently in a wrapping flex row, and only the third is right here:
flex-11 1 0%flex-auto1 1 autoflex-initial0 1 autoVerification
npm run buildclean;eslintclean on the touched files (pre-existing warnings only)<h1>a real widthsmup, single header row,p-6restored atmdWhere this belongs
Every line here amends a file introduced in #295, so if you would rather it were folded into that PR than stacked on top, say so — it needs a force-push across the stack, which I did not want to do unasked.