Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 8004ee3

Browse files
committed
fix(plugins/plugin-client-common): layout regressions from table screenshot PRs
Fixes #5159
1 parent b125959 commit 8004ee3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

plugins/plugin-client-common/src/components/Content/Table/PaginatedTable.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export default class PaginatedTable<P extends Props, S extends State> extends Re
138138
? []
139139
: getBreadcrumbsFromTable(this.props.response, this.props.prefixBreadcrumbs)
140140

141-
if (this.props.response.body.length > 1) {
141+
if (this.props.response.body.length > 1 && !this.state.asGrid) {
142142
breadcrumbs.push({ label: strings('nRows', this.props.response.body.length) })
143143
}
144144

@@ -270,13 +270,11 @@ export default class PaginatedTable<P extends Props, S extends State> extends Re
270270
return <div className="oops">Internal Error</div>
271271
} else {
272272
return (
273-
<div className="kui--data-table-wrapper">
273+
<div className={'kui--data-table-wrapper' + (this.state.asGrid ? ' kui--data-table-as-grid' : '')}>
274274
<div className="kui--screenshotable">
275275
<KuiContext.Consumer>
276276
{config => {
277-
const className =
278-
(this.state.asGrid ? ' kui--data-table-as-grid' : '') +
279-
(config.lightweightTables ? ' kui--data-table-wrapper-lightweight' : '')
277+
const className = config.lightweightTables ? ' kui--data-table-wrapper-lightweight' : ''
280278

281279
if (this.props.response.style === TableStyle.Light && !this.props.isPartOfMiniSplit) {
282280
return <div className={className}>{this.content(true, config.lightweightTables)}</div>

plugins/plugin-client-common/web/scss/components/Table/tables.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ body[kui-theme-style] .kui--data-table-wrapper {
163163
/* make space for any box shadows */
164164
.kui--screenshotable {
165165
padding: 1px;
166+
display: flex;
167+
flex: 1;
166168
}
167169

168170
.kui--card-footer {

plugins/plugin-client-common/web/scss/components/Terminal/MiniSplit.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
}
6363
.kui--data-table-wrapper {
6464
display: flex;
65+
flex: 1;
66+
margin: 0;
6567
}
6668
.kui--card-body {
6769
position: relative;

0 commit comments

Comments
 (0)