Repository navigation
Stage J5a: move the Shortcuts page into its own page, with an overlay interface - #111
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move. The page's controls leave MainWindow for ShortcutsPage, which still builds them in code as before and shows ShortcutPageViewModel: the Mod list and choice, the target window, input arming, the status line, the durations, the privilege text and hotkey errors now live there, and the page sends its clicks as requests. The overlay is reached through the new IShortcutOverlay (AppServices.Overlay); MainWindow implements it until J5b. Until then the window also builds the page's appearance, behaviour and character follow blocks through the IShortcutPageSettings bridge. ShortcutModOption and ShortcutTarget move to Models; MainWindow.PageLayout.cs is gone. Screenshots match the baseline. New unit tests for the view model's rules and a UI smoke test for the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Appearance (docs/development/UI-Fluent-Design-Plan.md, "快捷键(J5)"), like the PowerToys keyboard and settings pages: - The page is XAML now. Whether keys can reach the game is an InfoBar (a warning when the selected window runs with more rights), with "Restart as administrator" as its action instead of a caption and a button. - The Mod, the target window (with a refresh button) and "Enable input" are setting cards. - Each binding is one row: what it does and where it comes from, its keys drawn as key caps by the new KeyVisual control, and a Send button; a binding that cannot be sent is greyed out with the reason. "Hide unsendable" is a switch on the bindings title row and "Show INI file" moved to its "..." menu. - The overlay, character follow and sending settings are SettingsExpanders; the durations are setting cards. - One column at every width (bindings, then settings): the settings column beside the bindings was too narrow for setting cards, so ShortcutsLayoutPolicy is gone. The three roadmap hints were already done in 4.6.2; the roadmap says so. New: ShortcutKeyCaps with tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Usage flow, from the user's side: - A status InfoBar under the send target says where keys go now: the window (or "no window selected"), input on/off, the input method and whether the overlay is open, with the last result as its message. It is a warning with "Refresh windows" when there is no window, informational while input is off, success when keys can be sent. - The global hotkey is a switch next to its chord; choosing a chord applies it at once. The Apply and Disable buttons are gone, so there is nothing left to forget to apply. - Empty states: a repository without Mods says so and offers "Open the dashboard"; a Mod without bindings says its INI has no key = lines and offers "Show INI file". - The page reads top to bottom: what to send to which window, the status, the bindings, then the overlay settings; character follow and sending stay folded as advanced settings. New UI test: the hotkey switch turns the hotkey off and on and it is saved. Removed the now unused keys ShortcutPanel.Disable, ShortcutPanel.HotkeyGroup and ShortcutPanel.GlobalHotkeyDisabledOrUnavailableChoose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 6 tasks
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.
Summary
Stage J5a: the Shortcuts page moves out of
MainWindow, and the page and overlay talk through an interface (docs/development/UI-Structure-Plan.md, J5). J5 is split in two because the page and overlay touch about 3,100 lines in 10 files; J5b (the overlay content and its settings) follows in its own PR, stacked on this one.dccc3a5: lists what the Shortcuts page and overlay depend on, inUI-Structure-Plan.md.29b851e: pure move.Pages/ShortcutsPage; its shared state goes intoShortcutPageViewModel.IShortcutOverlay(AppServices.Overlay:IsVisible,IsClickThrough,Open,Hide,Toggle,Refresh(bindingsChanged)) is the only way the page, the hotkey and the window reach the overlay.50633db: appearance.InfoBar,SettingsCards and key caps; a unit-tested Core helper splits a binding's key text into caps, including a literal "+" key.63ac80f: usage flow (before → now):InfoBar. It warns when the selected game runs with more rights than the manager, with "Restart as administrator" as its button.e6500a9: mergesmainafter Stage J4-b: first-run game cards, getting-started tips and a hideable search box #110 (J4-b); no conflicts.The three hint fixes listed in the roadmap (the F10 wording, "keys can't be changed here" with the INI button, "slots only save parameter values") had already shipped in 4.6.2; the roadmap now says so.
Unchanged behaviour: F10 timing, how keys are sent, the global hotkey, click-through, the automatic-contrast calculation, and what slot switching and saving produce. The overlay content and its six settings blocks stay on the window side until J5b.
ShortcutBindings.csbelongs to the Mod workspace and waits for J7.MainWindow*(code + XAML): 23,439 → 23,011 lines.On a machine with a red system accent, the informational
InfoBaricon is red too; it follows the accent like everything since J1T.Test plan
scripts\test-all.ps1: Release build 0 warningsmain: test-all, UI tests 33/33 and the style check pass on the J5b branch, which contains this one🤖 Generated with Claude Code