Skip to content
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

Fixes #2836 adds sorting by repositories #2991

Merged
merged 2 commits into from
Oct 31, 2023
Merged

Conversation

aidoskanapyanov
Copy link
Contributor

Description

Adds an option to sort repositories in repositories view via name (asc/desc), last fetched (asc/desc), starred. Solves #2836

Demo

gitlens-sort-repos.mp4

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

Copy link
Member

@eamodio eamodio left a comment

Choose a reason for hiding this comment

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

Thanks for this! Looks great, though I'd rather have "starred" repos always affect the sorting (like we do with branches).

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/git/models/repository.ts Outdated Show resolved Hide resolved
@aidoskanapyanov
Copy link
Contributor Author

Hi @eamodio , thank you for the review! 👋
I addressed the comments in 8f022d4

aidoskanapyanov and others added 2 commits October 31, 2023 11:02
Ensures that "lastFetched" sort updates the views properly
Moves sorting settings to a new "Sorting" section
@eamodio eamodio merged commit d641c49 into gitkraken:main Oct 31, 2023
2 checks passed
@eamodio
Copy link
Member

eamodio commented Oct 31, 2023

Thank you so much for your contribution!

Thank you!

@eamodio eamodio added this to the 14.5 milestone Oct 31, 2023
@eamodio
Copy link
Member

eamodio commented Oct 31, 2023

FYI, I moved all the "sort" settings to a new "Sorting" section in the UI (ours and vscode's). And I added an option for the current behavior called "discovered" and made that the default to not change things for existing users. Also note that the lastFetched:* options have some performance overhead to enabling them since we have to do more work to keep that date up to date and have to refresh more of the views to re-sort.

@aidoskanapyanov
Copy link
Contributor Author

Thanks @eamodio!👋
It's always nice to learn new things :)

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.

2 participants