vscode-github-actions icon indicating copy to clipboard operation
vscode-github-actions copied to clipboard

Tree views in current branch/workflows/settings is sorted by repo name length

Open krokofant opened this issue 1 year ago • 1 comments

Describe the bug This is an unexpected behavior. The order of the items in the tree views are sorted by the length of the repository name. This is an unreasonable sorting strategy! 😅

To Reproduce Steps to reproduce the behavior:

  1. Login
  2. Look at the workflows

Expected behavior I expect the workflows to be sorted by some reasonable means like a) alphabetically or b) order appearing the workspace. The easiest would be just alphabetically. Finding the correct repository workflow now is hard. I need to think about how long the name of the repository is 🤯

Screenshots If applicable, add screenshots to help explain your problem. image

Extension Version v0.26.2

krokofant avatar Nov 01 '23 15:11 krokofant

Solution suggestion. We can sort the repos once here in the context: https://github.com/github/vscode-github-actions/blob/02a4f12047a38409abce525e45650235499db371/src/git/repository.ts#L189C5-L214C8

repos.sort((a, b) => a.name.localeCompare(b.name));

Or we can sort the repos in each treeview:

  1. Workflows
  2. CurrentBranch
  3. Settings

krokofant avatar Nov 01 '23 16:11 krokofant