Skip to content

feat(edge-groups): expose isAutoHide() and toggle auto-hide from the demo context menu - #1537

Merged
mathuo merged 1 commit into
masterfrom
claude/edge-group-autohide-context-menu
Jul 26, 2026
Merged

feat(edge-groups): expose isAutoHide() and toggle auto-hide from the demo context menu#1537
mathuo merged 1 commit into
masterfrom
claude/edge-group-autohide-context-menu

Conversation

@mathuo

@mathuo mathuo commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Right-clicking a tab in an edge group in the demo now offers a checkable Auto-hide edge row, flipping that edge between a pinnable tool window and a static docked panel while the dock runs.

Core

DockviewGroupPanelApi.setAutoHide had no matching getter, so nothing could read back whether an edge group auto-hides. This adds isAutoHide(), alongside the existing isCollapsed() / isPeeking():

const autoHides = api.getEdgeGroup('right')?.isAutoHide(); // boolean

The resolution logic is not new. It delegates to DockviewComponent.isEdgeGroupAutoHide, which was already there: the per-group override if one is set, otherwise the autoHideEdgeGroups option for that edge. Returns false for non-edge groups and before the group is initialised.

Demo

The new row takes the slot held by Float / Popout, neither of which apply to an edge group. Grid groups are unchanged.

It is one toggling item rather than an on/off pair. Every edge group in the demo starts auto-hiding, so in a radio pair the ticked row is the one you would reach for first, and clicking it would do nothing.

Turning auto-hide off also calls expand(). A collapsed edge group loses its click-to-peek trigger along with auto-hide, and its sash is locked at the collapsed size, so without this it is left as a strip with no way to open it. That trap applies to anyone calling setAutoHide(false) directly, so it is called out on the edge groups docs page too.

Testing

  • Two new cases in dockviewGroupPanelApi.spec.ts (uninitialised returns false without touching the accessor; initialised delegates to isEdgeGroupAutoHide). Full spec passes, 53 tests.
  • Exercised in the running demo on the left and bottom edges, both directions: tick clears and the edge expands to a static docked panel; clicking again restores the tick and the tool-window chrome (pushpin + close, tabs to the bottom).

Noted, not fixed

The tab context menu can render below the viewport for bottom-edge tabs. The menu is in the DOM but positioned off-screen, so nothing appears. It flips upward correctly in some layouts but not others. Pre-existing context-menu positioning, untouched here.

🤖 Generated with Claude Code

…demo context menu

`DockviewGroupPanelApi.setAutoHide` had no matching getter, so nothing could
read back whether an edge group auto-hides. Add `isAutoHide()`, delegating to
the existing `DockviewComponent.isEdgeGroupAutoHide` resolution (per-group
override, falling back to the `autoHideEdgeGroups` option for that edge).

Use it in the demo: right-clicking a tab in an edge group now shows a checkable
"Auto-hide edge" row in place of Float / Popout, which neither apply to an edge
group. It is one toggling item rather than an on/off pair because every edge
group in the demo starts auto-hiding, so in a pair the ticked row is the one
you would reach for first and clicking it would do nothing.

Turning auto-hide off also expands the group. A collapsed edge group loses its
click-to-peek trigger along with auto-hide and its sash is locked at the
collapsed size, so without this it would be left as a strip with no way to open
it. Documented on the edge groups page for anyone calling `setAutoHide(false)`
directly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@mathuo
mathuo merged commit dcf2f4b into master Jul 26, 2026
9 checks passed
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.

1 participant