Skip to content

Conversation

@alltheseas
Copy link
Contributor

Summary

  • Fix back button requiring two clicks to return from noteview
  • Add WCAG 2.1 compliant 44x44 minimum touch target for back button
  • Fix window drag handler stealing clicks from back button on desktop
  • Request repaint on returning state transition for event-driven platforms (Linux, Android)

Closes #1230

Test plan

  • Tested on Linux desktop - single click returns
  • Tested on Android - single tap returns
  • Regression tests added for WCAG hitbox size

🤖 Generated with Claude Code

@alltheseas alltheseas requested a review from kernelkind January 1, 2026 01:29
alltheseas and others added 3 commits December 31, 2025 20:37
The back button chevron was only 8x15 pixels, well below the WCAG 2.1
minimum of 44x44 CSS pixels for touch targets. This made it easy to
miss clicks, especially on touch devices.

- Add MIN_TOUCH_SIZE constant (44.0) for WCAG compliance
- Expand back button hitbox to meet minimum size
- Extend hitbox to left edge for easier targeting
- Add regression tests for hitbox size requirements

Part of fix for GitHub issue damus-io#1230.

Signed-off-by: alltheseas

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The header's window drag sensing was capturing clicks before the back
button could process them (visible as the 4-way drag cursor appearing
on first click).

- Render title bar first so back button gets click priority
- Gate drag detection on pointer NOT being over back button hitbox
- Skip drag if pointer position is unknown (avoids capturing clicks)
- Disable window drag entirely on Android/iOS (not applicable)

Part of fix for GitHub issue damus-io#1230.

Signed-off-by: alltheseas

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
On Linux and Android with event-driven rendering, no repaint was
requested after processing back actions, causing the return animation
to stall until another input event occurred.

- Request repaint when returning state transitions from false to true
  (critical for Android where first frame won't emit NavAction::Returning)
- Request continuous repaints during NavAction::Returning for stack nav
- Request continuous repaints during NavAction::Returning for sheet/popup

Closes damus-io#1230

Signed-off-by: alltheseas

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@alltheseas alltheseas force-pushed the fix-noteview-two-clicks branch from f1c69e4 to 1ce0249 Compare January 1, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linux: back button requires two clicks to return from note view

1 participant