[PowerDisplay] Add profile reordering - #50453
Draft
Yu Leng (moooyo) wants to merge 6 commits into
Draft
Conversation
added 4 commits
September 9, 2026 15:24
Load the Toolkit expander resources used by the profile template. Handle Alt+Shift+arrow keys before native ListView reordering and reuse the menu's persistence and focus handling. Add UI regressions for single-step moves, persisted order, navigation reload, focus, boundaries, and modifier keys. Preserve test settings and stop Power Display cooperatively during cleanup.
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 of the Pull Request
Allow users to reorder saved Power Display profiles without deleting and recreating them. Add drag-and-drop sorting and Move up/Move down menu actions, and persist the display position in a separate
orderfield while retaining stable integer profile IDs.PR Checklist
doc/devdocs/modules/powerdisplay/design.md.Detailed Description of the Pull Request / Additional comments
src/settings-ui/Settings.UI/SettingsXAML/Views/PowerDisplayPage.xamlandsrc/settings-ui/Settings.UI/ViewModels/PowerDisplayViewModel.cs, add a reorderable profile list with drag handles, bounded scrolling, and keyboard-accessible Move up/Move down actions. Elevated Settings retains menu-based sorting with native drag/drop disabled, following Mouse Without Borders.src/modules/powerdisplay/PowerDisplay.Models/, use a contiguous zero-basedorderfield independently of integeridand the physical JSON array. Editing preserves the saved position; new profiles use the existingnextIdcounter and append to the display order.1.0.Validation Steps Performed
vstest.console.exe: Lib 341, Contracts 15, IPC 139, CLI 118, and relevant Settings ViewModel tests 16; 629 passed, 0 failed, 0 skipped.nextId, order initialization, edit/append behavior, failed and concurrent writes, Light Switch references, elevated drag gating, CLI numeric-ID validation, and JSON/IPC round trips.git diff --checkand XAML/XML parsing passed.