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
Redesigning the sorting toolbar #618
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me,
Just wondering, is there a way where the option model can directly set the isSortingDesc
etc?
Codecov Report
@@ Coverage Diff @@
## master #618 +/- ##
============================================
+ Coverage 79.44% 80.89% +1.44%
+ Complexity 553 545 -8
============================================
Files 71 68 -3
Lines 1868 1795 -73
Branches 199 190 -9
============================================
- Hits 1484 1452 -32
+ Misses 287 249 -38
+ Partials 97 94 -3
Continue to review full report at Codecov.
|
frontend/src/static/js/v_summary.js
Outdated
} | ||
}, | ||
getOptionWithOrder() { | ||
[this.sortingOption, this.isSortingDsc] = this.sortGroupSelection.split(' '); | ||
this.isSortingDsc = this.isSortingDsc === 'dsc'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't seems very nice to reassign the variable to become boolean.
Would something like this work?
name
and name dsc
if just name
, the this.isSortingDsc
will automatically be null,
hence can just use if (this.isSortingDsc)
to do the logic check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that will be much simpler.
…epoSense into toolbar-sorting-601
option(value="totalCommits", v-if="filterGroupSelection === 'groupByNone'") ↑ contribution | ||
option(value="totalCommits dsc", v-if="filterGroupSelection === 'groupByNone'") ↓ contribution | ||
option(value="variance", v-if="filterGroupSelection === 'groupByNone'") ↑ variance | ||
option(value="variance dsc", v-if="filterGroupSelection === 'groupByNone'") ↓ variance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noticed this.
It seems that variance and totalCommits are only enabled when authors wasn't grouped.
Was this the supposed functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally intended to continue off from #486, but I can implement it here as well. Is sorting by variance is taken at average?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nits
@eugenepeh can this be merged soon, to continue with #486? |
Nits to the proposed message:
Note that you should mention the problems more precisely. |
Unused code was found in v_summary.js; specifically code associated with the variable, filterSortReverse. They are remnants left behind by the improvement of sort controls introduced in #618. The unused code was originally bind to the reverse checkbox in the older version of RepoSense. As the checkbox was replaced by the introduction of ascending and descending options in #618, the code is now unused and redundant. This is also partially due to the complexity brought upon by new sorting group, the reversing has to be done within the code of descending's logic, rendering those code not reusable. Let's remove the unused code associated to the variable, filterSortReverse and it's implementations.
Fixes #601
Contribution and variance is not allowed for sorting by repos/author, because additional methods are required to add up the total contribution/variance for each group. Perhaps this can be continued from #486?
Note:
Name
sorting is performed onusernames
, notdisplay names
.