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

Use Github's sort order #201

Closed
wants to merge 1 commit into from

Conversation

jgilchrist
Copy link

@jgilchrist jgilchrist commented Mar 8, 2022

The existing sorting method uses a couple of heuristics to sort -
however, there are cases where the resulting sorting does not match
the order in which Github displays the files.

As a result, scrolling down the list can cause the selected file in the
tree to jump around rather than going down one-by-one.

This commit removes most of the sorting logic and instead uses the index
of the name of the file on the page, guaranteeing the tree matches
Github even if they change their ordering logic.

Fixes #187

The existing sorting method uses a couple of heuristics to sort -
however, there are cases where the resulting sorting does not match
the order in which Github displays the files.

As a result, scrolling down the list can cause the selected file in the
tree to jump around rather than going down one-by-one.

This commit removes most of the sorting logic and instead uses the index
of the name of the file on the page, guaranteeing the tree matches
Github even if they change their ordering logic.
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.

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