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

Empty state tables should not show headings #20771

Open
garrett opened this issue Jul 17, 2024 · 8 comments
Open

Empty state tables should not show headings #20771

garrett opened this issue Jul 17, 2024 · 8 comments
Labels
followup Set when merging a PR on the condition that future work is done. Clear when work is complete. good-first-issue Appropriate for new contributors

Comments

@garrett
Copy link
Member

garrett commented Jul 17, 2024

Example in the accounts page:

image

Originally posted by @garrett in #20763 (comment)

I'm not sure if other parts of Cockpit have headings when tables have empty states. Many (most? all other?) other places to not.

@jelly jelly added the followup Set when merging a PR on the condition that future work is done. Clear when work is complete. label Jul 17, 2024
@martinpitt martinpitt added the good-first-issue Appropriate for new contributors label Jan 13, 2025
@Niketiiitd
Copy link

Could you please resend the image? I’m unable to open it.

@garrett
Copy link
Member Author

garrett commented Jan 29, 2025

That was posted in the summer of 2024; I work with a lot of graphics. I don't know which one it would be, if I even still have it locally. It seems like it was a screenshot, which could've even been pasted directly from capturing it, forgoing a save to disk (you can copy from Firefox screenshots and paste into GitHub).

I don't know why GitHub dropped the image from both here and in the PR. Sorry. It seems like they had a bug in storage somehow.

But the context is that empty state tables should never have headings.

Here's a screenshot of the accounts page, with a filter searching for "example" which doesn't match a user on my system, and the empty state has a heading... and it shouldn't. I would guess the missing screenshot probably looked like this:

Image

It should look something like this quickly modified version of the screenshot:

Image

@Mash707
Copy link

Mash707 commented Feb 9, 2025

Hi @garrett I would like to explore this issue. I think account-list.js is the right place to work on.
Do you have any other important information that could help with this issue?
Thank You.

@jelly
Copy link
Member

jelly commented Feb 10, 2025

This requires some more non-trivial work with larger implications, that page and other pages use a ListingTable with an emptyComponent set, which doesn't draw headers when there are no rows. Changing that would change everything which uses a ListingTable

@Mash707
Copy link

Mash707 commented Feb 10, 2025

Should I try to do a workaround for this or leave it for now?

@jelly
Copy link
Member

jelly commented Feb 11, 2025

@Mash707 I think we want to change this for all tables if I understood @garrett correctly.

@Mash707
Copy link

Mash707 commented Feb 11, 2025

@jelly I'll try to make some changes locally to test things out and see what happens. I'll let you know once I have some updates

@garrett
Copy link
Member Author

garrett commented Feb 18, 2025

I think we want to change this for all tables if I understood garrett correctly.

Yes, it should generally be like this for all tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
followup Set when merging a PR on the condition that future work is done. Clear when work is complete. good-first-issue Appropriate for new contributors
Projects
None yet
Development

No branches or pull requests

5 participants