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

Commit 07cd000

Browse files
committed
fix(plugins/plugin-client-common): Timeline view renders poorly in MiniSplit
this introduces some mixins for Table and Terminal Fixes #5379
1 parent 7f3b6c8 commit 07cd000

File tree

5 files changed

+77
-3
lines changed

5 files changed

+77
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default class Timeline extends React.PureComponent<Props, State> {
230230
}
231231

232232
return (
233-
<div className="kui--data-table-container bx--data-table-container">
233+
<div className="kui--data-table-container bx--data-table-container kui--timeline-container">
234234
<div className="kui--timeline">
235235
{this.yAxis()}
236236
{this.xAxis()}

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@
1515
*/
1616

1717
@import 'Bar';
18+
@import './_mixins';
19+
@import '../Terminal/_mixins';
20+
21+
@include PlainTerminal {
22+
@include TableContainer {
23+
&.kui--timeline-container {
24+
width: 35rem;
25+
}
26+
}
27+
}
28+
29+
.kui--timeline-container,
30+
.kui--timeline {
31+
height: 100%;
32+
}
1833

1934
.kui--timeline {
2035
position: relative;
@@ -62,7 +77,16 @@
6277

6378
.kui--timeline-buckets {
6479
display: flex;
65-
height: 12rem;
80+
height: 19.6875rem; /* 16:9, see 35rem above */
81+
}
82+
83+
@include MiniSplit {
84+
.kui--timeline-occupancy-line {
85+
padding: 0;
86+
}
87+
.kui--timeline-buckets {
88+
height: 100%;
89+
}
6690
}
6791

6892
.kui--timeline-bucket {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2020 IBM Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
@mixin TableContainer {
18+
.kui--data-table-container {
19+
@content;
20+
}
21+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
@import '_mixins';
18+
1719
/** distinguish the mini splits */
18-
.kui--scrollback[data-is-minisplit] {
20+
@include MiniSplit {
1921
background-color: var(--color-base02);
2022
box-shadow: 1px 1px var(--color-base01);
2123
border: 1px dotted var(--color-base03);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2020 IBM Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
@mixin MiniSplit {
18+
.kui--scrollback[data-is-minisplit] {
19+
@content;
20+
}
21+
}
22+
23+
@mixin PlainTerminal {
24+
.kui--scrollback:not([data-is-minisplit]):not([data-is-width-constrained]) {
25+
@content;
26+
}
27+
}

0 commit comments

Comments
 (0)