Skip to content

Conversation

vojtechszocs
Copy link
Contributor

@vojtechszocs vojtechszocs commented Aug 7, 2025

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 7, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 7, 2025

@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:

Summary

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.

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.

@openshift-ci openshift-ci bot requested review from cajieh and TheRealJon August 7, 2025 14:02
@openshift-ci openshift-ci bot added the component/core Related to console core functionality label Aug 7, 2025
Copy link
Contributor

openshift-ci bot commented Aug 7, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 7, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 11, 2025

@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:

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.

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.

@vojtechszocs
Copy link
Contributor Author

/retest

Copy link
Contributor

openshift-ci bot commented Aug 11, 2025

@vojtechszocs: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn a652a44 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-gcp-console a652a44 link true /test e2e-gcp-console

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';
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

@rhamilto rhamilto left a 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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} as ThProps,
hasRightBorder: props?.hasRightBorder,
hasLeftBorder: props?.hasLeftBorder,
stickyMinWidth: props?.stickyMinWidth,
isActionCell: props?.isActionCell,
} as ThProps,

sortFunction: sort,
props: {
className: props.classes,
sort: {
Copy link
Member

@rhamilto rhamilto Aug 28, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants