Resolve Ambiguity for ties in Sort by Groups
Related to #2331
Several sorting options face the issue where there is no defined order if the sort values have a tie, for example, when grouped by repo, sort the groups by author displayName (there is a possible case where an author contributed to multiple repos, and is the lexicographically largest display name among contributors of both repos.
I would propose to resolve this ambiguity in a PR, where each grouping option (by author or repo) can only sort by a fixed set of fields (for example, sort by default order might not make sense for group by author, and sort by author displayName might not make sense for group by repo). Then for sort fields that might have the same value (for example, totalCommits might be the same for several authors/repos), maybe define a default way to break ties by unique fields (for example, the default ordering of repos, or lexicogaphical order of author GitId.
hi i would like to work on this issue! ill review the code further and see how i can come up with a way to sort the values & break ties!
hi just like what u mentioned, is it ok if i make the following changes:
- For group by author: Remove “sort by default order” (since it’s not meaningful).
- For group by repo: No “sort by author displayName” option exists, so no change needed.
- For group by author: Break ties by author name, github id.
- For group by repo: Break ties by repo name.
- For group by none:Break ties by repo name + author name.
please let me know if this approach is acceptable, and if it is ok to remove just one filter for the author grouping as other groupings will still have all 4 filters (group title, contribution, variance, default).
pic for ref: