Skip to content

frontend: Table: Hide columns to fit width#6468

Open
skoeva wants to merge 1 commit into
kubernetes-sigs:mainfrom
skoeva:table-fix
Open

frontend: Table: Hide columns to fit width#6468
skoeva wants to merge 1 commit into
kubernetes-sigs:mainfrom
skoeva:table-fix

Conversation

@skoeva

@skoeva skoeva commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Headlamp rendered every table column regardless of viewport width, so on narrow windows and high zoom levels flexible columns were crushed toward zero or pushed behind a horizontal scrollbar, cutting off data. This hides columns that no longer fit, dropping the least useful ones first.

Fixes: #1232

Changes

  • Measure the table's available width with a ResizeObserver and hide columns that don't fit, instead of crushing them or relying on a horizontal scrollbar
  • Add a responsivePriority column prop - columns are dropped by ascending priority, then right-to-left among equal priority, and the first column is always kept
  • Assign priorities to the shared resource columns so Namespace/Labels drop before Cluster/Kind, and Age/Name are kept longest
  • Columns without a priority default to 0, so other tables keep previous right-to-left behavior unchanged
  • Hidden columns remain reachable via the existing column-visibility menu

Testing

  • make frontend-test passes
  • make frontend-lint passes
  • Resize/zoom a resource list and confirm columns drop by priority and come back when widened

Screenshots

image

@skoeva skoeva self-assigned this Jul 10, 2026
@skoeva skoeva added frontend Issues related to the frontend Table Table component issues needs review labels Jul 10, 2026
@skoeva skoeva requested a review from Copilot July 10, 2026 20:22
@kubernetes-prow kubernetes-prow Bot requested review from vyncent-t and yolossn July 10, 2026 20:22
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: skoeva
Once this PR has been reviewed and has the lgtm label, please assign yolossn for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@kubernetes-prow kubernetes-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. frontend Issues related to the frontend needs review size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. Table Table component issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile, service accounts cut off column

2 participants