Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Merge downstream - JSON Viewer with dark mode & Header Fixes #4444

Merged
merged 2 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/frontend/packages/core/sass/_all-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@import '../src/shared/components/list/list-table/table-row/table-row.component.theme';
@import '../src/shared/components/no-content-message/no-content-message.component.theme';
@import '../src/shared/components/boolean-indicator/boolean-indicator.component.theme';

@import '../src/shared/components/json-viewer/json-viewer.component.theme';
@import '../src/shared/components/loading-page/loading-page.component.theme';
@import '../src/shared/components/log-viewer/log-viewer.component.theme';
@import '../src/shared/components/chips/chips.component.theme';
Expand Down Expand Up @@ -127,5 +127,6 @@
@include restore-endpoints-theme($theme, $app-theme);
@include metrics-component-theme($theme, $app-theme);
@include intro-screen-theme($theme, $app-theme);
@include app-json-view-theme($theme, $app-theme);

}
9 changes: 9 additions & 0 deletions src/frontend/packages/core/sass/mat-desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,13 @@ $desktop-toggle-button-item-height: $desktop-menu-item-height - 2px;
flex: 0 0 $desktop-page-header-height;
height: $desktop-page-header-height;
}

mat-drawer.dashboard__side_preview {
top: $desktop-page-header-height;
height: calc(100vw - #{$desktop-page-header-height} - 1px);
}

app-profile-info .user-profile {
top: $desktop-page-header-height;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../../../sass/mat-desktop';

$user-profile-avatar-size: 48px;

.user-profile {
Expand All @@ -9,7 +7,7 @@ $user-profile-avatar-size: 48px;
left: 0;
position: absolute;
right: 0;
top: $desktop-page-header-height;
top: 56px;
mat-card:not(:first-child) {
margin-top: 24px;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@mixin app-json-view-theme($theme, $app-theme) {
$is-dark: map-get($theme, is-dark);

@if $is-dark == true {
// Keep this simple, otherwise there's a LOT of overrides.
// Additionally would need to bring in the non-dark mode colours to ensure the selectors work
app-json-viewer {
// There can be child json-viewers, ensure this only applies to the top level
&:not([root='false']) {
background-color: #ffffffeb;
richard-cox marked this conversation as resolved.
Show resolved Hide resolved
border-radius: 3px;
}
}
}
}