-
Notifications
You must be signed in to change notification settings - Fork 267
Add sorting by Status or Path to Local Changes / Stashes / History | Changes display modes dropdown #1613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...modified again in unstaged view
@Copilot
Copilot
AI
left a comment
There was a problem hiding this 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 adds sorting functionality to change lists across the Git client, allowing users to sort changes by either file path (existing default) or by status (new feature). The sorting mode is persisted per context (unstaged, staged, stash, history) and includes comprehensive localization support.
- Introduces
ChangeSortMode
enum with Path and Status options - Implements status-based sorting with prioritized grouping (conflicts first, then modified files, etc.)
- Adds UI controls to the change view mode switcher dropdown with checkmark indicators
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/Models/Change.cs | Defines the new ChangeSortMode enum |
src/ViewModels/Preferences.cs | Adds sort mode preference properties for each context |
src/Views/ChangeViewModeSwitcher.axaml* | Updates UI with sort mode dropdown options and event handlers |
src/Views/ChangeCollectionView.axaml.cs | Implements core sorting logic for both list/grid and tree views |
src/ViewModels/ChangeTreeNode.cs | Adds status-based sorting support for tree view mode |
src/Views/*.axaml | Binds SortMode property across all change collection views |
src/Resources/Locales/*.axaml | Adds localized strings for sort mode options in all supported languages |
As mentioned in above comments I have refactored the duplicated GetStatusSortPriority logic into a static method in Models.Change as suggested. All usages now reference the shared method. Build works fine :)
072502a
to
5ce919a
Compare
f325aaf
to
6511d15
Compare
I have recently discovered this brilliant git client, and I was missing Sort by Status feature in all the changes view.
I have created sorting mode dropdown functionality to the changes view, allowing users to sort changes by either file path (default, previous only option) or by status (modified, renamed, added, deleted, untracked, conflicted, etc.) via the ChangeDisplayMode button.
Key features:
Sorting by Status in my is increasing changes readability a lot, I would even vote for making it default view.
Screenshot 20250724-014940