Redesign the Actions editor as a live pie menu - #70
Open
danielchalmers wants to merge 3 commits into
Open
Conversation
The Actions tab now edits the menu on the pie itself: every action renders as a slice (hidden ones dimmed), clicking a slice selects it in the inspector, dragging reorders using the same drag logic as the live menu, and a dashed ghost "+" slice appends a new action. The inspector pane gains Test, Duplicate, and Remove buttons and an icon+name header, replacing the old list with Add/Remove/Up/Down buttons. PieControl gains an IsEditMode dependency property (all-slices rendering, ghost slice, accent selection highlight via a new SelectedSlice property, inert hub, no digit hints) and now detaches its collection handlers on unload so short-lived hosts like the settings window are not kept alive by the app-lifetime actions collection. Drag reorder wraps over the full slot ring including the ghost slot, and an empty editor renders the ghost as a clickable full ring. PieAction gains Clone() for duplication. Fixes #16
The edit-mode pie is now focusable: arrow keys move the selection around the ring, Ctrl+arrow reorders the selected action (wrapping like the ring), Enter or Insert adds a new action, and Delete removes the selected one. Clicking a slice or the ghost focuses the control so mouse and keyboard mix naturally. The live menu keeps its window-level key handling and stays unfocusable. A custom automation peer exposes the editor to UI Automation as a list of selectable items (with the SelectionItem pattern and hidden-state help text) plus an invokable "Add an action" button, and raises selection events so screen readers can follow along.
Splits the Actions tab evenly so the inspector gets as much room as the pie, shrinks the icon box to sit beside a standard-height name field, gives every section a consistent label rhythm, and replaces most inline helper paragraphs with tooltips. The hint under the pie is now one sentence with the keyboard shortcuts in its tooltip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redesigns the Actions settings tab around a single idea: the editor is the menu. Instead of a ListBox with Add/Remove/Up/Down buttons next to a form, the tab now shows a full-size live pie where you work on the real thing. Fixes #16, since the editor itself is now the always-current preview.
How it works
Implementation notes
PieControlgets anIsEditModedependency property that renders all slices (disabled ones dimmed), appends the ghost slice, suppresses digit hints and the hub close target, and turns clicks into selection via a new TwoWay-bindableSelectedSliceproperty. The live menu path is untouched.PieControlnow detaches itsCollectionChanged/PropertyChangedhandlers on unload, so the short-lived settings window no longer stays reachable from the app-lifetime actions collection after closing.PieAction.Clone()backs the Duplicate button so future properties can't be silently dropped from copies.MoveUpCommand/MoveDownCommandand the write-onlySelectedActionIndexare gone; tests updated and extended (144 passing).Verification
Drove the real
SettingsWindowin an automated harness using genuine mouse and keyboard input (SendInput): click-to-select, live rename, ghost-slice add, Duplicate/Remove buttons, drag reorder (including a full-lap drag and a drop on the ghost wedge), hidden-action dimming, adding the first action from an empty editor, arrow-key selection, Ctrl+Arrow reorder, Enter add, Delete remove, and the UI Automation peer (child enumeration, SelectionItem.Select, and Invoke on the add button). All 26 checks pass, plus the full unit test suite.Screenshots