github / vscode-github-actions

GitHub Actions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions
MIT License
476 stars 72 forks source link

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

Open krokofant opened 9 months ago

krokofant commented 9 months ago

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 commented 9 months ago

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