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

Commit 664a8da

Browse files
committed
fix(plugins/plugin-client-common): improve rendering of output only blocks
don't show the left-hand block stripe; this also improves the css a bit, by introducing a Scrollback mixin Fixes #5467
1 parent 34d03bc commit 664a8da

File tree

4 files changed

+51
-36
lines changed

4 files changed

+51
-36
lines changed

plugins/plugin-client-common/src/components/Views/Terminal/Block/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export default class Block extends React.PureComponent<Props, State> {
164164
(!this.props.noActiveInput || !isActive(this.props.model)) && (
165165
<div
166166
className={'repl-block kui--maximize-candidate ' + this.props.model.state.toString()}
167+
data-is-output-only={isOutputOnly(this.props.model) || undefined}
167168
data-announcement={isAnnouncement(this.props.model) || undefined}
168169
data-uuid={hasUUID(this.props.model) && this.props.model.execUUID}
169170
data-input-count={this.props.idx}

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

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -70,38 +70,6 @@
7070
}
7171
} */
7272

73-
/** Coloring the context border by status of the block */
74-
.repl-block {
75-
position: relative;
76-
77-
&:before {
78-
background-color: var(--color-table-border2);
79-
border-left: none;
80-
border-right: none;
81-
border-radius: 1px;
82-
opacity: 0.375;
83-
content: '';
84-
left: 0;
85-
position: absolute;
86-
top: 0.1875rem;
87-
bottom: 0.1875rem;
88-
width: 4px;
89-
}
90-
&[data-is-focused]:before {
91-
opacity: 1;
92-
}
93-
&.error:before {
94-
opacity: 1;
95-
background-color: var(--color-error);
96-
}
97-
&[data-is-focused] .repl-context {
98-
opacity: 1;
99-
}
100-
&:hover .repl-output .repl-context:after {
101-
border-color: var(--color-base03);
102-
}
103-
}
104-
10573
.repl-prompt-righty {
10674
font-weight: 700;
10775
text-shadow: 0 0 1px var(--color-text-02);

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,42 @@
1414
* limitations under the License.
1515
*/
1616

17+
@import '_mixins';
18+
1719
.repl-output {
1820
padding-right: calc(1rem - 6px);
1921
}
22+
23+
/** Coloring the context border by status of the block */
24+
@include Scrollback {
25+
.repl-block:not([data-is-output-only]) {
26+
position: relative;
27+
28+
&:before {
29+
background-color: var(--color-table-border2);
30+
border-left: none;
31+
border-right: none;
32+
border-radius: 1px;
33+
opacity: 0.375;
34+
content: '';
35+
left: 0;
36+
position: absolute;
37+
top: 0.1875rem;
38+
bottom: 0.1875rem;
39+
width: 4px;
40+
}
41+
&[data-is-focused]:before {
42+
opacity: 1;
43+
}
44+
&.error:before {
45+
opacity: 1;
46+
background-color: var(--color-error);
47+
}
48+
&[data-is-focused] .repl-context {
49+
opacity: 1;
50+
}
51+
&:hover .repl-output .repl-context:after {
52+
border-color: var(--color-base03);
53+
}
54+
}
55+
}

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,24 @@
1414
* limitations under the License.
1515
*/
1616

17-
@mixin MiniSplit {
18-
.kui--scrollback[data-is-minisplit] {
17+
@mixin Scrollback {
18+
.kui--scrollback {
1919
@content;
2020
}
2121
}
2222

23+
@mixin MiniSplit {
24+
@include Scrollback {
25+
&[data-is-minisplit] {
26+
@content;
27+
}
28+
}
29+
}
30+
2331
@mixin PlainTerminal {
24-
.kui--scrollback:not([data-is-minisplit]):not([data-is-width-constrained]) {
25-
@content;
32+
@include Scrollback {
33+
&:not([data-is-minisplit]):not([data-is-width-constrained]) {
34+
@content;
35+
}
2636
}
2737
}

0 commit comments

Comments
 (0)