Skip to content

Change Tree bar widget to Dropdown#1171

Merged
dalyIsaac merged 4 commits intodalyIsaac:mainfrom
dsschnau:issue/323
Oct 28, 2025
Merged

Change Tree bar widget to Dropdown#1171
dalyIsaac merged 4 commits intodalyIsaac:mainfrom
dsschnau:issue/323

Conversation

@dsschnau
Copy link
Copy Markdown
Contributor

@dsschnau dsschnau commented Oct 15, 2025

Change the 'Direction' button in the bar to a dropdown

  • This code is up-to-date with the main branch.
  • I have updated relevant (if any) areas in the docs.

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.

@dalyIsaac dalyIsaac requested a review from Copilot October 25, 2025 07:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AddNodeDirection from a read-only property to a two-way bindable property
  • Removed ToggleDirectionCommand class 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.

@dalyIsaac
Copy link
Copy Markdown
Owner

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).

dalyIsaac
dalyIsaac previously approved these changes Oct 25, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 25, 2025

Codecov Report

❌ Patch coverage is 53.33333% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.09%. Comparing base (8beb6eb) to head (0e71463).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
....TreeLayout.Bar/TreeLayoutEngineWidgetViewModel.cs 53.33% 7 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@dsschnau
Copy link
Copy Markdown
Contributor Author

dsschnau commented Oct 27, 2025

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).

Thanks! I did run csharpier, but it doesn't generate any new changes. I certainly could be missing something, but it looks to me that the formatting is correct. Here's a little screenshot to show what I mean:

Nevermind, I see now I needed to update from mainline in order to get the updated formatter.

@dalyIsaac dalyIsaac merged commit 1a854c8 into dalyIsaac:main Oct 28, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change tree bar widget to be a dropdown

4 participants