-
Notifications
You must be signed in to change notification settings - Fork 20
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
Sort Order Improvements for the Agents table #448
base: main
Are you sure you want to change the base?
Conversation
Excited for this, would you mind including a screenshot(s) in this review so can quickly review UI changes? Thanks |
Attached new images |
I'll be annoying and request for a small tweak compared to the acceptance criteria I'd written earlier, now that I see it in action: I would always start with the failures, and have ascending and descending rather secondarily sort by the numerical value in those groups. It's useful to have a way to highlight the low numbers quickly. So, ascending:
... and descending
(with descending the one offered first when you click) |
<th aria-sort="none">Name</th> | ||
<th aria-sort="none">State</th> | ||
<th aria-sort="none">Updated At</th> | ||
<th aria-sort="none" class="has-overflow" style="width: 80pt" use-outcome-sort id="agentsOutcomeHeader"> |
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.
Hey, great work, I have one comment in regards to the icons. You should add the p-table__cell--icon-placeholder
on the th
and td
elements that have icons; this will make the icon display outside the column
See https://vanillaframework.io/docs/base/tables#icons
<th aria-sort="none" class="has-overflow" style="width: 80pt" use-outcome-sort id="agentsOutcomeHeader"> | |
<th aria-sort="none" class="p-table__cell--icon-placeholder has-overflow" style="width: 80pt" use-outcome-sort id="agentsOutcomeHeader"> |
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 td
element seems to be at line 38. I'm not sure how the icon placeholder behavior and the span and tooltip you have will interact with each other.
<td class="has-overflow"> |
Description
Adds some improvements to the agents table - namely the provisioning streak column. This PR makes the sorting functionality of the table work with this column, first separating by failures/success, then sorting by the streak number. In addition, url parameters were added to persist sorting information on refresh for the agents table. Finally, this column was given the name
"Outcome",
and a tooltip was added describing this column.To support this, new functions were added to filter.js - ordering functions were created to differentiate default ordering with provision streak ordering. Also, a new function to get URL parameters and use them to sort the table was also created. Finally, the sortTable function was split into two functions - sortTable and cycleTableSort. sortTable now just sorts a table given an ordering("ascending", "descending", "none"), while cycleTableSort cycles through the ordering states and uses sortTable to apply that ordering.
Resolved issues
Resolves https://warthogs.atlassian.net/browse/CERTTF-396
Documentation
Each new function was given documentation and comments.
Web service API changes
N/A
Tests
N/A
Pictures
No sort applied - note the url
Ascending Sort
Descending Sort
New Tooltip for Column