From 440e9db98d7e1a748cb02c8839e21e94ebd2efa4 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 29 Oct 2018 15:24:06 +0100 Subject: [PATCH] SONAR-11204 Colorblind friendly banners (#899) --- .../main/js/app/components/GlobalFooter.tsx | 9 +- .../__tests__/GlobalFooter-test.tsx | 2 +- .../__snapshots__/GlobalFooter-test.tsx.snap | 9 +- .../components/extensions/exposeLibraries.ts | 2 + .../nav/component/ComponentNavBgTaskNotif.tsx | 6 +- .../component/ComponentNavLicenseNotif.tsx | 4 +- .../ComponentNavBgTaskNotif-test.tsx.snap | 12 +-- .../ComponentNavLicenseNotif-test.tsx.snap | 8 +- .../settings/PendingPluginsActionNotif.tsx | 2 +- .../PendingPluginsActionNotif-test.tsx.snap | 3 +- .../main/js/app/styles/components/alerts.css | 91 ++++++++++--------- .../js/app/styles/components/boxed-group.css | 7 +- .../src/main/js/app/styles/sonarcloud.css | 16 ++++ .../src/main/js/app/styles/style.css | 4 +- server/sonar-web/src/main/js/app/theme.js | 20 ++++ .../main/js/apps/about/sonarcloud/Contact.tsx | 9 +- .../js/apps/account/components/Password.tsx | 9 +- .../account/notifications/Notifications.tsx | 3 +- .../__snapshots__/Notifications-test.tsx.snap | 6 +- .../components/WorkersForm.tsx | 5 +- .../__snapshots__/WorkersForm-test.tsx.snap | 14 +-- .../components/ActivationFormModal.tsx | 5 +- .../components/BulkChangeModal.tsx | 11 +-- .../components/CustomRuleFormModal.tsx | 3 +- .../components/MetricNotFound.tsx | 4 +- .../drilldown/FilesView.tsx | 5 +- .../__snapshots__/FilesView-test.tsx.snap | 7 +- .../apps/custom-measures/components/Form.tsx | 5 +- .../custom-measures/components/Header.tsx | 5 +- .../__snapshots__/Header-test.tsx.snap | 7 +- .../apps/custom-metrics/components/Header.tsx | 5 +- .../__snapshots__/Header-test.tsx.snap | 7 +- .../src/main/js/apps/documentation/styles.css | 5 +- .../issues/components/BulkChangeModal.tsx | 7 +- .../BulkChangeModal-test.tsx.snap | 6 +- .../components/OrganizationDelete.tsx | 5 +- .../OrganizationDelete-test.tsx.snap | 6 +- .../overview/components/EmptyOverview.tsx | 5 +- .../components/SonarCloudEmptyOverview.tsx | 5 +- .../__snapshots__/EmptyOverview-test.tsx.snap | 18 ++-- .../SonarCloudEmptyOverview-test.tsx.snap | 6 +- .../apps/overview/qualityGate/QualityGate.tsx | 5 +- .../__snapshots__/QualityGate-test.tsx.snap | 8 +- .../components/ListHeader.js | 5 +- .../project/components/ApplyTemplate.tsx | 5 +- .../components/PublicProjectDisclaimer.tsx | 5 +- .../shared/components/PermissionHeader.tsx | 5 +- .../components/forms/AddGraphMetricPopup.tsx | 9 +- .../components/projectActivity.css | 4 - .../projects/create/AutoProjectCreate.tsx | 5 +- .../projects/create/CreateProjectPage.tsx | 14 +-- .../AutoProjectCreate-test.tsx.snap | 21 +++-- .../CreateProjectPage-test.tsx.snap | 12 +-- .../BulkApplyTemplateModal.tsx | 11 +-- .../ChangeVisibilityForm.tsx | 5 +- .../projectsManagement/CreateProjectForm.tsx | 5 +- .../apps/projectsManagement/DeleteModal.tsx | 7 +- .../BulkApplyTemplateModal-test.tsx.snap | 48 ++++------ .../ChangeVisibilityForm-test.tsx.snap | 12 +-- .../CreateProjectForm-test.tsx.snap | 6 +- .../__snapshots__/DeleteModal-test.tsx.snap | 36 +++----- .../components/ConditionModal.tsx | 5 +- .../quality-gates/components/Conditions.tsx | 5 +- .../components/DeleteProfileForm.tsx | 5 +- .../quality-profiles/home/ProfilesList.tsx | 5 +- .../home/RestoreProfileForm.tsx | 9 +- .../apps/securityReports/components/App.tsx | 5 +- .../__tests__/__snapshots__/App-test.tsx.snap | 16 ++-- .../components/EmailAlreadyExists.tsx | 5 +- .../apps/sessions/components/UpdateLogin.tsx | 5 +- .../EmailAlreadyExists-test.tsx.snap | 6 +- .../__snapshots__/UpdateLogin-test.tsx.snap | 6 +- .../js/apps/settings/components/EmailForm.js | 7 +- .../system/components/ChangeLogLevelForm.tsx | 9 +- .../ChangeLogLevelForm-test.tsx.snap | 21 +++-- .../components/info-items/HealthCard.tsx | 8 +- .../components/info-items/HealthCauseItem.tsx | 13 ++- .../info-items/__tests__/HealthCard-test.tsx | 2 +- .../__snapshots__/HealthCard-test.tsx.snap | 8 +- .../HealthCauseItem-test.tsx.snap | 16 ++-- .../system-upgrade/SystemUpgradeNotif.tsx | 5 +- .../SystemUpgradeNotif-test.tsx.snap | 6 +- .../src/main/js/apps/system/styles.css | 4 - .../AnalyzeTutorialSuggestion.tsx | 19 ++-- .../AnalyzeTutorialSuggestion-test.tsx.snap | 23 +++-- .../teamOnboarding/TeamOnboardingModal.tsx | 5 +- .../TeamOnboardingModal-test.tsx.snap | 6 +- .../js/apps/users/components/GroupsForm.tsx | 8 +- .../js/apps/users/components/PasswordForm.tsx | 3 +- .../users/components/TokensFormNewToken.tsx | 5 +- .../js/apps/users/components/UserForm.tsx | 3 +- .../SourceViewer/SourceViewerBase.tsx | 13 +-- .../components/DuplicationPopup.tsx | 5 +- .../js/components/docs/DocMarkdownBlock.tsx | 1 + .../js/components/facet/ListStyleFacet.tsx | 9 +- .../facet/__tests__/ListStyleFacet-test.tsx | 2 +- .../components/icons-components/InfoIcon.tsx | 32 +++++++ .../src/main/js/components/lazyLoad.tsx | 3 +- .../src/main/js/components/nav/NavBar.css | 11 --- .../main/js/components/nav/NavBarNotif.css | 43 +++++++++ .../main/js/components/nav/NavBarNotif.tsx | 18 ++-- .../src/main/js/components/ui/Alert.tsx | 59 ++++++++++++ .../js/components/ui/__tests__/Alert-test.tsx | 32 +++++++ .../__snapshots__/Alert-test.tsx.snap | 26 ++++++ .../src/main/js/components/ui/buttons.css | 1 + .../resources/org/sonar/l10n/core.properties | 6 ++ 106 files changed, 680 insertions(+), 420 deletions(-) create mode 100644 server/sonar-web/src/main/js/components/icons-components/InfoIcon.tsx create mode 100644 server/sonar-web/src/main/js/components/nav/NavBarNotif.css create mode 100644 server/sonar-web/src/main/js/components/ui/Alert.tsx create mode 100644 server/sonar-web/src/main/js/components/ui/__tests__/Alert-test.tsx create mode 100644 server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx index d50fd613b48..be0881f79df 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx @@ -25,6 +25,7 @@ import InstanceMessage from '../../components/common/InstanceMessage'; import { EDITIONS, EditionKey } from '../../apps/marketplace/utils'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { isSonarCloud } from '../../helpers/system'; +import { Alert } from '../../components/ui/Alert'; interface Props { hideLoggedInInfo?: boolean; @@ -48,14 +49,12 @@ export default function GlobalFooter({ return (