Repository navigation
Set table cells to have shorter default height - #2158
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This |
|
I think the problem with letting the table rows decide their own height based on the content is that you might not get the same height for all the rows. In practice maybe that's a small concern because we decide what all the cells are, and we would decide how tall they are. But it feels a little risky. |
|
We could put a ETA: I guess what I was getting at was that we can control the default of the rows, but if something breaks out of that minimum for some reason (say, content that wraps lines on a mobile screen or something), I'm okay with us not forcing every row in the table to have the same height, as long as every cell in each row has the same height. |
|
Well, on second thought that’s pretty silly since you can’t even have IPv6 ranges right now. I’ll take a look at tweaking that to fit on one line. Even if it’s mediocre, the fact is no one will ever see it. |
|
Talked to @benjaminleonard and we decided to do nothing with the IP pool cells since the two line cell will never show up in production and it's not total shit (my words, not his). |
david-crespo
left a comment
There was a problem hiding this comment.
Firewall rules is non-ideal, but because we're leaving it tall, it's not any worse than it currently is, so that's fine. I'm testing out using ListPlusCell for the filters, that can be a followup.
oxidecomputer/console@2ba444c...6334f0d * [6334f0db](oxidecomputer/console@6334f0db) bump omicron to latest main (no changes) * [46dbd9c8](oxidecomputer/console@46dbd9c8) oxidecomputer/console#2158 * [e94929ab](oxidecomputer/console@e94929ab) try 300ms minTime on RefreshButton SpinnerLoader * [b6da4154](oxidecomputer/console@b6da4154) oxidecomputer/console#2161 * [788389a8](oxidecomputer/console@788389a8) oxidecomputer/console#2157 * [fed9f4d4](oxidecomputer/console@fed9f4d4) oxidecomputer/console#2159 * [aa75f577](oxidecomputer/console@aa75f577) oxidecomputer/console#2160 * [eeb32a78](oxidecomputer/console@eeb32a78) oxidecomputer/console#2153 * [522d3ab1](oxidecomputer/console@522d3ab1) oxidecomputer/console#2156 * [c726356f](oxidecomputer/console@c726356f) oxidecomputer/console#2155 * [e2b0a7d0](oxidecomputer/console@e2b0a7d0) oxidecomputer/console#2151 * [a5af899a](oxidecomputer/console@a5af899a) oxidecomputer/console#2154 * [73263a4e](oxidecomputer/console@73263a4e) of course I didn't push to main without running the tests, why do you ask * [ea108b7e](oxidecomputer/console@ea108b7e) put firewall rules tab first on vpc detail
oxidecomputer/console@2ba444c...6334f0d * [6334f0db](oxidecomputer/console@6334f0db) bump omicron to latest main (no changes) * [46dbd9c8](oxidecomputer/console@46dbd9c8) oxidecomputer/console#2158 * [e94929ab](oxidecomputer/console@e94929ab) try 300ms minTime on RefreshButton SpinnerLoader * [b6da4154](oxidecomputer/console@b6da4154) oxidecomputer/console#2161 * [788389a8](oxidecomputer/console@788389a8) oxidecomputer/console#2157 * [fed9f4d4](oxidecomputer/console@fed9f4d4) oxidecomputer/console#2159 * [aa75f577](oxidecomputer/console@aa75f577) oxidecomputer/console#2160 * [eeb32a78](oxidecomputer/console@eeb32a78) oxidecomputer/console#2153 * [522d3ab1](oxidecomputer/console@522d3ab1) oxidecomputer/console#2156 * [c726356f](oxidecomputer/console@c726356f) oxidecomputer/console#2155 * [e2b0a7d0](oxidecomputer/console@e2b0a7d0) oxidecomputer/console#2151 * [a5af899a](oxidecomputer/console@a5af899a) oxidecomputer/console#2154 * [73263a4e](oxidecomputer/console@73263a4e) of course I didn't push to main without running the tests, why do you ask * [ea108b7e](oxidecomputer/console@ea108b7e) put firewall rules tab first on vpc detail


This PR sets the default table row height to the
h-12height, rather than the largerh-16.So we move from a table looking like this:

To something more compact, like this:

37.5% more data on the screen*!
There are still some tables that require a larger height, and we can pass in a

rowHeightprop to enable that. Here we have theInstancesPagetable, which uses theuseQueryTablehook, which invokes theapp/table/Table.tsxcomponent. With this wrapper component, we can pass inrowHeightas a prop to the overallTablecomponent and the component passes it through to theTable.Cellinui/lib/Table.tsx.We also sometimes use the

ui/lib/Table.tsxfile directly, as in theUtilizationPagetable. In cases like that, we have to pass theheightprop directly to eachTable.Cell, as theTablewrapper component doesn't pass anything directly along to its children table cells.I'd prefer, I think, for us to not be involved at all in the height of these elements, and to instead just pass the data in and let the table cells dynamically update, with the appropriate cell-padding. The table would then flex to handle whatever the tallest content in the cells is. At the moment, though, the way we're doing borders on the cells would be a little fussy to get sorted, and there are a few things on our plate for V8. Happy to revisit that down the road.