Skip to content
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

chore: table column ellipsis #7196

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

deboer-tim
Copy link
Collaborator

What does this PR do?

Adds ellipsis to the standard table components when columns are too narrow: column headers, simple columns, and duration columns. For the header a div is added so that the sort indicators are always visible, and DurationColumn can simplify by just being a SimpleColumn.

This does not cover any custom columns, of which there are many to fix in future PRs.

Screenshot / video of UI

Before:

Screenshot 2024-05-13 at 3 55 20 PM

Used PR #7184 to make it easier to get this all in one image and screenshot is somewhat arbitrary, but note Environment header moving off to the left and Age header getting pushed to the right, months and MB cutoff.

After:

Screenshot 2024-05-13 at 3 54 42 PM

What issues does this PR fix or reference?

Fixes #7195.

How to test this PR?

Images view with #7184 used for image above, but there are SimpleColumns elsewhere. If you don't have any especially long content at the moment use ctrl-+ to make the font bigger.

  • Tests are covering the bug fix or the new feature

@deboer-tim deboer-tim requested review from benoitf and a team as code owners May 13, 2024 20:03
@deboer-tim deboer-tim requested review from cdrage and lstocchi and removed request for a team May 13, 2024 20:03
Copy link
Contributor

@lstocchi lstocchi left a comment

Choose a reason for hiding this comment

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

I wonder if we should show like a tooltip with full text in such cases so if i see a cut title/value, i just have to hover the cell. Atm there is no way to manually increase the size of a column so if i'm using a small screen and i cannot actually increase the full window i have no chance to read the cut value.

BTW the ellipsis works fine 👍

Adds ellipsis to the standard table components when columns are too
narrow: column headers, simple columns, and duration columns. For
the header a div is added so that the sort indicators are always
visible, and DurationColumn can simplify by just being a SimpleColumn.

This does not cover any custom columns, of which there are many.

Fixes containers#7195.

Signed-off-by: Tim deBoer <[email protected]>
@deboer-tim
Copy link
Collaborator Author

Rebased. @lstocchi good idea, but I will take it in follow-up PR b/c Tooltip is having issues with z-order when I tried it quickly.

@deboer-tim deboer-tim merged commit 74cf2cf into containers:main May 15, 2024
8 checks passed
@podman-desktop-bot podman-desktop-bot added this to the 1.11.0 milestone May 15, 2024
@deboer-tim deboer-tim deleted the table-header branch May 15, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tables: use ellipsis for narrow columns
4 participants