Skip to content

Commit c894555

Browse files
authored
Fix minor style issues on log related views (#564)
* feat(web): use monospace font and preserve whitespace for logs - Change `white-space: nowrap` to `pre` to keep original formatting. - Apply `font-family: monospace` for better readability of log contents. * fixed minor style bug on log view * Prevent YAML lines are wrapped unintentionally when it's long * Font setting was different in log list and log body * Copy button was invisible due to the scroll related css wasn't applied and expanded
1 parent 2099e54 commit c894555

3 files changed

Lines changed: 11 additions & 17 deletions

File tree

web/src/app/common.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
$resizer-thickness: 5px;
1818

19+
$font-code: "Google Sans Code", monospace;
20+
1921
@mixin adjust-mat-icon-size($size) {
2022
width: $size;
2123
height: $size;

web/src/app/log/components/log-content.component.scss

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,21 @@
5050
}
5151
}
5252
}
53-
54-
.log-body-container-wrap {
55-
grid: "logbody";
56-
}
5753
}
5854

59-
.log-body-container-scrollable {
55+
.log-body-container {
56+
grid: "logbody";
57+
margin: 0 10px;
6058
overflow: auto;
6159

62-
code.hljs {
63-
padding: 0;
64-
white-space: pre;
65-
}
66-
6760
code {
68-
font-family: "Google Sans Code", monospace;
69-
font-size: 10px;
70-
}
71-
72-
.log-body-container {
73-
margin: 0 10px;
61+
white-space: pre;
62+
font-family: common.$font-code;
7463
}
7564
}
7665

7766
.empty-message {
67+
grid: "logbody";
7868
font-weight: 600;
7969
color: mat.m2-get-color-from-palette(mat.$m2-gray-palette, 700);
8070
text-align: center;

web/src/app/log/components/log-view-log-line.component.scss

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

1717
@use "../../zzz-generated" as gen;
18+
@use "../../common.scss" as common;
1819

1920
:host {
2021
display: block;
@@ -53,7 +54,8 @@ tr {
5354
width: 100%;
5455
text-overflow: ellipsis;
5556
overflow: hidden;
56-
white-space: nowrap;
57+
white-space: pre;
58+
font-family: common.$font-code;
5759
}
5860

5961
.type-indicator {

0 commit comments

Comments
 (0)