Repository navigation
fix(web): give note-row and notebook-row actions a 44 px touch target - #915
JakubAnderwald wants to merge 4 commits into
Conversation
On a touch-only pointer (`@media (hover: none)`) the note-row ⋮ grows from 28 px to a 44 px button anchored to the row's top-right corner, so its icon stays where it was, and the row reserves 48 px for it so the title still truncates before it. Its menu opens below the 44 px target, so a second tap on the ⋮ can't land on Delete. The notebook × becomes a 44 px centred, non-shrinking button and its row drops its vertical and right padding, so rows are 44 px tall and neighbouring targets can't overlap. Hover-capable pointers get no class change. Playwright checks the boxes on the touch projects (Mobile Chrome, Mobile Safari, Tablet), and the desktop #900 test checks the ⋮ is still 28 px. Closes #899 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Factory code reviewNo findings. The change does what the approved plan describes, and the one place it departs from the plan is a justified fix.
Checked against
|
CodeRabbit CLI review —
|
# Conflicts: # docs/features/notes-and-notebooks.md
|
Factory watcher: blocked on an outside-service failure, not the code. SonarCloud run 45171156594 failed before analysing anything ( |
Main (#921) put a note-count badge between the notebook name and its delete button, so the button's previous sibling is now the count, not the name, and the long-name truncation check read the wrong span. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Factory code reviewNo findings. The change does what the approved plan asks, and the one way it departs from the plan is justified and written up in the PR description.
Reviewed at
|
CodeRabbit CLI review —
|
Closes #899
Summary
On a touch-only pointer (
@media (hover: none)), the note-row ⋮ and the notebook-row × are now 44×44 px tap targets, with their icons kept at their old size. Hover-capable pointers get no class change, so desktop is unchanged. This implements the approved plan, plus one fix the plan missed (see Drift).top-0 right-0 h-11 w-11(the icon's centre stays 22 px from the row's top and right edges). The row button adds[@media(hover:none)]:pr-12to itspr-10, so the title's box ends 4 px before the target. The 54 px row holds the 44 px target, so neighbouring targets are 10 px apart.inline-flex items-center justify-center h-11 w-11 shrink-0. The row getspy-0 pr-0, so it is exactly 44 px tall and the target ends at its right edge.shrink-0stops a long name from narrowing the button.Parity report
apps/web/src/components/notes/note-list.tsx,apps/web/src/components/notebooks/notebooks-sidebar.tsx✅Test plan
pnpm --filter @drafto/web test: 2158 passed, 2 skippedpnpm --filter @drafto/web typecheck: passedpnpm --filter @drafto/web lint: 0 errors. The 22 warnings were already there; the one innotebooks-sidebar.tsxis at line 78, which this PR doesn't touch.pnpm format:check: passedpnpm test:e2e, all projects): 153 passed, 18 skipped (viewport-gated describes), 0 failed. The chromium fix(web): keep long note titles clear of the hover actions button on desktop #900 test now also asserts the ⋮ is still 28×28 with a mouse.responsive.spec.ts→touch row actions) re-run after the final change on Mobile Chrome, Mobile Safari and Tablet: 15 passed, 0 skipped. This settles the plan's open question: WebKit's iPhone 13 and iPad projects do match(hover: none), so the new 44 px checks run on all three touch projects.pnpm migration:check(no schema change).Drift vs. approved plan
note-list.tsx). The plan kept the note menu attop-8. A local review found that this puts the menu (z-10) over the lower 8 px of the new 44 px ⋮, and that strip is the Delete item, which trashes the note without asking. So a second tap on the ⋮ to close the menu could delete the note. On touch the menu now opens at[@media(hover:none)]:top-11, below the target. Desktop keepstop-8. The integration test checks both classes, and the touch E2E checks that the open menu starts below the ⋮'s box.apps/web/e2e/helpers/e2e-patterns.ts(not in the plan): the new notebook test names its notebookTouch Target NB With A Name Long Enough To Truncate In The Sidebar <timestamp>. The prefix is added toE2E_NAME_PREFIXES, asdocs/architecture/testing.md→ "E2E data hygiene" requires;e2e-cleanup-patterns.test.tsfails without it.evaluateAll, and the note-row one retries through the list's post-create refetch (toPass). Other workers sign in as the same E2E user and add rows to the same lists, so separateboundingBox()calls could see rows shift in between. The note-row test also checks that the long new notebook name really truncates, so theshrink-0case isn't vacuous.note-list.test.tsx. Hover, focus andgroup-*pr-variants stay forbidden, and the only allowed media-query padding is[@media(hover:none)]:pr-12.🤖 Generated by the dark factory (approved plan)
🤖 Generated with Claude Code