Mobile fast-follows: useVisualViewport test + desktop Select-Parent-at-ROOT fix #11

Merged
jknapp merged 1 commits from mobile-fast-follows into main 2026-07-13 16:19:53 +00:00
Owner

Two deferred fast-follows: (1) unit test for useVisualViewportInsets (fallback + keyboard-inset math + listener add/remove). (2) desktop ContextMenu Select Parent now disables when the parent is ROOT (via nodeActions.canSelectParent), matching the mobile selection toolbar. No toHtml change. 612 tests.

🤖 Generated with Claude Code

Two deferred fast-follows: (1) unit test for useVisualViewportInsets (fallback + keyboard-inset math + listener add/remove). (2) desktop ContextMenu Select Parent now disables when the parent is ROOT (via nodeActions.canSelectParent), matching the mobile selection toolbar. No toHtml change. 612 tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jknapp added 1 commit 2026-07-13 16:19:53 +00:00
- useVisualViewport.test.tsx: covers the visualViewport-undefined fallback,
  the keyboardInset math on a mocked visualViewport resize, and
  listener add/remove (resize + scroll) across mount/unmount.
- ContextMenu.tsx: Select Parent was only disabled at isRoot, so selecting
  a top-level section and choosing Select Parent silently landed on the
  un-editable ROOT (no outline, no toolbar) -- a dead end. Switched the
  guard to useNodeActions' canSelectParent (false whenever the node's
  parent is ROOT or missing), matching the mobile selection toolbar's
  existing identical guard.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jknapp merged commit b1afdcb585 into main 2026-07-13 16:19:53 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cloud-hosting-platform/site-builder#11