-
Notifications
You must be signed in to change notification settings - Fork 657
CONSOLE-4667: Add ResourceDataView component and related code #15375
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
base: main
Are you sure you want to change the base?
Conversation
@vojtechszocs: This pull request references CONSOLE-4667 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vojtechszocs 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 |
a07ff6e
to
a652a44
Compare
@vojtechszocs: This pull request references CONSOLE-4667 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
/retest |
@vojtechszocs: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
import * as React from 'react'; | ||
import { useDataViewFilters } from '@patternfly/react-data-view'; | ||
import { useSearchParams } from 'react-router-dom-v5-compat'; | ||
import { useExactSearch } from '@console/app/src/components/user-preferences/search/useExactSearch'; |
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've begun investigation in to applying Data view to CronTabList.
It occurs to me we don't currently expose useExactSearch
in the SDK, but will need to in order to create a comparable filter hook there. Or we need to expose this hook itself.
And we probably don't want users to have to duplicate DataViewLabelFilter.tsx
.
And so on. I think we probably need to reconsider the decision to not expose these additions in the SDK. Otherwise there is going to be a lot of duplication since these hooks and components contain essential configuration options for Data view.
@spadgett, @jhadvig, @vojtechszocs, WDYT?
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.
Digging deeper, I think we would just need to expose ResourceDataView
.
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 few observations from when I applied this code in openshift/console-crontab-plugin#45
}, | ||
}, | ||
isStickyColumn: props.isStickyColumn, | ||
} as ThProps, |
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.
} as ThProps, | |
hasRightBorder: props?.hasRightBorder, | |
hasLeftBorder: props?.hasLeftBorder, | |
stickyMinWidth: props?.stickyMinWidth, | |
isActionCell: props?.isActionCell, | |
} as ThProps, |
sortFunction: sort, | ||
props: { | ||
className: props.classes, | ||
sort: { |
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 results in the actions column getting sorting functionality, which is not desired. Sorting should be optional on a per column basis.
This PR follows up on #14897 and #15057 by introducing reusable
ResourceDataView
component and related code.Existing resource list tables are not modified; there will be follow up PRs to put this component into use.