Skip to content

layout: a place's menu header is icon controls, each a command - #674

Merged
foxnne merged 1 commit into
mainfrom
layout/place-menu-icons
Oct 19, 2026
Merged

foxnne merged 1 commit into
mainfrom
layout/place-menu-icons

Conversation

@foxnne

@foxnne foxnne commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Maintainer request (PM worker). Stacked on #673 (base layout/tabs-when-many); retarget to main once that merges.

What changes

The menu that drops from a place's arrange button (#634, region.arrange:<name>) now has only icon controls in its header, on the same row as the place's name:

Control Icon Command
Split right columns-2 layout.place.splitRight
Split down rows-2 layout.place.splitDown
Clear the view eraser layout.place.clear
Reset to the layout's default for this place rotate-ccw layout.place.reset
Delete (was "Remove") trash-2, in the theme's error colour layout.place.delete
  • Each control has a tooltip, and pressing it runs its command.
  • Each command takes an optional place. Without one it acts on the place whose menu is open. This is how the palette, a keymap, a tape or an agent reach the controls (app/layout/place_commands.zig, a pseudo-plugin layout, registered beside fizzy's own commands).
  • A command only asks. It joins a small queue (Picker.requests, carried out in order in the next draw, where the live Layout is), so a command run outside a frame (a control-server call) works too.
  • Whether each control applies is one rule: Picker.applies, which is allows plus whether the place shows anything, for Clear. The commands refuse with the command's title when allows says no. The buttons dim. A request that no longer applies when it runs, or a split of a place too small to split, is logged.
  • The commands' owner is Picker.commands_owner, so each layout state's commands reach their own.
  • Split and delete shut the menu.
  • The Split submenu and the text buttons are gone.
  • Anchors: region.menu.split-right:<place>, split-down, clear, reset, delete, each published only while it can be pressed. They replace picker.action:* and picker.split:*.
  • The tour now presses region.menu.split-down:Sidebar.
  • docs/AUTOMATION.md lists the new anchors and tabs:<place>, and drops the Single/Multiple and Split-menu rows.

SDK impact

Verified

  • macOS: zig build, test, test-integration (incl. the tour and every bundled demo; 81/81 steps, 314/314), check-web, test-sdk-version, check-tests-reached, check-fmt.
    • New tests: the header anchors are published only while their control applies. The commands run from the palette with no place named, by the button (a real click on region.menu.reset:Panel), and by callCommand with a place (split; the menu shuts).
    • One quiet sandbox look (--quiet, own profile, a tape opening Main's menu): Main holding one view has no app strip, and Panel holding Output and Devtools has one. The header row reads name, then split right, split down, clear, reset (dimmed) and delete (dimmed red), with the Split Right tooltip up.
  • Windows:
  • Linux: CI
  • Web: check-web

🤖 Generated with Claude Code

@foxnne
foxnne force-pushed the layout/tabs-when-many branch from dd21211 to 5fb673c Compare October 19, 2026 21:41
@foxnne
foxnne force-pushed the layout/place-menu-icons branch from 8bc57d3 to 4f24ae4 Compare October 19, 2026 21:41
@foxnne
foxnne marked this pull request as ready for review October 19, 2026 21:41
@foxnne
foxnne force-pushed the layout/tabs-when-many branch from 5fb673c to 188c474 Compare October 19, 2026 22:43
@foxnne
foxnne force-pushed the layout/place-menu-icons branch from 4f24ae4 to 43ddd77 Compare October 19, 2026 22:44
Base automatically changed from layout/tabs-when-many to main October 19, 2026 23:13
@foxnne
foxnne enabled auto-merge October 19, 2026 23:15
The menu that drops from a place's arrange button has icons only in its
header: split right, split down, clear, reset to the layout's default, and
delete, the last in the theme's error colour. Each has a tooltip and is a
command (`layout.place.splitRight`, `splitDown`, `clear`, `reset`, `delete`,
taking an optional `place`, else the one whose menu is open), so the palette,
a keymap, a tape or an agent reaches it. The button runs the command, which
asks the picker to act in its next draw. Each control publishes
`region.menu.<action>:<place>` while it can be pressed; the tour uses
`region.menu.split-down:Sidebar` in place of the old Split menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne force-pushed the layout/place-menu-icons branch from 43ddd77 to 4e5f478 Compare October 19, 2026 23:35
@foxnne
foxnne added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit ca68c27 Oct 19, 2026
11 checks passed
@foxnne
foxnne deleted the layout/place-menu-icons branch October 19, 2026 23:55
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