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

Commit

Permalink
Merge downstream - JSON Viewer with dark mode & Header Fixes (#4444)
Browse files Browse the repository at this point in the history
* Fix json-viewer dark mode

* Fix profile page and side nav top position following header diet
- Fix side nav top position
- Update fix for profile page to also work in non-desktop mode
  • Loading branch information
richard-cox authored and nwmac committed Jul 22, 2020
1 parent dd34fc5 commit 244f9fe
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
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 @@ -126,5 +126,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;
border-radius: 3px;
}
}
}
}

0 comments on commit 244f9fe

Please sign in to comment.