From ebf193cad51a2b1621e1218a2a1499b96ab63e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 1 Nov 2019 16:34:12 +0000 Subject: [PATCH] chore(ui): tweak silence css for better readability --- .../GroupFooter/__snapshots__/index.test.js.snap | 8 ++++---- .../Components/ManagedSilence/SilenceComment.js | 10 ++++++---- .../Components/ManagedSilence/SilenceDetails.js | 2 +- .../__snapshots__/SilenceComment.test.js.snap | 16 ++++++++-------- .../__snapshots__/index.test.js.snap | 16 ++++++++-------- ui/src/Components/ManagedSilence/index.scss | 4 ++++ 6 files changed, 31 insertions(+), 25 deletions(-) diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/__snapshots__/index.test.js.snap b/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/__snapshots__/index.test.js.snap index 3d11e8f3f5..f1abf7971d 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/__snapshots__/index.test.js.snap +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupFooter/__snapshots__/index.test.js.snap @@ -307,10 +307,10 @@ exports[` mathes snapshot when silence is rendered 1`] = `
-
+
Mocked Silence
-
+
— me@example.com @@ -323,12 +323,12 @@ exports[` mathes snapshot when silence is rendered 1`] = `
-
+
{comment}
-
+
— {silence.createdBy} @@ -59,7 +59,7 @@ const SilenceComment = ({
-
+
diff --git a/ui/src/Components/ManagedSilence/SilenceDetails.js b/ui/src/Components/ManagedSilence/SilenceDetails.js index 7a0322e2f1..db632ac577 100644 --- a/ui/src/Components/ManagedSilence/SilenceDetails.js +++ b/ui/src/Components/ManagedSilence/SilenceDetails.js @@ -98,7 +98,7 @@ const SilenceDetails = ({ {silence.matchers.map(matcher => ( {matcher.name} {matcher.isRegex diff --git a/ui/src/Components/ManagedSilence/__snapshots__/SilenceComment.test.js.snap b/ui/src/Components/ManagedSilence/__snapshots__/SilenceComment.test.js.snap index 365298859e..ef373a59db 100644 --- a/ui/src/Components/ManagedSilence/__snapshots__/SilenceComment.test.js.snap +++ b/ui/src/Components/ManagedSilence/__snapshots__/SilenceComment.test.js.snap @@ -20,10 +20,10 @@ exports[` Matches snapshot when collapsed 1`] = `
-
+
Mocked Silence
-
+
— me@example.com @@ -36,7 +36,7 @@ exports[` Matches snapshot when collapsed 1`] = `
-
+
Matches snapshot when collapsed 1`] = ` focusable=\\"false\\" data-prefix=\\"fas\\" data-icon=\\"chevron-up\\" - class=\\"svg-inline--fa fa-chevron-up fa-w-14 my-sm-auto mt-2 mb-0 ml-sm-2 ml-auto mr-sm-0 mr-1 text-muted cursor-pointer\\" + class=\\"svg-inline--fa fa-chevron-up fa-w-14 undefined ml-sm-2 ml-auto mr-sm-0 mr-1 text-muted cursor-pointer\\" role=\\"img\\" xmlns=\\"http://www.w3.org/2000/svg\\" viewbox=\\"0 0 448 512\\" @@ -89,17 +89,17 @@ exports[` Matches snapshot when expanded 1`] = `
-
+
Mocked Silence
-
+
— me@example.com
-
+
Matches snapshot when expanded 1`] = ` focusable=\\"false\\" data-prefix=\\"fas\\" data-icon=\\"chevron-down\\" - class=\\"svg-inline--fa fa-chevron-down fa-w-14 my-sm-auto mt-2 mb-0 ml-sm-2 ml-auto mr-sm-0 mr-1 text-muted cursor-pointer\\" + class=\\"svg-inline--fa fa-chevron-down fa-w-14 undefined ml-sm-2 ml-auto mr-sm-0 mr-1 text-muted cursor-pointer\\" role=\\"img\\" xmlns=\\"http://www.w3.org/2000/svg\\" viewbox=\\"0 0 448 512\\" diff --git a/ui/src/Components/ManagedSilence/__snapshots__/index.test.js.snap b/ui/src/Components/ManagedSilence/__snapshots__/index.test.js.snap index 70d3d16bd5..984bd749ac 100644 --- a/ui/src/Components/ManagedSilence/__snapshots__/index.test.js.snap +++ b/ui/src/Components/ManagedSilence/__snapshots__/index.test.js.snap @@ -22,10 +22,10 @@ exports[` matches snapshot when collapsed 1`] = `
-
+
Mocked Silence
-
+
— me@example.com @@ -48,7 +48,7 @@ exports[` matches snapshot when collapsed 1`] = `
-
+
matches snapshot with expaned details 1`] = `
-
+
Mocked Silence
-
+
— me@example.com
-
+
matches snapshot with expaned details 1`] = `
- + foo=bar - + baz=~regex
diff --git a/ui/src/Components/ManagedSilence/index.scss b/ui/src/Components/ManagedSilence/index.scss index 7e1f198495..b100823c0f 100644 --- a/ui/src/Components/ManagedSilence/index.scss +++ b/ui/src/Components/ManagedSilence/index.scss @@ -13,6 +13,10 @@ } } +.components-managed-silence-comment { + line-height: 1.2rem; +} + .components-managed-silence-cite { font-size: 85%; }