Skip to content

Conversation

@charliepark
Copy link
Contributor

This adds in a fix for #1662, where we aren't showing the size of the attached disks in the disks minitable.

As this isn't necessary for the data-minitable branch, I'm happy to wait until that branch is merged and I can merge this to main, but if you want to include it in the branch, it's available.

Screenshot 2025-06-29 at 9 11 24 AM

Closes #1662.

@vercel
Copy link

vercel bot commented Jun 29, 2025

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

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Jun 30, 2025 3:49pm

onChange([
...items,
{ name, type: 'attach', size: allDisks.find((d) => d.name === name)?.size },
])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately onChange has type (...event: any[]) => void, which masks a kind of type error here: size has type number on DiskTableItem, but here it is number | undefined. You can see this by adding satisfies DiskTableItem, which is annoying but the best way I can think of to deal with this.

image

Rather than pulling the size here from the name, it can be done inside AttachDiskModalForm because you know that you have the disk on hand there, otherwise it would not show up in the combobox. I made the change already in order to test it out, so I'll just push that.

@david-crespo david-crespo merged commit 4154e76 into data-minitable Jun 30, 2025
7 checks passed
@david-crespo david-crespo deleted the attach-disk-size branch June 30, 2025 16:01
david-crespo added a commit that referenced this pull request Jun 30, 2025
* Add data minitable component

* Remove unnecessary var

* Fix test

* `rowLabel` and `onRemoveItem` not optional

* rename render to cell like react table

* remove rowLabel prop, not needed

* last few tweaks

* convert firewall rules minitable

* convert the rest of the minitables (opencode)

* rename DataMiniTable to MiniTable

* let MiniTable hide itself

* Show size of attached disks in mini table (#2842)

* Show size of attached disks in mini table

* update test

* get disk size more directly

---------

Co-authored-by: David Crespo <david.crespo@oxidecomputer.com>

---------

Co-authored-by: David Crespo <david.crespo@oxidecomputer.com>
Co-authored-by: Charlie Park <charlie@oxidecomputer.com>
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.

3 participants