From 586a060043141296a5cc7f2f843b19fc65e7a5e8 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Fri, 7 Jan 2022 16:54:17 +0100 Subject: [PATCH] Fix high contrast mode issues (#1910) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Additionally adds css variables to be used by plugins Co-authored-by: René Pfeuffer --- gradle/changelog/high_contrast_findings.yaml | 4 ++ scm-ui/ui-components/src/Breadcrumb.tsx | 14 +------ scm-ui/ui-components/src/Logo.stories.tsx | 1 - .../src/__snapshots__/storyshots.test.ts.snap | 10 ++--- .../src/repos/annotate/AnnotatePopover.tsx | 2 +- scm-ui/ui-styles/src/components/_main.scss | 12 +++++- scm-ui/ui-styles/src/highcontrast.scss | 41 +++++++------------ scm-ui/ui-styles/src/light.scss | 7 +++- .../admin/plugins/components/PluginEntry.tsx | 1 - scm-ui/ui-webapp/src/components/LoginForm.tsx | 1 - .../ui-webapp/src/containers/OmniSearch.tsx | 2 - .../codeSection/containers/FileSearch.tsx | 1 - 12 files changed, 43 insertions(+), 53 deletions(-) create mode 100644 gradle/changelog/high_contrast_findings.yaml diff --git a/gradle/changelog/high_contrast_findings.yaml b/gradle/changelog/high_contrast_findings.yaml new file mode 100644 index 0000000000..61eed7ad88 --- /dev/null +++ b/gradle/changelog/high_contrast_findings.yaml @@ -0,0 +1,4 @@ +- type: fixed + description: Minor issues in high contrast mode ([#1910](https://github.com/scm-manager/scm-manager/pull/1910)) +- type: added + description: CSS variables for plugins ([#1910](https://github.com/scm-manager/scm-manager/pull/1910)) diff --git a/scm-ui/ui-components/src/Breadcrumb.tsx b/scm-ui/ui-components/src/Breadcrumb.tsx index 5982971eab..989c0532a5 100644 --- a/scm-ui/ui-components/src/Breadcrumb.tsx +++ b/scm-ui/ui-components/src/Breadcrumb.tsx @@ -69,22 +69,15 @@ const BreadcrumbNav = styled.nav` width: 100%; /* move slash to end */ - li + li::before { content: none; } - li:not(:last-child)::after { - color: #b5b5b5; //$breadcrumb-item-separator-color - content: "\\0002f"; - } - li:first-child { margin-left: 0.75rem; } /* sizing of each item */ - li { max-width: 375px; @@ -111,11 +104,6 @@ const ActionBar = styled.div` } `; -// TODO ersetzen? -const PrefixButton = styled.div` - border-right: 1px solid lightgray; -`; - const BreadcrumbNode: FC<{ clickable: boolean; text: string; url: string; current?: boolean }> = ({ clickable, text, @@ -198,7 +186,7 @@ const Breadcrumb: FC = ({ const renderBreadcrumbNav = () => { let prefixButtons = null; if (preButtons) { - prefixButtons = {preButtons}; + prefixButtons =
{preButtons}
; } let homeUrl = baseUrl + "/"; diff --git a/scm-ui/ui-components/src/Logo.stories.tsx b/scm-ui/ui-components/src/Logo.stories.tsx index 01608379e3..7502bbc8f2 100644 --- a/scm-ui/ui-components/src/Logo.stories.tsx +++ b/scm-ui/ui-components/src/Logo.stories.tsx @@ -26,7 +26,6 @@ import { storiesOf } from "@storybook/react"; import styled from "styled-components"; import Logo from "./Logo"; -// TODO Ersetzen? const Wrapper = styled.div` padding: 2em; background-color: black; diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 307c345315..8f04dae547 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -67,7 +67,7 @@ exports[`Storyshots BreadCrumb Default 1`] = ` >