-
Notifications
You must be signed in to change notification settings - Fork 0
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
GT-1646 Provide several filters for the overall list of tools #702
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #702 +/- ##
==========================================
+ Coverage 65.89% 66.32% +0.42%
==========================================
Files 59 59
Lines 1434 1482 +48
Branches 103 115 +12
==========================================
+ Hits 945 983 +38
- Misses 475 481 +6
- Partials 14 18 +4 ☔ View full report in Codecov by Sentry. |
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.
I'm going to let someone with more familiarity test the functionality, I only reviewed the code itself.
|
||
this.resources = this.filters | ||
? resources.filter((r) => { | ||
let visible = true; |
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.
Instead of using a visible
variable, I would replace each visible = false
with return false
and then return true
at the bottom.
0, | ||
); | ||
|
||
this.resources = this.filters |
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.
This logic is kind of complex, so it would be a good candidate for adding tests for. Or at least moving the filtering logic into a helper function and adding tests for the helper.
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.
Second this. Make it easier when writing tests
0, | ||
); | ||
|
||
this.resources = this.filters |
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.
Second this. Make it easier when writing tests
Merge conflict attempting to merge this into staging. Please fix manually. |
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.
> | ||
Default Order | ||
Tool Order |
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.
Have you been asked to change this name from the God Tools team? If not, I would set it back to what it was.
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.
I wasn't asked but I think it makes it more clear, like you mentioned in your earlier comment. I will ask them what they prefer.
Merge conflict attempting to merge this into staging. Please fix manually. |
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.
The code looks good. This can be moved to QA
Description
https://jira.cru.org/browse/GT-1646
Currently we show all tools and lessons when loading the admin tool. We should add a few filters at the top of the list that would allow us to filter by tool type, system, and hidden tools.
It would also be nice to have an option to sort the list of tools by the default order or alphabetically.
Changes I made