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

Commit ed812f3

Browse files
committed
fix(plugins/plugin-client-common): Terminal Block -> Screenshot of table does not capture box shadow
Fixes #5142
1 parent 93ac829 commit ed812f3

File tree

3 files changed

+31
-26
lines changed

3 files changed

+31
-26
lines changed

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

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -270,28 +270,31 @@ 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-
<KuiContext.Consumer>
274-
{config => {
275-
const className =
276-
'kui--data-table-wrapper kui--screenshotable' +
277-
(this.state.asGrid ? ' kui--data-table-as-grid' : '') +
278-
(config.lightweightTables ? ' kui--data-table-wrapper-lightweight' : '')
279-
280-
if (this.props.response.style === TableStyle.Light && !this.props.isPartOfMiniSplit) {
281-
return <div className={className}>{this.content(true, config.lightweightTables)}</div>
282-
} else {
283-
return (
284-
<Card
285-
header={this.topToolbar(config.lightweightTables)}
286-
footer={this.bottomToolbar(config.lightweightTables)}
287-
className={className}
288-
>
289-
{this.content(false, config.lightweightTables)}
290-
</Card>
291-
)
292-
}
293-
}}
294-
</KuiContext.Consumer>
273+
<div className="kui--data-table-wrapper">
274+
<div className="kui--screenshotable">
275+
<KuiContext.Consumer>
276+
{config => {
277+
const className =
278+
(this.state.asGrid ? ' kui--data-table-as-grid' : '') +
279+
(config.lightweightTables ? ' kui--data-table-wrapper-lightweight' : '')
280+
281+
if (this.props.response.style === TableStyle.Light && !this.props.isPartOfMiniSplit) {
282+
return <div className={className}>{this.content(true, config.lightweightTables)}</div>
283+
} else {
284+
return (
285+
<Card
286+
header={this.topToolbar(config.lightweightTables)}
287+
footer={this.bottomToolbar(config.lightweightTables)}
288+
className={className}
289+
>
290+
{this.content(false, config.lightweightTables)}
291+
</Card>
292+
)
293+
}
294+
}}
295+
</KuiContext.Consumer>
296+
</div>
297+
</div>
295298
)
296299
}
297300
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ $grid-cell-size: 1.25rem;
4444
flex: initial;
4545
}
4646

47-
.kui--card {
48-
margin: 1rem 0 0;
49-
}
50-
5147
.kui--data-table-as-grid {
5248
.kui--card-header {
5349
border-bottom: 1px solid var(--color-base03);

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ body[kui-theme-style] .repl.sidecar-visible {
141141

142142
body[kui-theme-style] .kui--data-table-wrapper {
143143
overflow-x: auto;
144+
margin: 1rem 0 0;
145+
146+
/* make space for any box shadows */
147+
.kui--screenshotable {
148+
padding: 1px;
149+
}
144150

145151
.kui--card-footer {
146152
border-top: 1px solid var(--color-base03);

0 commit comments

Comments
 (0)