Change Tree bar widget to Dropdown#1171
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the cycling 'Direction' button in the Tree Layout widget with a dropdown menu for selecting the window opening direction. This provides a more intuitive interface by allowing direct selection of any direction rather than requiring users to cycle through options sequentially.
Key Changes:
- Replaced button-based direction cycling with a dropdown control
- Converted
AddNodeDirectionfrom a read-only property to a two-way bindable property - Removed
ToggleDirectionCommandclass and associated toggle logic
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Whim/Resources/Defaults.xaml | Updated style resource to support DropDownButton instead of Button |
| src/Whim.TreeLayout.Bar/TreeLayoutEngineWidgetViewModel.cs | Made AddNodeDirection a settable property, added Directions collection, removed toggle command and method |
| src/Whim.TreeLayout.Bar/TreeLayoutEngineWidget.xaml | Replaced Button with bar:DropDown control using two-way binding |
| src/Whim.TreeLayout.Bar/ToggleDirectionCommand.cs | Deleted file - command no longer needed |
| src/Whim.TreeLayout.Bar.Tests/TreeLayoutEngineWidgetViewModelTests.cs | Removed tests for toggle functionality and command |
| src/Whim.TreeLayout.Bar.Tests/ToggleDirectionCommandTests.cs | Deleted file - command no longer exists |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I've had a look through this and it all looks good to me, thanks for the change. It just needs to be reformatted - (I switched the default for XAML to csharpier). |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1171 +/- ##
==========================================
- Coverage 80.17% 80.09% -0.08%
==========================================
Files 279 278 -1
Lines 12733 12718 -15
Branches 1470 1469 -1
==========================================
- Hits 10209 10187 -22
- Misses 2354 2361 +7
Partials 170 170 ☔ View full report in Codecov by Sentry. |
Nevermind, I see now I needed to update from mainline in order to get the updated formatter. |
Change the 'Direction' button in the bar to a dropdown
mainbranch.This PR fixes #323.
Change the 'Direction' button in the bar to a dropdown picking the direction in which to open windows rather than a button that cycles through directions.