-
Notifications
You must be signed in to change notification settings - Fork 45
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
[UI] Nodes sorting #2926
[UI] Nodes sorting #2926
Conversation
Wait until alerts and PVClist are retrieved before auto-selecting first volume based on health. Refs: #2920
Remove default sorting from query string on volumes list Refs: #2920
Use a flag on the whole volumes instead of on each item to determine when alerts have been mapped Refs: #2920
Extract Sorting styled components to re-use those in Nodes table Refs: #2919
Move the URL Sync logic for both Volumes and Nodes tables to its custom hook function to avoid a big block of code redundancy. Refs: #2919
Add missing history dependency in useEffect in Sort URL Sync custom hook Refs: #2919
Hello alexis-ld,My role is to assist you with the merge of this Status report is not available. |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option
|
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
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.
works well for me ...
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.
Smart move of useTableSortURLSync
hook! Bravo! I suggest we add a unit test for this.
BTW, since by default we sort the node list by health. Shouldn't we auto-select the first node base on the health?
Thanks!
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
The following reviewers are expecting changes from the author, or must review again: |
Version >= 16.9 needed in order to use the custom hook testing library Refs: #2919
Add react-hooks-testing-library to render hooks within a test component Test useTableSortURLSync to check if URL params are handled properly Refs: #2919
@ChengYanJin I added tests for the custom hook as well as the Node auto-select |
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.
LGTM!
Thanks for introducing the hook test library and bump React to the latest version ;)
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
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.
works as expected
/approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue None. Goodbye alexis-ld. |
Component:
ui, nodes
Context:
We want to be able to sort the Nodes table like the Volumes table.
Summary:
I used the same sorting logic (leveraging react-table's sorting abilities).
I extracted the URL sync code to its custom hook and the Table sorting components to the Common layout file to avoid code redundancy between the two views.
Update:
Acceptance criteria:
Clicking on a column header on the Nodes table sorts the data according to what is specified in #2919 .
Loading the page with a sorting specified in the URL sorts the data accordingly.
Closes: #2919