-
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] Add Virtualise List for Volume Table #2938
[UI] Add Virtualise List for Volume Table #2938
Conversation
Hello chengyanjin,My role is to assist you with the merge of this Status report is not available. |
Branches have divergedThis pull request's source branch To avoid any integration risks, please re-synchronize them using one of the
Note: If you choose to rebase, you may have to ask me to rebuild |
09fd05f
to
66f38c0
Compare
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: |
66f38c0
to
2ee989f
Compare
History mismatchMerge commit #d8a6d63191aa0fd356244edda4009768c8f5f684 on the integration branch It is likely due to a rebase of the branch Please use the |
328355a
to
9163f97
Compare
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, just you have to mouse over very precisely on the hyphen to see the tooltip, may be the zone could be enlarged a bit
Done! Thanks for the feedback! |
/approve |
History mismatchMerge commit #d8a6d63191aa0fd356244edda4009768c8f5f684 on the integration branch It is likely due to a rebase of the branch Please use the The following options are set: approve |
/reset |
Reset completeI have successfully deleted this pull request's integration branches. The following options are set: approve |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option
The following options are set: approve |
Build failedThe build for commit did not succeed in branch w/2.7/improvement/add-virtualise-list-for-tables. The following options are set: approve |
ee34d84
to
734b1a7
Compare
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 options are set: approve |
734b1a7
to
c1fa73b
Compare
Too many "Unknown" in the table seems extremly noisy and since the "Unknown" information is rather less important, we should replace it by an icon with tooltip. Refs: #2931
- Upgrade the react-table version to get support for react (v17.0.1) - Introduce react-window and react-virtualized-auto-sizer for the virtualize list Refs: #2931
For non-specified instance URL, such as `/volumes`, we should automatically choose the first one in the list. However, since we are not aware currectVolumeName in VolumePage component, we fall into update the URL which triger the VolumePage re-renders. Cause the infinite API calls. So I move this logic to VolumePageContent which solve the issue. Refs: #2931
Since <AutoSizer> is a <div/> so it breaks the table layout, we need to use <div/> for all the HTML tags in table (thead, tbody, tr, td...) and retrieve the defaullt styles by className. Refs: #2931
So that the users don't need to hover on the hypen precisely Refs: #2931
c1fa73b
to
8f871bc
Compare
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option
The following options are set: approve |
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 options are set: approve |
Remove the unused styled for HTML elements
ui/src/components/TableRow.js
Outdated
`; | ||
|
||
const TableRow = (props) => { | ||
const { row, style, rowClicked, volumeName, theme } = props; |
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 would rename rowClicked
props to onClick
to match standard event names
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 passing volumeName I would introduce an isSelected prop that reflect in a clearer way if the row is selected or not
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.
In order to avoid props drilling of the theme you can rely on styled component which automatically map the theme as part of the props or use useTheme
hook that retrieve current theme from styled-component internal context
ui/src/components/VolumeListTable.js
Outdated
@@ -151,6 +100,13 @@ const TooltipContent = styled.div` | |||
min-width: 60px; | |||
`; | |||
|
|||
const UnknownIcon = styled.i` |
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 component is duplicated in table row, please consider exporting it instead if it is necessary
ui/src/components/VolumeListTable.js
Outdated
({ index, style }) => { | ||
const row = rows[index]; | ||
prepareRow(row); | ||
// Extract the TableRow component outside of Table component |
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 comment can be deleted
ui/src/components/VolumeListTable.js
Outdated
{intl.translate('no_volume_found')} | ||
</td> | ||
</HeadRow> | ||
No Volume |
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.
A translation seems to be missing here, maybe {intl.translate('no_volume_found')}
Build failedThe build for commit did not succeed in branch improvement/add-virtualise-list-for-tables. The following options are set: 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 chengyanjin. |
Component: ui, tables
Context:
With the use case of thousands of volumes, the table would meet performance issues when rendering them at once.
So instead of doing this, we just render a small subset of rows at a give time.
Summary:
Introduce react-window and react-virtualized-auto-sizer to realize the virtualize row.
Adapt the interaction test
UI change:
Replace the "Unknown" text in the table with a hyphen icon to reduce the noise that less important information brings.
Acceptance criteria:
If we open the developer tool => Elements, we should see just a few of the
<tr/>
at the beginning, when we scroll down on the list, we can see the update of the list.Closes: #2931