Skip to content

feat: lock individual dividers or the whole container (#73)#128

Merged
andyhorn merged 2 commits into
mainfrom
disable-container-divider
May 27, 2026
Merged

feat: lock individual dividers or the whole container (#73)#128
andyhorn merged 2 commits into
mainfrom
disable-container-divider

Conversation

@andyhorn
Copy link
Copy Markdown
Owner

@andyhorn andyhorn commented May 26, 2026

Summary

Closes #73.

Adds two interaction-locking surfaces (both default true, fully back-compat):

  • ResizableDivider.enabled — locks a single divider.
  • ResizableContainer.resizable — locks every divider in the container at once.

A divider is interactive only when both flags are true. When locked, drag/tap/hover handlers and the resize cursor are suppressed; the divider remains visually present. Programmatic resizing via ResizableController is unaffected.

Implementation notes:

  • ResizableContainerDivider takes a separate enabled parameter so the existing placeholder constructor's onResizeUpdate == null signal stays distinct from "locked."
  • Effective enabled state is recomputed each build in _buildDividerSlot, so toggling either flag at runtime works without controller invalidation.
  • Cursor falls back to MouseCursor.defer when locked, so any underlying cursor shows through; otherwise the configured cursor still wins.
  • enabled is included in ResizableDivider.props so listEquals and the in-place update path notice config-only flips.

Test plan

  • dart analyze clean
  • very_good test passes
  • New tests: per-divider drag suppression, per-divider tap/hover/drag callback suppression, container-wide drag suppression on multiple dividers, programmatic setSizes still works when resizable: false
  • Manual sanity check in the example app

🤖 Generated with Claude Code

@andyhorn andyhorn force-pushed the disable-container-divider branch from 151d6a2 to d9928ea Compare May 27, 2026 13:45
@andyhorn andyhorn enabled auto-merge (squash) May 27, 2026 13:50
andyhorn and others added 2 commits May 27, 2026 06:52
Adds `ResizableDivider.enabled` for per-divider locking and
`ResizableContainer.resizable` for container-wide locking. Both default
to `true`. A divider is interactive only when both flags are `true`;
when locked, drag/tap/hover handlers and the resize cursor are
suppressed. Programmatic resizing via `ResizableController` is
unaffected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@andyhorn andyhorn force-pushed the disable-container-divider branch from a2024ec to ce92f5d Compare May 27, 2026 13:52
@andyhorn andyhorn merged commit 86ddefe into main May 27, 2026
1 check passed
@andyhorn andyhorn deleted the disable-container-divider branch May 27, 2026 13:54
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.

Enable/disable container and/or specific divider

1 participant