Skip to content

Commit

Permalink
fix: Improve the look of the error view (#2001)
Browse files Browse the repository at this point in the history
- Add a little blur to overlays, so they're easier to read when on top
of complex backgrounds
- Change the colour and transparency level of the error background
  • Loading branch information
mofojed authored May 13, 2024
1 parent 3de52d6 commit 3236c9b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/components/scss/new_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ $ant-thickness: 1px;
$focus-bg-transparency: 12%;
$hover-bg-transparency: 14%;
$active-bg-transparency: 28%;
$exception-transparency: 13%;
$exception-transparency: 28%;
4 changes: 4 additions & 0 deletions packages/components/scss/util.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
@return color-mix-opacity('negative', $i);
}

@function negative-down-bg-opacity($i: 100) {
@return color-mix-opacity('negative-down-bg', $i);
}

@function black-opacity($i: 100) {
@return color-mix-opacity('black', $i);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/ErrorView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
position: relative;
color: $danger;
border-radius: $border-radius;
background-color: negative-opacity($exception-transparency);
background-color: negative-down-bg-opacity($exception-transparency);
display: flex;
flex-direction: column;
flex-grow: 0;
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/LoadingOverlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$iris-panel-message-font-size: 1.2rem;
$iris-panel-icon-font-size: 64px;
$iris-panel-scrim-bg: black-opacity(10);
$iris-panel-scrim-bg: bg-opacity(80);

.iris-panel-message-overlay {
text-align: center;
Expand Down Expand Up @@ -30,4 +30,5 @@ $iris-panel-scrim-bg: black-opacity(10);

.iris-panel-scrim-background {
background: $iris-panel-scrim-bg;
backdrop-filter: blur(2px);
}
3 changes: 2 additions & 1 deletion packages/dashboard-core-plugins/src/panels/ChartPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$chart-panel-disconnected-opacity: 0.18;
$overlay-message-font-size: 1.2rem;
$overlay-scrim-bg: black-opacity(50);
$overlay-scrim-bg: bg-opacity(80);
$overlay-content-max-width: 450px;

.iris-chart-panel {
Expand All @@ -24,6 +24,7 @@ $overlay-content-max-width: 450px;

.chart-panel-overlay {
background-color: $overlay-scrim-bg;
backdrop-filter: blur(1px);
position: absolute;
top: 0;
bottom: 0;
Expand Down

0 comments on commit 3236c9b

Please sign in to comment.