Fix collapse, group skew, empty tables and the tab strip scrollbar

This commit is contained in:
2026-08-31 15:01:24 -04:00
parent 2fce339735
commit b21503e250
7 changed files with 70 additions and 16 deletions

View File

@@ -246,11 +246,17 @@ export function rowAction(panel, item) {
}
}
// A panel declaring `empty` is asking to stay visible with nothing in it and
// say so - "No installed software reported." is an answer, where an absent
// card is a question. `list` honoured that and `table` did not, for no reason
// anybody wrote down, so a table panel with an empty message still vanished.
// It matters more now that a panel can be the only thing in a tab: the tab
// itself disappears with it.
export function panelVisible(panel) {
if (panel.render === 'tabs') return tabSections(panel).length > 0
if (panel.render === 'list') return rows(panel).length > 0 || !!panel.empty
if (panel.render === 'keyvalue') return keyvalueFields(panel).length > 0
if (panel.render === 'table') return rows(panel).length > 0
if (panel.render === 'table') return rows(panel).length > 0 || !!panel.empty
if (panel.render === 'badge') return badges(panel).length > 0
return false
}