github_pr_tree icon indicating copy to clipboard operation
github_pr_tree copied to clipboard

Sort order in tree structure does not match sort order in GitHub list

Open richellis opened this issue 4 years ago • 3 comments

GitHub displays files in a folder before files in a subfolder, the tree view shows the subfolders first. Example:

GitHub

Sources/Webservice/ProductFeedWebservice.swift
Sources/Webservice/Request/ProductFeedRequest.swift

Tree view

Sources/Webservice/Request/ProductFeedRequest.swift
Sources/Webservice/ProductFeedWebservice.swift

It's really confusing to me to be navigating the tree and having the GitHub display jump all around in a different order. If the current tree view sort order is an intentional feature (folders before files), consider an option to match the GitHub listing order?

richellis avatar Dec 02 '21 22:12 richellis

I'd accept a PR that:

  1. Adds the feature of displaying in the same GitHub file order
  2. The feature is optional and turned off by default (configured from the options page)

berzniz avatar Jan 07 '22 09:01 berzniz

I've filed https://github.com/berzniz/github_pr_tree/pull/201 for this - as it stands I didn't implement (2.) because it seemed straightforward to have the tree just always mirror the PR.

jgilchrist avatar Mar 08 '22 12:03 jgilchrist

This would make the plugin immensely less confusing. Is there any reason why it isn't the default that the two views have the same order?

joelpryde avatar Apr 08 '22 13:04 joelpryde