Toolbar: drag commands from drop-downs onto the toolbar; pin icon; Customize Toolbar… (#295)

* Toolbar drop-downs highlight the row under the pointer and the keyboard focus (#288)

A panel drop-down's command rows are full-width rows that take the theme's hover background
(icon, label and shortcut on it) when hovered or focused. Up/Down move the focus through the
enabled rows, Enter starts the command, Escape closes the drop-down. Rows publish
`dropdown:<id>` and the highlighted one `dropdown_hot:<id>`; scenario s46 checks pointer and
keyboard highlight.

Fixes #288

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT

* Toolbar: drag commands from drop-downs onto the toolbar; pin icon; Customize Toolbar… (#289)

- A panel drop-down row drags onto the toolbar (a button or a panel's free space, with the
  drop line) and is pinned there; the dragged command's icon follows the pointer.
- A toolbar button dragged off the toolbar, or back into the open drop-down, leaves it (its
  icon shows a cross while releasing would remove it).
- A hovered drop-down row shows a pin at its end: click to pin or unpin.
- Right-click on the toolbar's empty space: Customize Toolbar… (a window listing the tab's
  commands with check boxes, and Reset Toolbar) and Reset Toolbar; command menus have
  Customize Toolbar… too.
- Still per workspace and tab, kept with the preferences. Toolbar buttons also publish
  `button:<id>`; scenario s47 drags a row to the toolbar, unpins by dragging off and into the
  drop-down, uses the pin icon and Customize Toolbar…, and checks it survives a restart.

Fixes #289

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT

* Toolbar drop-down pin: a push pin drawn in code (upright and filled when pinned); control protocol lists the toolbar handles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bherbruckandClaude Opus 5.5 authored and GitHub committed 2026-10-12 10:27:25 -04:00
1 parent 3d99ab4bb1
commit 2cac9cad6a
7 files changed
+490 -27

No files matched your search

@@ -0,0 +1,75 @@
[
{
"note": "#288: a panel drop-down highlights the row under the pointer with the hover background, and the row with keyboard focus. Drop-down rows publish `dropdown:<command id>`, the highlighted one also `dropdown_hot:<command id>`."
},
{
"click": {
"handle": "panel:SOLID:CREATE"
}
},
{
"expect": {
"shown_handles": ["dropdown:solid.box", "dropdown:solid.sphere"],
"hidden_handles": ["dropdown_hot:solid.box", "dropdown_hot:solid.sphere"]
}
},
{
"move": {
"handle": "dropdown:solid.box"
}
},
{
"expect": {
"shown_handles": ["dropdown_hot:solid.box"],
"hidden_handles": ["dropdown_hot:solid.sphere", "dropdown_hot:solid.cylinder"]
}
},
{
"move": {
"handle": "dropdown:solid.sphere"
}
},
{
"expect": {
"shown_handles": ["dropdown_hot:solid.sphere"],
"hidden_handles": ["dropdown_hot:solid.box"]
}
},
{
"move": [700, 600]
},
{
"expect": {
"shown_handles": ["dropdown:solid.box"],
"hidden_handles": ["dropdown_hot:solid.sphere", "dropdown_hot:solid.box"]
}
},
{
"note": "The keyboard: Down focuses the first row, Down again the next; the highlight follows."
},
{
"key": "ArrowDown"
},
{
"expect": {
"shown_handles": ["dropdown_hot:sketch.create"]
}
},
{
"key": "ArrowDown"
},
{
"expect": {
"shown_handles": ["dropdown_hot:solid.extrude"],
"hidden_handles": ["dropdown_hot:sketch.create"]
}
},
{
"key": "Enter"
},
{
"expect": {
"hidden_handles": ["dropdown:solid.box"]
}
}
]
@@ -0,0 +1,119 @@
[
{
"note": "#289: drag a command from a panel's drop-down onto the toolbar to pin it (a drop line shows where), drag a button off the toolbar or back into the drop-down to unpin it, the pin icon on a hovered drop-down row, and Customize Toolbar… in the toolbar's own menu. Kept with the preferences."
},
{
"expect": {
"shown_handles": ["toolbar:solid.extrude"],
"hidden_handles": ["toolbar:solid.sphere", "toolbar:solid.torus"]
}
},
{
"click": {"handle": "panel:SOLID:CREATE"}
},
{
"drag": [{"handle": "dropdown:solid.sphere"}, {"handle": "button:solid.extrude"}],
"steps": 12
},
{
"key": "Escape"
},
{
"expect": {
"hidden_handles": ["dropdown:solid.sphere"],
"handle_order": ["toolbar:solid.sphere", "toolbar:solid.extrude"]
}
},
{
"note": "A button dragged off the toolbar leaves it."
},
{
"drag": [{"handle": "toolbar:solid.sphere"}, [700, 600]],
"steps": 12
},
{
"expect": {
"hidden_handles": ["toolbar:solid.sphere"],
"shown_handles": ["toolbar:solid.extrude"]
}
},
{
"note": "The pin icon on a hovered drop-down row pins the command."
},
{
"click": {"handle": "panel:SOLID:CREATE"}
},
{
"move": {"handle": "dropdown:solid.torus"}
},
{
"expect": {
"shown_handles": ["dropdown_pin:solid.torus"],
"hidden_handles": ["dropdown_pin:solid.box"]
}
},
{
"click": {"handle": "dropdown_pin:solid.torus"}
},
{
"expect": {
"shown_handles": ["dropdown:solid.box"],
"tool": null,
"dialog": null
}
},
{
"key": "Escape"
},
{
"expect": {
"shown_handles": ["toolbar:solid.torus"]
}
},
{
"note": "A button dragged back into its open drop-down leaves the toolbar."
},
{
"click": {"handle": "panel:SOLID:CREATE"}
},
{
"drag": [{"handle": "button:solid.torus"}, {"handle": "dropdown:solid.box"}],
"steps": 12
},
{
"key": "Escape"
},
{
"expect": {
"hidden_handles": ["toolbar:solid.torus", "dropdown:solid.box"]
}
},
{
"note": "Customize Toolbar… in the toolbar's own menu: tick a command."
},
{
"call": "ui.menu",
"params": {"x": 1000, "y": 60, "target": {"type": "toolbar"}}
},
{
"call": "ui.menuPick",
"params": {"item": "Customize Toolbar…"}
},
{
"click": {"handle": "customize:solid.sphere"}
},
{
"expect": {
"shown_handles": ["toolbar:solid.sphere"]
}
},
{
"restart": "close"
},
{
"expect": {
"shown_handles": ["toolbar:solid.sphere", "toolbar:solid.extrude"],
"hidden_handles": ["toolbar:solid.torus"]
}
}
]