Skip to content

Commit 6ba2c2d

Browse files
Merge pull request #142 from TheRealJon/CONSOLE-538
Make log resume footer accessible
2 parents bd1e6a6 + 84788e0 commit 6ba2c2d

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

frontend/public/components/utils/_log-window.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// vars
21
$color-log-window-body-bg: $color-pf-black;
32
$color-log-window-header-bg: $color-pf-black-900;
43
$color-log-window-text: $color-pf-black-150;
@@ -31,9 +30,15 @@ $color-log-window-divider: $color-log-window-header-bg;
3130
width: 0;
3231
}
3332

34-
.log-window__footer {
33+
.log-window__resume-btn {
3534
background-color: $color-log-window-header-bg;
36-
cursor: pointer;
35+
color: $color-log-window-text;
3736
padding: 4px 10px;
38-
text-align: center;
37+
}
38+
39+
.log-window__resume-btn:hover,
40+
.log-window__resume-btn:focus,
41+
.log-window__resume-btn:active,
42+
{
43+
color: $color-log-window-text;
3944
}

frontend/public/components/utils/log-window.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,11 @@ export class LogWindow extends React.PureComponent {
9595

9696
// TODO maybe move these variables into state so they are only updated on changes
9797
const totalLineCount = pluralize(lines.length, 'line');
98-
const linesBehindCount = pluralize(linesBehind, 'line');
98+
const linesBehindCount = pluralize(linesBehind, 'new line');
9999
const headerText = bufferFull ? `last ${totalLineCount}` : totalLineCount;
100-
let footerText = ' Resume stream';
101-
if (linesBehind > 0) {
102-
footerText += bufferFull ? ` and show last ${totalLineCount}` : ` and show ${linesBehindCount}`;
103-
}
100+
const resumeText = (linesBehind > 0)
101+
? ` Resume stream and show ${linesBehindCount}`
102+
: ' Resume stream';
104103

105104
return <div className="log-window">
106105
<div className="log-window__header">
@@ -115,10 +114,11 @@ export class LogWindow extends React.PureComponent {
115114
</div>
116115
</div>
117116
</div>
118-
{ status === 'paused' && <div onClick={this._unpause} className="log-window__footer">
119-
<span className="fa fa-play-circle-o" aria-hidden="true"></span>
120-
{footerText}
121-
</div> }
117+
{ status === 'paused' &&
118+
<button onClick={this._unpause} className="btn btn-block log-window__resume-btn">
119+
<span className="fa fa-play-circle-o" aria-hidden="true"></span>
120+
{resumeText}
121+
</button> }
122122
</div>;
123123
}
124124
}

0 commit comments

Comments
 (0)