Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
kreys wants to merge 4 commits into sourcegit-scm:develop
base: develop
Choose a base branch
Loading
from kreys:feature/display_modes

Conversation

Copy link

@kreys kreys commented Jul 23, 2025

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:

  • New sorting options in the ChangeDisplayMode menu: "Sort by Path" and "Sort by Status", with proper Checkmark icon indicating which one is selected
  • Status-based sorting groups changes by type, with logical priority (e.g., conflicts and modified files first)
  • Sorting mode is persisted per context (unstaged, staged, stash, history commit changes)
  • UI and localization updated for all supported languages

Sorting by Status in my is increasing changes readability a lot, I would even vote for making it default view.

Screenshot 20250724-014940

@Copilot Copilot AI review requested due to automatic review settings July 23, 2025 23:53
Copy link

@Copilot 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 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

Copy link
Author

kreys commented Jul 25, 2025

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

@love-linger love-linger force-pushed the develop branch 3 times, most recently from 072502a to 5ce919a Compare July 28, 2025 13:30
@love-linger love-linger force-pushed the develop branch 5 times, most recently from f325aaf to 6511d15 Compare August 19, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

Copilot code review Copilot Copilot left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /