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

Commit 9ddec1a

Browse files
committed
fix(plugins/plugin-client-common): clean up screenshot notification UI
Fixes #3699
1 parent de57fe5 commit 9ddec1a

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

plugins/plugin-client-common/src/components/Screenshot.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,16 @@ export default class Screenshot extends React.PureComponent<Props, State> {
159159
<ToastNotification
160160
id="screenshot-captured"
161161
timeout={timeout}
162-
kind="info"
162+
kind="success"
163163
title={strings('Screenshot')}
164-
caption={strings('Successfully captured a screenshot to the clipboard')}
164+
subtitle={strings('Successfully captured a screenshot to the clipboard')}
165+
caption=""
165166
onCloseButtonClick={() => this.setState({ isActive: false, captured: undefined })}
166167
>
167168
<div className="flex-layout">
168169
<img src={this.state.captured.toDataURL()} className="screenshot-image" />
169170
</div>
170-
<div className="small-top-pad">{this.saveToDiskButton()}</div>
171+
<div className="kui--screenshot-captured-bottom-message">{this.saveToDiskButton()}</div>
171172
</ToastNotification>
172173
)
173174
}
@@ -186,7 +187,7 @@ export default class Screenshot extends React.PureComponent<Props, State> {
186187
this.activate()
187188
}
188189

189-
return { isActive }
190+
return { isActive, captured: undefined }
190191
})
191192
}
192193

plugins/plugin-client-common/web/css/static/Screenshot.scss

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ body {
1010

1111
.screenshot-save-button {
1212
color: var(--color-text-01) !important;
13+
font-weight: normal !important;
1314
}
1415

1516
.kui--screenshot-tooltip {
@@ -52,22 +53,42 @@ sidecar.kui--screenshotable {
5253
}
5354
}
5455

55-
.bx--toast-notification--info {
56+
.bx--toast-notification--success {
57+
border-color: var(--color-ok);
58+
59+
svg.bx--toast-notification__icon {
60+
& {
61+
stroke: var(--color-ok);
62+
}
63+
path {
64+
fill: unset;
65+
}
66+
}
67+
}
68+
69+
.bx--toast-notification--info,
70+
.bx--toast-notification--success {
5671
position: absolute;
5772
bottom: 2em;
58-
right: 1em;
59-
width: 32em;
73+
right: 0em;
74+
width: 28em;
6075
height: auto;
6176
z-index: 5;
6277

6378
background: var(--color-screenshot-background);
6479
color: var(--color-screenshot-foreground);
6580

81+
.kui--screenshot-captured-bottom-message {
82+
/* bookend the spacing with the top text */
83+
margin-top: 1.5rem;
84+
margin-bottom: 1rem;
85+
}
86+
6687
.screenshot-image {
6788
width: 100%;
6889
height: auto;
6990
max-height: 17em;
70-
object-fit: cover;
91+
object-fit: contain;
7192
object-position: top left;
7293
}
7394
}

0 commit comments

Comments
 (0)