Skip to content

Add component for empty MiniTable #2811

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add component for empty MiniTable #2811

wants to merge 4 commits into from

Conversation

charliepark
Copy link
Contributor

@charliepark charliepark commented Apr 29, 2025

This adds an empty state for MiniTables. One hope is that this resolves (or at least mitigates) #2627.

Screenshot 2025-04-29 at 12 09 27 PM

The no-whitespace-diffs view is a bit easier to glance at: https://github.com/oxidecomputer/console/pull/2811/files?diff=split&w=1

Closes #2661

Copy link

vercel bot commented Apr 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Apr 29, 2025 7:18pm

@charliepark
Copy link
Contributor Author

Once we're happy with the approach, I'll roll it out to other MiniTable instances.

@benjaminleonard
Copy link
Contributor

I know @david-crespo likes components to be more declarative, but I wonder if the current mini table implementation leaves room for accidental differences to sneak in.

I say that here because we could pass items to the mini table and let it handle the empty state within the component automatically.

We're also going to have two versions with these webhook changes, one that is pretty much the same as it is now and one with integrated inputs. In this case would we keep the existing component and create a wrapper component that takes props directly instead?

@charliepark
Copy link
Contributor Author

I hear you on the concern about accidental differences, though I think the flexibility is also useful. For example, in the webhook subscriptions, we have this design:
Screenshot 2025-04-30 at 12 26 53 PM

The body copy there uses a different resource name (event subscription) than the title (subscription), and overall that block uses different copy than what's currently in this PR (No disks / Add a disk to see it here).

We could figure out unified copy for the empty table, but I think it might be good to leave it flexible at first and then see if there are dominant patterns we should reinforce with templated copy. As always, open to thoughts on that.

I'm not as familiar with the new dynamic webhooks patterns and what we'd pass to a wrapper component, but I suspect it'd be pretty straightforward.

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.

Minitable empty state
2 participants