-
Notifications
You must be signed in to change notification settings - Fork 615
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
New virtualized table component #8829
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rawagner The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
7cdbf54
to
d7bc64a
Compare
This is great to see and looks like a much cleaner API. Thank you @rawagner 👍 I did want to mention we have a long standing bug with table performance tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1856355 and patternfly/react-virtualized-extension#8. @jcaianirh and @dtaylor113 have been looking at it. If we're going to be reworking our tables in console anyway, it might be a good time to try to tackle that, particularly if it requires changes that touch all pages. @jcaianirh mentioned that the PatternFly composable table might perform better, but I'm not sure if that works with virtualization or how big a change that is. It's possible the performance issue is just an upstream PatternFly bug, but I wanted to raise it. Ideally virtualization would just be a single boolean prop to enable or disable, but I'm not sure if that's possible since the PatternFly virtualized and non-virtualized tables have different APIs. |
I tried composable table (example with virtualized table is here ) but I didnt see any performance improvement on pods page :/ |
e5d76d2
to
cae0c76
Compare
56ff9f1
to
3cd3ef5
Compare
29f2299
to
7bcb701
Compare
@spadgett i've made some changes to cell cache and wrapped row rendering functions in useCallback and I think there's is a difference when scrolling but it still isnt fluid. |
284f2ff
to
568f301
Compare
Ok, I added one last change - The table how has 3 less properties and IMO its more transparent to see whats going on. |
6473919
to
e10dd52
Compare
/retest |
/retest |
Checked sorting, filtering, column management and responsive of the table on Pods and Machines list page, looks good |
/retest |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rawagner, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
This PR revamps table component. Depends on revamped list pages #8827 . See only last commit. Converts PodList and MachineList pages.
New table is virtualized only. Non-virtualized table should be a separate component to keep the amount of props to minimum IMO.
Changes in new table
sortFunc
).sort
prop also accepts string selector.Prevous header/sorting definition
new way - almost the same, but we are in control when sorting
memoize the colums (headers) and pass them to new
VirtualizedTable
Row
prop is evaluated as an actual React.FC not a function which returns a JSX.no morecustomData
prop drillingWrap your Row component into useCallback and pass whatever data you want.
as @TheRealJon mentioned in some of my other PR, doing this is antipattern so I reverted this change. You can still pass additional data to rows by
rowData
prop.rowData
is more descriptive name thancustomData
IMO.