-
Notifications
You must be signed in to change notification settings - Fork 665
feat(virtual-table): split virtualized table, cluster settings table #2014
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
Conversation
f1001e1 to
36f8c30
Compare
|
updated... @spadgett PTAL |
frontend/packages/kubevirt-plugin/src/components/vm-disks/vm-disks.tsx
Outdated
Show resolved
Hide resolved
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.
Again this is probably OK, although this table wasn't virtualized before.
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 table was also not virtualized previously, but probably OK.
cc @jtomasek
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.
@dtaylor113 Let me know if you think this might be a problem as this table wasn't virtualized before
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 is a standard list view so probably ok.
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.
Are these table columns all equal width? How does that look? Is there a way to specify different widths?
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 should currently match the default pf4 table behavior (w/ any CSS overrides we have for pf-c-table). I am not explicitly overriding column widths for Table at the moment though, so the default pf4 responsive behavior would apply.
https://pf4.patternfly.org/components/Table/examples/
https://pf4.patternfly.org/components/Table/examples-full/?component=Simple%20table
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 should currently match the default pf4 table behavior (w/ any CSS overrides we have for
pf-c-table).
So equal width columns? We might look at this since many of our tables have columns with data significantly wider than other columns. Nodes page comes to mind (image name and size).
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.
Please see the "Table w/ width modifiers" example:
https://pf4.patternfly.org/components/Table/examples/
.pf-m-width-[10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, or 90], that is the default functionality for PF4 table width modifiers at the moment.
The existing Bootstrap column width modifiers you have should also work similarly to PF's .pf-u-w-25{-on-[breakpoint]} modifiers, however I don't think you'd want to use mobile modifiers now that we are stacking here and using the default PF4 mobile behavior.
https://pf4.patternfly.org/utilities/Sizing/examples/ (we did not load these since they do the same thing as Bootstrap though)
We should probably file anything upstream in PF if we determine something else is needed on this.
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.
so we could pass:
{ title: <CamelCaseWrap value={condition.type} />, props: { className: 'pf-m-width-50` },
or
{ title: <CamelCaseWrap value={condition.type} />, props: { className: 'col-md-6` },
for example...
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.
We're adding a fair amount of duplicate code here to make this change :/
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.
hmm, yea i see this both ways. The value being, we aren't overabstracting and the API should be easier to follow and consume (and test).
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.
Not sure if Redux state should be shared now...
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.
FWIW, we are prepping to convert React-Table to Typescript next in PF #1950. Making some good progress w/ this locally... this should make API typings more consistent from the PF side. Will be sure to test this out here downstream before anything goes up...
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.
@priley86 If the stateToProps should be identical between these two tables, we can share the implementation as a common tableStateToProps function?
My only hesitation with this change is that we're copying this complicated chunk of code between the two tables.
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.
Ah I guess it doesn't work because it uses the props from the component. Hm
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.
extracted this logic to a common tableStateToProps function
frontend/public/components/operator-lifecycle-manager/install-plan.tsx
Outdated
Show resolved
Hide resolved
|
/assign |
36f8c30 to
55da779
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: priley86 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
55da779 to
b94ceaa
Compare
b94ceaa to
e3c1575
Compare
|
|
/test e2e-aws |
|
@priley86: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@spadgett - let me know when you'd like this rebased again. thanks! |
|
@priley86: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
start detail table conversion in #1986 for all detail tables in Cluster Settings.
virtualizedeverywhere in the currentTableabstraction just seems wrong. This was never my original intent... had previously called the rowsVrandVd(virtual row), but I still think this component should be split out into two components.Table:
https://patternfly-react.surge.sh/patternfly-4/components/table/
Virtual Table:
https://patternfly-react.surge.sh/patternfly-4/virtual%20scroll/virtualized/
cc: @TheRealJon @jcaianirh @spadgett
also, filed 2045 upstream in pf-next today. Currently, the CSS is here in overrides for this.Fixed by rescoping the following styles tovirtualizedtables only:Codepen: https://codepen.io/priley86-the-sans/pen/JQgNrW