CONSOLE-5040: Detangle TableColumn and ConsoleDataViewColumn - #16984
Conversation
Changed all usage of `TableColumn` (virtualized table type) in the context of DataView to the correct type Simply inline the bodge into `ConsoleDataViewColumn` instead because `useConsoleDataViewData` handles the transformation from the custom type to `DataViewTh` sortFunction appeared to have been set as internal state of dataViewColumns, while actual consumers would use `sort`. This caused some issues as when tightening up the types, `sort` was not accepted as a valid property. Had to append `as const` to props.modifier of the columns so that TypeScript would narrow it down to `'nowrap'` instead of `string`.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@logonoff: This pull request references CONSOLE-5040 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 "5.0.0" version, but no target version was set. DetailsIn 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (50)
💤 Files with no reviewable changes (2)
WalkthroughThe PR migrates table column definitions from ChangesConsoleDataView column migration
Estimated code review effort: 3 (Moderate) | ~25 minutes Mergeability Score: ⚪ Minimal · up to This PR updates DataView column typing and sorting-related usage without any identified merge-blocking correctness or production risk; it is merge-ready after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| title: string; | ||
| sortFunction?: string | ((filteredData: TData[], sortDirection: SortByDirection) => TData[]); | ||
| sort?: string | ((filteredData: TData[], sortDirection: SortByDirection) => TData[]); | ||
| additional?: boolean; |
There was a problem hiding this comment.
Prop from TableColumn that appears to be in active use
| id: string; | ||
| title: string; | ||
| sortFunction?: string | ((filteredData: TData[], sortDirection: SortByDirection) => TData[]); | ||
| sort?: string | ((filteredData: TData[], sortDirection: SortByDirection) => TData[]); |
There was a problem hiding this comment.
Actual usage in tables use sort and not sortFunction
|
/label plugin-api-approved changes are to internal-api only and the removal of property |
|
/label px-approved |
QA Verification Evidence
Verification Steps
Warning This verification was performed by an AI agent. Results may contain false positives or miss Automated QA verification by Claude Code |
|
/verified by claude |
|
@logonoff: This PR has been marked as verified by DetailsIn 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. |
|
/pipeline required |
|
Scheduling tests matching the |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: logonoff, TheRealJon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test backend frontend images okd-scos-images analyze |
|
/test e2e-gcp-console |
|
@logonoff: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |


















Analysis / Root cause:
TableColumnrefers to virtualized table and not DataView, so the types were tangled up I thinkSolution description:
Changed all usage of
TableColumn(virtualized table type) in the context of DataView to the correct typeSimply inline the bodge into
ConsoleDataViewColumninstead becauseuseConsoleDataViewDatahandles the transformation from the custom type toDataViewThsortFunction appeared to have been set as internal state of dataViewColumns, while actual consumers would use
sort. This caused some issues as when tightening up the types,sortwas not accepted as a valid property.Had to append
as constto props.modifier of the columns so that TypeScript would narrow it down to'nowrap'instead ofstring.Test cases:
Summary by CodeRabbit