From: Stas Vilchik Date: Wed, 23 May 2018 13:29:06 +0000 (+0200) Subject: SONAR-10673 Stop using font for icons (#252) X-Git-Tag: 7.5~1156 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fbe1259e4abbbbe7416489819b79113ab953d864;p=sonarqube.git SONAR-10673 Stop using font for icons (#252) --- diff --git a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/RuleDetails.java b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/RuleDetails.java index 75bfe6ccb0c..dbce1e3f64e 100644 --- a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/RuleDetails.java +++ b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/RuleDetails.java @@ -21,7 +21,6 @@ package org.sonarqube.qa.util.pageobjects; import com.codeborne.selenide.Condition; import com.codeborne.selenide.SelenideElement; -import java.util.Locale; import static com.codeborne.selenide.Condition.text; import static com.codeborne.selenide.Condition.visible; @@ -153,7 +152,7 @@ public class RuleDetails { } public RuleDetails activationShouldHaveSeverity(String profileKey, String severity) { - getActiveProfileElement(profileKey).$(".coding-rules-detail-quality-profile-severity .icon-severity-" + severity.toLowerCase(Locale.ENGLISH)).shouldBe(visible); + getActiveProfileElement(profileKey).$(".coding-rules-detail-quality-profile-severity").shouldHave(text(severity)); return this; } diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java index 4b8365cc0a4..f52b779f7bd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java @@ -107,7 +107,6 @@ public class UserSessionInitializerTest { // exclude static resources assertPathIsIgnored("/css/style.css"); - assertPathIsIgnored("/fonts/font.ttf"); assertPathIsIgnored("/images/logo.png"); assertPathIsIgnored("/js/jquery.js"); } diff --git a/server/sonar-vsts/src/main/js/components/SonarCloudIcon.tsx b/server/sonar-vsts/src/main/js/components/SonarCloudIcon.tsx index f212eaca024..111fc23a307 100644 --- a/server/sonar-vsts/src/main/js/components/SonarCloudIcon.tsx +++ b/server/sonar-vsts/src/main/js/components/SonarCloudIcon.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from '../../../../../sonar-web/src/main/js/components/icons-components/types'; +import { IconProps } from '../../../../../sonar-web/src/main/js/components/icons-components/Icon'; export default function SonarCloudIcon({ className, fill = '#f3702a', size = 18 }: IconProps) { return ( diff --git a/server/sonar-web/public/fonts/sonar-5.2.eot b/server/sonar-web/public/fonts/sonar-5.2.eot deleted file mode 100755 index fbc4d06cfa3..00000000000 Binary files a/server/sonar-web/public/fonts/sonar-5.2.eot and /dev/null differ diff --git a/server/sonar-web/public/fonts/sonar-5.2.svg b/server/sonar-web/public/fonts/sonar-5.2.svg deleted file mode 100755 index 1d648b7b456..00000000000 --- a/server/sonar-web/public/fonts/sonar-5.2.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/sonar-web/public/fonts/sonar-5.2.ttf b/server/sonar-web/public/fonts/sonar-5.2.ttf deleted file mode 100755 index fa26fd2b826..00000000000 Binary files a/server/sonar-web/public/fonts/sonar-5.2.ttf and /dev/null differ diff --git a/server/sonar-web/public/fonts/sonar-5.2.woff b/server/sonar-web/public/fonts/sonar-5.2.woff deleted file mode 100755 index 1e9e0d823fc..00000000000 Binary files a/server/sonar-web/public/fonts/sonar-5.2.woff and /dev/null differ diff --git a/server/sonar-web/scripts/start.js b/server/sonar-web/scripts/start.js index 88fbd9edcff..28afc572245 100644 --- a/server/sonar-web/scripts/start.js +++ b/server/sonar-web/scripts/start.js @@ -106,7 +106,6 @@ function runDevServer(compiler, host, port, protocol) { }, proxy: { '/api': proxy, - '/fonts': proxy, '/static': proxy, '/integration': proxy } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx index a918d734e24..fa0fd612b5b 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx @@ -36,6 +36,7 @@ import PlusCircleIcon from '../../../../components/icons-components/PlusCircleIc import HelpTooltip from '../../../../components/controls/HelpTooltip'; import Toggler from '../../../../components/controls/Toggler'; import Tooltip from '../../../../components/controls/Tooltip'; +import DropdownIcon from '../../../../components/icons-components/DropdownIcon'; interface Props { branchLikes: BranchLike[]; @@ -186,7 +187,7 @@ export default class ComponentNavBranch extends React.PureComponent {displayName} - + diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavHeader.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavHeader.tsx index e6dae1fa20c..325d8e0b613 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavHeader.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavHeader.tsx @@ -22,7 +22,7 @@ import { connect } from 'react-redux'; import { Link } from 'react-router'; import ComponentNavBranch from './ComponentNavBranch'; import { Component, Organization, BranchLike, Breadcrumb } from '../../../types'; -import QualifierIcon from '../../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../../components/icons-components/QualifierIcon'; import { getOrganizationByKey, areThereCustomOrganizations } from '../../../../store/rootReducer'; import OrganizationAvatar from '../../../../components/common/OrganizationAvatar'; import OrganizationHelmet from '../../../../components/common/OrganizationHelmet'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx index 86ea6e3c84a..1f3045cfc52 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx @@ -31,6 +31,7 @@ import { getBranchLikeQuery } from '../../../../helpers/branches'; import { translate } from '../../../../helpers/l10n'; +import DropdownIcon from '../../../../components/icons-components/DropdownIcon'; const SETTINGS_URLS = [ '/project/admin', @@ -196,7 +197,7 @@ export default class ComponentNavMenu extends React.PureComponent { id="component-navigation-admin" onClick={onToggleClick}> {translate('layout.settings')} - + )} @@ -436,7 +437,7 @@ export default class ComponentNavMenu extends React.PureComponent { id="component-navigation-more" onClick={onToggleClick}> {translate('more')} - + )} diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap index 3d9fee6a289..214b4a018d1 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap @@ -61,8 +61,8 @@ exports[`renders main branch 1`] = ` master - @@ -152,8 +152,8 @@ exports[`renders pull request 1`] = ` 1234 – Feature PR - @@ -264,8 +264,8 @@ exports[`renders short-living branch 1`] = ` foo - diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx index cab30c446ae..99e20aa58c5 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx @@ -25,6 +25,7 @@ import { translate } from '../../../../helpers/l10n'; import { getQualityGatesUrl, getBaseUrl } from '../../../../helpers/urls'; import { isMySet } from '../../../../apps/issues/utils'; import Dropdown from '../../../../components/controls/Dropdown'; +import DropdownIcon from '../../../../components/icons-components/DropdownIcon'; interface Props { appState: AppState; @@ -165,7 +166,7 @@ export default class GlobalNavMenu extends React.PureComponent { id="global-navigation-more" onClick={onToggleClick}> {translate('more')} - + )} diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx index ff656a311a5..397603fe68d 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx @@ -30,6 +30,7 @@ import { Extension } from '../../../types'; import { translate } from '../../../../helpers/l10n'; import Dropdown from '../../../../components/controls/Dropdown'; import { PluginPendingResult } from '../../../../api/plugins'; +import DropdownIcon from '../../../../components/icons-components/DropdownIcon'; interface Props { editionStatus?: EditionStatus; @@ -137,7 +138,7 @@ export default class SettingsNav extends React.PureComponent { id="settings-navigation-configuration" onClick={onToggleClick}> {translate('sidebar.project_settings')} - + )} @@ -172,7 +173,8 @@ export default class SettingsNav extends React.PureComponent { className={classNames('dropdown-toggle', { active: open || this.isProjectsActive() })} href="#" onClick={onToggleClick}> - {translate('sidebar.projects')} + {translate('sidebar.projects')} + )} @@ -221,7 +223,8 @@ export default class SettingsNav extends React.PureComponent { className={classNames('dropdown-toggle', { active: open || this.isSecurityActive() })} href="#" onClick={onToggleClick}> - {translate('sidebar.security')} + {translate('sidebar.security')} + )} diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResult.js b/server/sonar-web/src/main/js/app/components/search/SearchResult.js index 02cc378ce09..c8426ea96a9 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResult.js +++ b/server/sonar-web/src/main/js/app/components/search/SearchResult.js @@ -22,7 +22,7 @@ import React from 'react'; import { Link } from 'react-router'; /*:: import type { Component } from './utils'; */ import FavoriteIcon from '../../../components/icons-components/FavoriteIcon'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import ClockIcon from '../../../components/icons-components/ClockIcon'; import Tooltip from '../../../components/controls/Tooltip'; import { getProjectUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/app/styles/components/boxed-group.css b/server/sonar-web/src/main/js/app/styles/components/boxed-group.css index 49aa03123b6..e77b22430da 100644 --- a/server/sonar-web/src/main/js/app/styles/components/boxed-group.css +++ b/server/sonar-web/src/main/js/app/styles/components/boxed-group.css @@ -47,11 +47,6 @@ line-height: var(--controlHeight); } -.boxed-group-header [class^='icon-'] { - display: inline-block; - vertical-align: middle; -} - .boxed-group-actions { position: relative; z-index: 12; diff --git a/server/sonar-web/src/main/js/app/styles/components/issues.css b/server/sonar-web/src/main/js/app/styles/components/issues.css index 21eb1a3066a..3e1635acf1d 100644 --- a/server/sonar-web/src/main/js/app/styles/components/issues.css +++ b/server/sonar-web/src/main/js/app/styles/components/issues.css @@ -134,6 +134,8 @@ } .issue-meta-list { + display: flex; + align-items: center; padding-left: 10px; } @@ -142,13 +144,8 @@ font-size: var(--smallFontSize); } -.issue-meta-on-right { - float: right; - margin-right: 0; -} - -.issue-meta-on-right + .issue-meta-on-right { - margin-right: 10px; +.issue-meta + .issue-meta { + margin-left: var(--gridSize); } .issue-meta-in-corner { @@ -386,62 +383,6 @@ input.issue-action-options-search { font-size: var(--smallFontSize); } -.issue-navigate { - display: none; - position: absolute; - width: 24px; - top: 0; - bottom: 0; - border-bottom: none; -} - -.issue-navigate .issue-navigate-to-left, -.issue-navigate .issue-navigate-to-right { - position: absolute; - top: 50%; - left: 50%; - margin: -8px 0 0 -3px; -} - -.issue-navigate .issue-navigate-to-left:before, -.issue-navigate .issue-navigate-to-right:before { - font-size: 18px; -} - -.issue-navigate:hover { - background-color: rgba(0, 0, 0, 0.05); -} - -.issue-navigate-right .issue-meta-in-corner { - padding-right: 24px; -} - -.issue-navigate-left { - padding-left: 24px; -} - -.issue-navigate-left .issue-navigate { - display: block; - left: 0; -} - -.issue-navigate-left .issue-navigate .issue-navigate-to-right { - display: none; -} - -.issue-navigate-right { - padding-right: 24px; -} - -.issue-navigate-right .issue-navigate { - display: block; - right: 0; -} - -.issue-navigate-right .issue-navigate .issue-navigate-to-left { - display: none; -} - .issue-with-checkbox { padding-left: 24px; } diff --git a/server/sonar-web/src/main/js/app/styles/components/ui.css b/server/sonar-web/src/main/js/app/styles/components/ui.css index b3530f16c2e..537ffc19b72 100644 --- a/server/sonar-web/src/main/js/app/styles/components/ui.css +++ b/server/sonar-web/src/main/js/app/styles/components/ui.css @@ -62,13 +62,13 @@ .process-spinner-close { position: absolute; - top: 0; - right: 0; - padding: 3px; - background: none !important; - border: none !important; - line-height: 1; - color: #fff; + top: 2px; + right: 2px; +} + +.process-spinner-close:hover path, +.process-spinner-close:focus path { + fill: var(--red) !important; } .shortcuts-section + .shortcuts-section { diff --git a/server/sonar-web/src/main/js/app/styles/init/icons.css b/server/sonar-web/src/main/js/app/styles/init/icons.css index c4f46239db3..b262be7a0e1 100644 --- a/server/sonar-web/src/main/js/app/styles/init/icons.css +++ b/server/sonar-web/src/main/js/app/styles/init/icons.css @@ -17,30 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -@font-face { - font-family: 'sonar'; - src: url('../fonts/sonar-5.2.eot?'); - src: url('../fonts/sonar-5.2.eot?#iefix') format('embedded-opentype'), - url('../fonts/sonar-5.2.woff?') format('woff'), - url('../fonts/sonar-5.2.ttf?') format('truetype'), - url('../fonts/sonar-5.2.svg?#sonar') format('svg'); - font-weight: normal; - font-style: normal; -} - [class^='icon-'], [class*=' icon-'] { - font-family: 'sonar'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; line-height: 1; vertical-align: middle; - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; } a[class^='icon-'], @@ -67,203 +47,6 @@ a[class*=' icon-'] { color: var(--darkBlue); } -/* - * Severity - */ -[class^='icon-severity-'], -[class*=' icon-severity'] { - display: inline-block; - vertical-align: top; - width: 16px; - height: 16px; - background-size: 12px 12px; - background: no-repeat center center; -} - -.icon-severity-blocker, -.icon-severity-4 { - background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cg%20transform%3D%22matrix(-1%2C1.22465e-16%2C-1.22465e-16%2C-1%2C12%2C12)%22%3E%3Cpath%20fill%3D%22%23d4333f%22%20d%3D%22M6%2C0C9.311%2C0%2012%2C2.689%2012%2C6C12%2C9.311%209.311%2C12%206%2C12C2.689%2C12%200%2C9.311%200%2C6C0%2C2.689%202.689%2C0%206%2C0ZM7%2C5L5%2C5L5%2C10L7%2C10L7%2C5ZM7%2C2L5%2C2L5%2C4L7%2C4L7%2C2Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E'); -} - -.icon-severity-critical, -.icon-severity-3 { - background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20fill%3D%22%23d4333f%22%20d%3D%22M6%2C0C9.311%2C0%2012%2C2.689%2012%2C6C12%2C9.311%209.311%2C12%206%2C12C2.689%2C12%200%2C9.311%200%2C6C0%2C2.689%202.689%2C0%206%2C0ZM7%2C10L7%2C5.414L8.893%2C7.307C9.023%2C7.431%209.175%2C7.523%209.35%2C7.568C9.717%2C7.663%2010.116%2C7.537%2010.361%2C7.248C10.43%2C7.167%2010.486%2C7.075%2010.526%2C6.977C10.573%2C6.861%2010.598%2C6.738%2010.6%2C6.613C10.602%2C6.489%2010.58%2C6.365%2010.536%2C6.248C10.485%2C6.113%2010.406%2C5.997%2010.307%2C5.893C9.095%2C4.681%207.913%2C3.437%206.669%2C2.257C6.616%2C2.211%206.561%2C2.169%206.5%2C2.134C6.362%2C2.054%206.211%2C2.014%206.052%2C2.001C6%2C2%206%2C2%205.948%2C2.001C5.772%2C2.015%205.604%2C2.065%205.455%2C2.161C5.396%2C2.2%205.344%2C2.245%205.293%2C2.293C4.08%2C3.505%202.836%2C4.687%201.656%2C5.932C1.563%2C6.041%201.49%2C6.161%201.447%2C6.299C1.409%2C6.417%201.394%2C6.542%201.402%2C6.667C1.409%2C6.773%201.433%2C6.878%201.474%2C6.977C1.507%2C7.059%201.551%2C7.136%201.605%2C7.207C1.813%2C7.478%202.153%2C7.627%202.493%2C7.596C2.691%2C7.577%202.871%2C7.498%203.028%2C7.378C3.069%2C7.343%203.068%2C7.344%203.107%2C7.307L5%2C5.414L5%2C10L7%2C10Z%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-severity-major, -.icon-severity-2 { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2212px%22%20height%3D%2212px%22%20viewBox%3D%220%200%2012%2012%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A1.41421%3B%22%3E%3Cpath%20fill%3D%22%23d4333f%22%20d%3D%22M6%2C0C9.311%2C0%2012%2C2.689%2012%2C6C12%2C9.311%209.311%2C12%206%2C12C2.689%2C12%200%2C9.311%200%2C6C0%2C2.689%202.689%2C0%206%2C0ZM6.08%2C2.903C6.151%2C2.911%206.22%2C2.922%206.288%2C2.942C6.426%2C2.984%206.548%2C3.056%206.658%2C3.147C7.902%2C4.293%209.084%2C5.504%2010.297%2C6.683C10.397%2C6.786%2010.478%2C6.901%2010.531%2C7.035C10.576%2C7.151%2010.6%2C7.275%2010.6%2C7.399C10.6%2C7.524%2010.577%2C7.648%2010.532%2C7.763C10.493%2C7.863%2010.438%2C7.956%2010.37%2C8.038C10.129%2C8.33%209.732%2C8.461%209.363%2C8.372C9.188%2C8.329%209.035%2C8.239%208.903%2C8.117L6%2C5.295L3.097%2C8.117C3.058%2C8.153%203.058%2C8.153%203.017%2C8.187C2.902%2C8.273%202.777%2C8.337%202.637%2C8.372C2.516%2C8.401%202.39%2C8.408%202.267%2C8.391C1.928%2C8.345%201.63%2C8.124%201.489%2C7.813C1.452%2C7.732%201.427%2C7.646%201.413%2C7.558C1.396%2C7.453%201.396%2C7.345%201.413%2C7.24C1.445%2C7.044%201.535%2C6.87%201.666%2C6.721C2.847%2C5.51%204.09%2C4.362%205.303%2C3.183C5.355%2C3.135%205.409%2C3.09%205.47%2C3.052C5.623%2C2.956%205.794%2C2.91%205.973%2C2.9C6.027%2C2.9%206.027%2C2.9%206.08%2C2.903Z%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-severity-minor, -.icon-severity-1 { - background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20fill%3D%22%2387bb43%22%20d%3D%22M6%2C0C9.311%2C0%2012%2C2.689%2012%2C6C12%2C9.311%209.311%2C12%206%2C12C2.689%2C12%200%2C9.311%200%2C6C0%2C2.689%202.689%2C0%206%2C0ZM7%2C6.586L7%2C2L5%2C2L5%2C6.586L3.107%2C4.693C3.055%2C4.644%203.002%2C4.598%202.942%2C4.559C2.79%2C4.461%202.619%2C4.413%202.44%2C4.401C2.386%2C4.4%202.334%2C4.402%202.28%2C4.407C2.121%2C4.431%201.97%2C4.482%201.836%2C4.574C1.748%2C4.634%201.67%2C4.708%201.605%2C4.793C1.398%2C5.064%201.344%2C5.432%201.464%2C5.752C1.515%2C5.887%201.594%2C6.003%201.693%2C6.107C2.905%2C7.319%204.087%2C8.563%205.331%2C9.743C5.425%2C9.823%205.526%2C9.889%205.642%2C9.934C5.904%2C10.034%206.203%2C10.019%206.454%2C9.891C6.548%2C9.843%206.631%2C9.78%206.707%2C9.707C7.92%2C8.495%209.164%2C7.313%2010.344%2C6.068C10.437%2C5.959%2010.51%2C5.839%2010.553%2C5.701C10.591%2C5.583%2010.606%2C5.458%2010.598%2C5.333C10.591%2C5.227%2010.567%2C5.122%2010.526%2C5.023C10.493%2C4.941%2010.449%2C4.864%2010.395%2C4.793C10.187%2C4.522%209.847%2C4.373%209.507%2C4.404C9.309%2C4.423%209.129%2C4.502%208.972%2C4.622C8.932%2C4.656%208.932%2C4.656%208.893%2C4.693L7%2C6.586Z%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-severity-info, -.icon-severity-0 { - background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20fill%3D%22%234b9fd5%22%20d%3D%22M6%2C0C9.311%2C0%2012%2C2.689%2012%2C6C12%2C9.311%209.311%2C12%206%2C12C2.689%2C12%200%2C9.311%200%2C6C0%2C2.689%202.689%2C0%206%2C0ZM7%2C5L5%2C5L5%2C10L7%2C10L7%2C5ZM7%2C2L5%2C2L5%2C4L7%2C4L7%2C2Z%22%2F%3E%3C%2Fsvg%3E'); -} - -/* - * Status - */ -[class^='icon-status-'], -[class*=' icon-status'] { - display: inline-block; - vertical-align: top; - width: 16px; - height: 16px; - background-size: 14px 14px; - background: no-repeat center center; -} - -.icon-status-open { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M7%202.75c-.77%200-1.482.19-2.133.57-.65.38-1.166.896-1.547%201.547-.38.65-.57%201.362-.57%202.133%200%20.77.19%201.482.57%202.133.38.65.896%201.167%201.547%201.547.65.38%201.362.57%202.133.57.77%200%201.482-.19%202.133-.57.65-.38%201.167-.896%201.547-1.547.38-.65.57-1.362.57-2.133%200-.77-.19-1.482-.57-2.133-.38-.65-.896-1.166-1.547-1.547-.65-.38-1.362-.57-2.133-.57zM13%207c0%201.09-.268%202.092-.805%203.012-.536.92-1.264%201.647-2.183%202.183C9.092%2012.732%208.09%2013%207%2013c-1.09%200-2.092-.268-3.012-.805-.92-.536-1.647-1.264-2.183-2.183C1.268%209.092%201%208.09%201%207c0-1.09.268-2.092.805-3.012.536-.92%201.264-1.647%202.183-2.183C4.908%201.268%205.91%201%207%201c1.09%200%202.092.268%203.012.805.92.536%201.647%201.264%202.183%202.183C12.732%204.908%2013%205.91%2013%207z%22%20fill%3D%22%234B9FD5%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-status-confirmed { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M9%207c0%20.552-.195%201.023-.586%201.414C8.024%208.804%207.552%209%207%209c-.552%200-1.023-.195-1.414-.586C5.196%208.024%205%207.552%205%207c0-.552.195-1.023.586-1.414C5.976%205.196%206.448%205%207%205c.552%200%201.023.195%201.414.586.39.39.586.862.586%201.414zM7%202.75c-.77%200-1.482.19-2.133.57-.65.38-1.166.896-1.547%201.547-.38.65-.57%201.362-.57%202.133%200%20.77.19%201.482.57%202.133.38.65.896%201.167%201.547%201.547.65.38%201.362.57%202.133.57.77%200%201.482-.19%202.133-.57.65-.38%201.167-.896%201.547-1.547.38-.65.57-1.362.57-2.133%200-.77-.19-1.482-.57-2.133-.38-.65-.896-1.166-1.547-1.547-.65-.38-1.362-.57-2.133-.57zM13%207c0%201.09-.268%202.092-.805%203.012-.536.92-1.264%201.647-2.183%202.183C9.092%2012.732%208.09%2013%207%2013c-1.09%200-2.092-.268-3.012-.805-.92-.536-1.647-1.264-2.183-2.183C1.268%209.092%201%208.09%201%207c0-1.09.268-2.092.805-3.012.536-.92%201.264-1.647%202.183-2.183C4.908%201.268%205.91%201%207%201c1.09%200%202.092.268%203.012.805.92.536%201.647%201.264%202.183%202.183C12.732%204.908%2013%205.91%2013%207z%22%20fill%3D%22%234B9FD5%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-status-reopened { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M7%2011.25v-8.5c-.77%200-1.482.19-2.133.57-.65.38-1.166.896-1.547%201.547-.38.65-.57%201.362-.57%202.133%200%20.77.19%201.482.57%202.133.38.65.896%201.167%201.547%201.547.65.38%201.362.57%202.133.57zM13%207c0%201.09-.268%202.092-.805%203.012-.536.92-1.264%201.647-2.183%202.183C9.092%2012.732%208.09%2013%207%2013c-1.09%200-2.092-.268-3.012-.805-.92-.536-1.647-1.264-2.183-2.183C1.268%209.092%201%208.09%201%207c0-1.09.268-2.092.805-3.012.536-.92%201.264-1.647%202.183-2.183C4.908%201.268%205.91%201%207%201c1.09%200%202.092.268%203.012.805.92.536%201.647%201.264%202.183%202.183C12.732%204.908%2013%205.91%2013%207z%22%20fill%3D%22%234B9FD5%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-status-resolved { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M11.03%205.734c0-.145-.046-.265-.14-.36l-.71-.702c-.1-.1-.216-.15-.352-.15-.135%200-.252.05-.35.15l-3.19%203.18-1.765-1.766c-.1-.1-.216-.15-.35-.15-.137%200-.254.05-.353.15l-.71.703c-.094.093-.14.213-.14.358%200%20.14.046.258.14.352l2.828%202.828c.098.1.216.15.35.15.142%200%20.26-.05.36-.15l4.243-4.242c.094-.094.14-.21.14-.352zM13%207c0%201.09-.268%202.092-.805%203.012-.536.92-1.264%201.647-2.183%202.183C9.092%2012.732%208.09%2013%207%2013c-1.09%200-2.092-.268-3.012-.805-.92-.536-1.647-1.264-2.183-2.183C1.268%209.092%201%208.09%201%207c0-1.09.268-2.092.805-3.012.536-.92%201.264-1.647%202.183-2.183C4.908%201.268%205.91%201%207%201c1.09%200%202.092.268%203.012.805.92.536%201.647%201.264%202.183%202.183C12.732%204.908%2013%205.91%2013%207z%22%20fill%3D%22%23444%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-status-closed { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M13%207c0%201.09-.268%202.092-.805%203.012-.536.92-1.264%201.647-2.183%202.183C9.092%2012.732%208.09%2013%207%2013c-1.09%200-2.092-.268-3.012-.805-.92-.536-1.647-1.264-2.183-2.183C1.268%209.092%201%208.09%201%207c0-1.09.268-2.092.805-3.012.536-.92%201.264-1.647%202.183-2.183C4.908%201.268%205.91%201%207%201c1.09%200%202.092.268%203.012.805.92.536%201.647%201.264%202.183%202.183C12.732%204.908%2013%205.91%2013%207z%22%20fill%3D%22%23444%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -/* - * Test Status - */ -.icon-test-status-ok:before { - content: '\f013'; - color: var(--green); - font-size: var(--bigFontSize); -} - -.icon-test-status-failure:before { - content: '\f000'; - color: var(--orange); - font-size: var(--bigFontSize); -} - -.icon-test-status-error:before { - content: '\f057'; - color: var(--red); - font-size: var(--bigFontSize); -} - -.icon-test-status-skipped:before { - content: '\f056'; - color: var(--gray71); - font-size: var(--bigFontSize); -} - -/* - * Alert - */ -.icon-alert-ok { - font-size: var(--bigFontSize); -} - -.icon-alert-ok:before { - content: '\f013'; - color: var(--green); - font-size: var(--bigFontSize); -} - -.icon-alert-warn { - font-size: var(--bigFontSize); -} - -.icon-alert-warn:before { - content: '\f000'; - color: var(--orange); - font-size: var(--bigFontSize); -} - -.icon-alert-error { - font-size: var(--bigFontSize); -} - -.icon-alert-error:before { - content: '\f057'; - color: var(--red); - font-size: var(--bigFontSize); -} - -.icon-alert-none { - font-size: var(--bigFontSize); -} - -.icon-alert-none:before { - content: '\f056'; - color: var(--gray71); - font-size: var(--bigFontSize); -} - -/* - * Qualifier - */ -[class^='icon-qualifier-'], -[class*=' icon-qualifier-'] { - display: inline-block; - vertical-align: top; - width: 16px; - height: 16px; - background-size: 16px 16px; - background: no-repeat center center; -} - -.icon-qualifier-dir, -.icon-qualifier-pac { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M14%2012.286V5.703c0-.198-.058-.36-.195-.5S13.512%205%2013.315%205H6.704c-.196%200-.36-.075-.5-.214-.136-.14-.203-.312-.203-.51v-.57c0-.2-.07-.363-.207-.502C5.655%203.064%205.487%203%205.29%203H2.707c-.196%200-.363.065-.5.204-.137.14-.206.302-.206.5v8.582c0%20.2.07.367.206.506.137.14.304.208.5.208h10.61c.196%200%20.352-.07.49-.208.137-.14.194-.307.194-.506zm1-6.598v6.65c0%20.458-.152.83-.475%201.16-.324.326-.7.502-1.15.502H2.647c-.452%200-.84-.175-1.162-.503-.324-.328-.486-.7-.486-1.158V3.654c0-.457.162-.842.486-1.17C1.81%202.158%202.196%202%202.648%202h2.7c.45%200%20.84.157%201.164.485.324.328.488.714.488%201.17V4h6.373c.452%200%20.83.174%201.152.5.323.33.475.73.475%201.187z%22%20fill%3D%22%23F90%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-trk, -.icon-qualifier-dev_prj { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M14.985%2013.988L1%2014.005%201.02%205h13.966v8.988zM1.998%205.995l.006%207.02L14.022%2013%2014%206.004l-12.002-.01zM3%204.5V4h9.996l.004.5h1l-.005-1.497-11.98.003L2%204.5zm1-2v-.504h8.002L12%202.5h1l-.004-1.495H3.003L3%202.5z%22%20fill%3D%22%232D88C0%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-brc { - background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%3E%3Cpath%20d%3D%22M16%2016H6v-6h10v6zm-9-1h8v-4H7v4zM7%209h8v1H7zM8%208h6v1H8z%22%20fill%3D%22%232D88C0%22%2F%3E%3Cpath%20d%3D%22M5%2012H1V5h12v2h1V4H0v9h5zM3%201h8v.5h1V0H2v1.5h1zM2%203h10v.5h1V2H1v1.5h1z%22%20fill%3D%22%232D88C0%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-cla, -.icon-qualifier-uts { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M3%2014h10V6H9V2H3zm7.012-9h3.008c-.012-.674-.78-1.258-1.27-1.752-.488-.495-.973-1.243-1.75-1.24v2.96zM14%204.995V15H2V1l7.997.02c1.013-.03%201.57.893%202.239%201.555.667.663%201.75%201.47%201.763%202.42z%22%20fill%3D%22%232D88C0%22%20fill-rule%3D%22nonzero%22%2F%3E%3Cpath%20d%3D%22M7%208l-3%202.5L7%2013zM8%2013l3-2.5L8%208z%22%20fill%3D%22%232D88C0%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-fil { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2215%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M3%2014h10V6H9V2H3zm7.012-9h3.008c-.012-.674-.78-1.258-1.27-1.752-.488-.495-.973-1.243-1.75-1.24v2.96zM14%204.995V15H2V1l7.997.02c1.013-.03%201.57.893%202.239%201.555.667.663%201.75%201.47%201.763%202.42z%22%20fill%3D%22%232D88C0%22%20fill-rule%3D%22nonzero%22%2F%3E%3Cpath%20fill%3D%22%232D88C0%22%20d%3D%22M4%2011h8v1H4zM4%209h8v1H4z%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-lib { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M1%2013h4V3H1zm3-1H2v-2h2v2zM2%204h2v4H2zM6%2013h4V3H6zm3-1H7v-2h2v2zM7%204h2v4H7zM11%2013h4V3h-4zm3-1h-2v-2h2v2zm-2-8h2v4h-2z%22%20fill%3D%22%232D88C0%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-vw { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M1.016%2014.97V1.015H14.97V14.97H1.015zm1-1H13.97V2.015H2.015V13.97z%22%20fill%3D%22%232D88C0%22%2F%3E%3Cpath%20d%3D%22M3.006%207V3.006H7V7H3.006zm1-1H6V4.006H4.006V6zM9%207V3.015h3.985V7H9zm1-1h1.985V4.015H10V6zM3.004%2012.996V9H7v3.996H3.004zm1-1H6V10H4.004v1.996zM9%2012.997V9h3.997v3.997H9zm1-1h1.997V10H10v1.997z%22%20fill%3D%22%232D88C0%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-svw { - background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%3E%3Cpath%20d%3D%22M13%207.2V1H1v12h7v1H0V0h14v7.2%22%20fill%3D%22%232D88C0%22%2F%3E%3Cpath%20d%3D%22M2%206V2h4v4H2zm1-1h2V3H3v2zm5%201V2h4v4H8zm1-1h2V3H9v2zm-7%207V8h4v4H2zm1-1h2V9H3v2zM16%2016H7V7h9v9zm-8-1h7V8H8v7z%22%20fill%3D%22%232D88C0%22%2F%3E%3Cpath%20d%3D%22M9%209h2v2H9zM12%209h2v2h-2zM9%2012h2v2H9zM12%2012h2v2h-2z%22%20fill%3D%22%232D88C0%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-dev { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M7.974%208.02c-.938%200-1.82-.36-2.482-1.017-.663-.655-1.028-1.527-1.028-2.455%200-.927.365-1.8%201.028-2.455.663-.656%201.544-1.017%202.482-1.017.937%200%201.82.36%202.482%201.017.662.656%201.027%201.528%201.027%202.455%200%20.928-.365%201.8-1.027%202.455C9.793%207.66%208.91%208.02%207.974%208.02zm0-5.778c-1.286%200-2.332%201.034-2.332%202.306s1.046%202.307%202.332%202.307c1.285%200%202.332-1.035%202.332-2.307S9.258%202.242%207.974%202.242zm3.534%206.418c.127.016.243.045.348.086.17.066.302.146.406.246.132.124.253.282.36.47.126.218.226.442.3.668.08.253.15.535.206.838.056.313.095.604.113.867.02.28.03.57.03.862%200%20.532-.174.758-.306.882-.142.132-.397.31-.973.31H3.948c-.233%200-.437-.03-.606-.09-.14-.05-.26-.123-.366-.222-.13-.123-.306-.35-.306-.88%200-.294.01-.584.03-.863.018-.263.056-.554.112-.867.055-.303.125-.585.207-.838.073-.226.173-.45.298-.667.108-.19.23-.347.36-.47.106-.1.238-.18.407-.247.105-.04.22-.07.348-.086.202.13.432.277.683.435.342.217.756.4%201.265.564.523.166%201.06.25%201.59.25.534%200%201.07-.084%201.592-.25.51-.164.923-.348%201.266-.565.25-.158.48-.304.682-.435zm-.244-1.18c-.055%200-.184.066-.387.196-.202.13-.43.276-.685.437-.255.16-.586.307-.994.437-.408.13-.818.196-1.23.196-.41%200-.82-.065-1.228-.196-.408-.13-.74-.276-.993-.437-.255-.16-.484-.306-.686-.437-.202-.13-.33-.196-.386-.196-.374%200-.716.06-1.026.183-.31.12-.572.283-.787.487-.213.203-.404.45-.57.737-.165.288-.297.584-.395.888-.098.303-.18.633-.244.988-.063.355-.106.685-.128.992-.02.306-.032.62-.032.942%200%20.73.224%201.304.672%201.726.448.42%201.043.632%201.785.632h8.044c.743%200%201.34-.21%201.787-.633.447-.42.67-.996.67-1.725%200-.32-.01-.635-.03-.942-.022-.307-.065-.637-.13-.992-.064-.355-.146-.685-.244-.988-.098-.304-.23-.6-.395-.888-.166-.288-.356-.534-.57-.737-.216-.204-.478-.366-.788-.487-.31-.122-.652-.183-1.026-.183z%22%20fill%3D%22%232D88C0%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - -.icon-qualifier-app { - background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20width%3D%2216%22%20height%3D%2216%22%3E%0A%20%20%3Cstyle%3E%0A%20%20%20%20.st0%7Bfill%3Anone%3Bstroke%3A%234A9ED5%3Bstroke-miterlimit%3A10%3B%7D%0A%20%20%3C%2Fstyle%3E%0A%20%20%3Ccircle%20cx%3D%223%22%20cy%3D%223%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%20%20%3Ccircle%20cx%3D%228%22%20cy%3D%223%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%20%20%3Ccircle%20cx%3D%2213%22%20cy%3D%223%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%20%20%3Ccircle%20cx%3D%223%22%20cy%3D%228%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%20%20%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%20%20%3Ccircle%20cx%3D%2213%22%20cy%3D%228%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%20%20%3Ccircle%20cx%3D%223%22%20cy%3D%2213%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%20%20%3Ccircle%20cx%3D%228%22%20cy%3D%2213%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%20%20%3Ccircle%20cx%3D%2213%22%20cy%3D%2213%22%20r%3D%221.5%22%20class%3D%22st0%22%2F%3E%0A%3C%2Fsvg%3E%0A'); -} - /* * Checkbox */ @@ -352,55 +135,6 @@ a:hover > .icon-radio { /* * Common */ -.icon-arrow-down:before { - content: '\f0d7'; - position: relative; - top: -2px; -} - -.icon-arrow-up:before { - content: '\f0d8'; - position: relative; - top: -2px; -} - -.icon-dropdown:before { - content: '\f0d7'; - position: relative; - top: -1px; -} - -.icon-sort-desc:before { - content: '\f0d7'; - position: relative; - top: -1px; -} - -.icon-tags:before { - content: '\f02c'; - font-size: var(--mediumFontSize); -} - -.icon-favorite, -.icon-not-favorite { - display: inline-block; - vertical-align: top; - width: 16px; - height: 16px; - background-size: 16px 16px; - background: no-repeat center center; - transition: all 0.2s ease !important; -} - -.icon-favorite { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M15.428%205.777c0%20.13-.078.274-.233.428l-3.24%203.16.767%204.465c.006.042.01.102.01.18%200%20.124-.032.23-.095.316-.062.086-.153.13-.272.13-.113%200-.232-.036-.357-.108l-4.01-2.107L3.99%2014.35c-.13.072-.25.107-.357.107-.125%200-.22-.043-.28-.13-.064-.085-.095-.19-.095-.316%200-.037.006-.096.018-.18l.768-4.464-3.25-3.16C.644%206.045.57%205.9.57%205.775c0-.22.167-.356.5-.41l4.482-.652L7.562.652c.112-.244.258-.366.437-.366.177%200%20.323.122.436.366l2.01%204.062%204.48.652c.335.054.5.19.5.41h.002z%22%20fill%3D%22%23F90%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); - transform: rotate(72deg); -} - -.icon-not-favorite { - background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M15.428%205.777c0%20.13-.078.274-.233.428l-3.24%203.16.767%204.465c.006.042.01.102.01.18%200%20.124-.032.23-.095.316-.062.086-.153.13-.272.13-.113%200-.232-.036-.357-.108l-4.01-2.107L3.99%2014.35c-.13.072-.25.107-.357.107-.125%200-.22-.043-.28-.13-.064-.085-.095-.19-.095-.316%200-.037.006-.096.018-.18l.768-4.464-3.25-3.16C.644%206.045.57%205.9.57%205.775c0-.22.167-.356.5-.41l4.482-.652L7.562.652c.112-.244.258-.366.437-.366.177%200%20.323.122.436.366l2.01%204.062%204.48.652c.335.054.5.19.5.41h.002z%22%20fill%3D%22%23CDCDCD%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E'); -} - .icon-outline { transition: all 0.2s ease !important; } @@ -419,105 +153,3 @@ a:hover > .icon-radio { stroke: currentColor; fill-opacity: 1; } - -@keyframes spin-star { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(144deg); - } -} - -.icon-close:before { - content: '\f00d'; - font-size: var(--bigFontSize); -} - -.icon-inheritance:before { - content: '\f126'; - font-size: var(--mediumFontSize); -} - -.icon-inheritance-overridden:before { - color: var(--red) !important; -} - -.icon-scm, -.icon-scm_dev, -.icon-ci, -.icon-issue, -.icon-homepage { - display: inline-block; - width: 14px; - margin-top: -1px; - text-align: center; -} - -.icon-scm:before { - content: '\f017'; - font-size: var(--mediumFontSize); -} - -.icon-scm_dev:before { - content: '\f015'; - font-size: var(--mediumFontSize); -} - -.icon-ci:before { - content: '\f021'; - font-size: var(--mediumFontSize); -} - -.icon-issue:before { - content: '\f188'; - font-size: var(--mediumFontSize); -} - -.icon-homepage:before { - content: '\f016'; - font-size: var(--mediumFontSize); -} - -.icon-filter:before { - content: '\f03a'; - font-size: var(--bigFontSize); -} - -.icon-chevron-left:before { - content: '\f104'; - font-size: var(--mediumFontSize); -} - -.icon-chevron-right:before { - content: '\f105'; - font-size: var(--mediumFontSize); -} - -.icon-ellipsis-h:before { - position: relative; - top: 1px; - content: '\f141'; - font-size: var(--mediumFontSize); -} - -.icon-filter:before { - content: '\f0b0'; - font-size: var(--bigFontSize); -} - -.icon-lock:before { - content: '\f023'; - font-size: var(--bigFontSize); -} - -.icon-workspace-doc { - display: inline-block; - vertical-align: top; - width: 9px; - height: 16px; - padding-right: 3px; - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgOSAxNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjE7Ij4gICAgPHBhdGggZD0iTTYuNTcxNDMsNS4xNDI4NkM2LjU3MTQzLDUuMjIwMjQgNi41NDMxNSw1LjI4NzIgNi40ODY2MSw1LjM0Mzc1QzYuNDMwMDYsNS40MDAzIDYuMzYzMSw1LjQyODU3IDYuMjg1NzEsNS40Mjg1N0M2LjIwODMzLDUuNDI4NTcgNi4xNDEzNyw1LjQwMDMgNi4wODQ4Miw1LjM0Mzc1QzYuMDI4MjcsNS4yODcyIDYsNS4yMjAyNCA2LDUuMTQyODZDNiw0Ljg2OTA1IDUuODM5MjksNC42NTc3NCA1LjUxNzg2LDQuNTA4OTNDNS4xOTY0Myw0LjM2MDEyIDQuODgwOTUsNC4yODU3MSA0LjU3MTQzLDQuMjg1NzFDNC40OTQwNSw0LjI4NTcxIDQuNDI3MDgsNC4yNTc0NCA0LjM3MDU0LDQuMjAwODlDNC4zMTM5OSw0LjE0NDM1IDQuMjg1NzEsNC4wNzczOCA0LjI4NTcxLDRDNC4yODU3MSwzLjkyMjYyIDQuMzEzOTksMy44NTU2NSA0LjM3MDU0LDMuNzk5MTFDNC40MjcwOCwzLjc0MjU2IDQuNDk0MDUsMy43MTQyOSA0LjU3MTQzLDMuNzE0MjlDNC44NjkwNSwzLjcxNDI5IDUuMTY1MTgsMy43NjE5IDUuNDU5ODIsMy44NTcxNEM1Ljc1NDQ2LDMuOTUyMzggNi4wMTMzOSw0LjExMzEgNi4yMzY2MSw0LjMzOTI5QzYuNDU5ODIsNC41NjU0OCA2LjU3MTQzLDQuODMzMzMgNi41NzE0Myw1LjE0Mjg2Wk04LDUuMTQyODZDOCw0LjcxNDI5IDcuODk3MzIsNC4zMTU0OCA3LjY5MTk2LDMuOTQ2NDNDNy40ODY2MSwzLjU3NzM4IDcuMjE4NzUsMy4yNzUzIDYuODg4MzksMy4wNDAxOEM2LjU1ODA0LDIuODA1MDYgNi4xOTE5NiwyLjYyMDU0IDUuNzkwMTgsMi40ODY2MUM1LjM4ODM5LDIuMzUyNjggNC45ODIxNCwyLjI4NTcxIDQuNTcxNDMsMi4yODU3MUM0LjE2MDcxLDIuMjg1NzEgMy43NTQ0NiwyLjM1MjY4IDMuMzUyNjgsMi40ODY2MUMyLjk1MDg5LDIuNjIwNTQgMi41ODQ4MiwyLjgwNTA2IDIuMjU0NDYsMy4wNDAxOEMxLjkyNDExLDMuMjc1MyAxLjY1NjI1LDMuNTc3MzggMS40NTA4OSwzLjk0NjQzQzEuMjQ1NTQsNC4zMTU0OCAxLjE0Mjg2LDQuNzE0MjkgMS4xNDI4Niw1LjE0Mjg2QzEuMTQyODYsNS43NDQwNSAxLjM0NTI0LDYuMjc5NzYgMS43NSw2Ljc1QzEuODA5NTIsNi44MTU0OCAxLjkwMDMsNi45MTM2OSAyLjAyMjMyLDcuMDQ0NjRDMi4xNDQzNSw3LjE3NTYgMi4yMzUxMiw3LjI3MzgxIDIuMjk0NjQsNy4zMzkyOUMzLjA1NjU1LDguMjUgMy40NzYxOSw5LjEzNjkgMy41NTM1NywxMEw1LjU4OTI5LDEwQzUuNjY2NjcsOS4xMzY5IDYuMDg2MzEsOC4yNSA2Ljg0ODIxLDcuMzM5MjlDNi45MDc3NCw3LjI3MzgxIDYuOTk4NTEsNy4xNzU2IDcuMTIwNTQsNy4wNDQ2NEM3LjI0MjU2LDYuOTEzNjkgNy4zMzMzMyw2LjgxNTQ4IDcuMzkyODYsNi43NUM3Ljc5NzYyLDYuMjc5NzYgOCw1Ljc0NDA1IDgsNS4xNDI4NlpNOS4xNDI4Niw1LjE0Mjg2QzkuMTQyODYsNi4wNjU0OCA4LjgzNjMxLDYuODYzMSA4LjIyMzIxLDcuNTM1NzFDNy45NTUzNiw3LjgyNzM4IDcuNzMzNjMsOC4wODYzMSA3LjU1ODA0LDguMzEyNUM3LjM4MjQ0LDguNTM4NjkgNy4yMDUzNiw4LjgyMjkyIDcuMDI2NzksOS4xNjUxOEM2Ljg0ODIxLDkuNTA3NDQgNi43NDcwMiw5LjgyNzM4IDYuNzIzMjEsMTAuMTI1QzcuMDAyOTgsMTAuMjkxNyA3LjE0Mjg2LDEwLjUzNTcgNy4xNDI4NiwxMC44NTcxQzcuMTQyODYsMTEuMDc3NCA3LjA2ODQ1LDExLjI2NzkgNi45MTk2NCwxMS40Mjg2QzcuMDY4NDUsMTEuNTg5MyA3LjE0Mjg2LDExLjc3OTggNy4xNDI4NiwxMkM3LjE0Mjg2LDEyLjMwOTUgNy4wMDg5MywxMi41NTA2IDYuNzQxMDcsMTIuNzIzMkM2LjgxODQ1LDEyLjg2MDEgNi44NTcxNCwxMyA2Ljg1NzE0LDEzLjE0MjlDNi44NTcxNCwxMy40MTY3IDYuNzYzMzksMTMuNjI4IDYuNTc1ODksMTMuNzc2OEM2LjM4ODM5LDEzLjkyNTYgNi4xNTc3NCwxNCA1Ljg4MzkzLDE0QzUuNzY0ODgsMTQuMjYxOSA1LjU4NjMxLDE0LjQ3MDIgNS4zNDgyMSwxNC42MjVDNS4xMTAxMiwxNC43Nzk4IDQuODUxMTksMTQuODU3MSA0LjU3MTQzLDE0Ljg1NzFDNC4yOTE2NywxNC44NTcxIDQuMDMyNzQsMTQuNzc5OCAzLjc5NDY0LDE0LjYyNUMzLjU1NjU1LDE0LjQ3MDIgMy4zNzc5OCwxNC4yNjE5IDMuMjU4OTMsMTRDMi45ODUxMiwxNCAyLjc1NDQ2LDEzLjkyNTYgMi41NjY5NiwxMy43NzY4QzIuMzc5NDYsMTMuNjI4IDIuMjg1NzEsMTMuNDE2NyAyLjI4NTcxLDEzLjE0MjlDMi4yODU3MSwxMyAyLjMyNDQsMTIuODYwMSAyLjQwMTc5LDEyLjcyMzJDMi4xMzM5MywxMi41NTA2IDIsMTIuMzA5NSAyLDEyQzIsMTEuNzc5OCAyLjA3NDQsMTEuNTg5MyAyLjIyMzIxLDExLjQyODZDMi4wNzQ0LDExLjI2NzkgMiwxMS4wNzc0IDIsMTAuODU3MUMyLDEwLjUzNTcgMi4xMzk4OCwxMC4yOTE3IDIuNDE5NjQsMTAuMTI1QzIuMzk1ODMsOS44MjczOCAyLjI5NDY0LDkuNTA3NDQgMi4xMTYwNyw5LjE2NTE4QzEuOTM3NSw4LjgyMjkyIDEuNzYwNDIsOC41Mzg2OSAxLjU4NDgyLDguMzEyNUMxLjQwOTIzLDguMDg2MzEgMS4xODc1LDcuODI3MzggMC45MTk2NDMsNy41MzU3MUMwLjMwNjU0OCw2Ljg2MzEgMCw2LjA2NTQ4IDAsNS4xNDI4NkMwLDQuNTUzNTcgMC4xMzI0NCw0LjAwNDQ2IDAuMzk3MzIxLDMuNDk1NTRDMC42NjIyMDIsMi45ODY2MSAxLjAxMDQyLDIuNTYzOTkgMS40NDE5NiwyLjIyNzY4QzEuODczNTEsMS44OTEzNyAyLjM2MTYxLDEuNjI2NDkgMi45MDYyNSwxLjQzMzA0QzMuNDUwODksMS4yMzk1OCA0LjAwNTk1LDEuMTQyODYgNC41NzE0MywxLjE0Mjg2QzUuMTM2OSwxLjE0Mjg2IDUuNjkxOTYsMS4yMzk1OCA2LjIzNjYxLDEuNDMzMDRDNi43ODEyNSwxLjYyNjQ5IDcuMjY5MzUsMS44OTEzNyA3LjcwMDg5LDIuMjI3NjhDOC4xMzI0NCwyLjU2Mzk5IDguNDgwNjUsMi45ODY2MSA4Ljc0NTU0LDMuNDk1NTRDOS4wMTA0Miw0LjAwNDQ2IDkuMTQyODYsNC41NTM1NyA5LjE0Mjg2LDUuMTQyODZaIiBzdHlsZT0iZmlsbDpyZ2IoNDUsMTM1LDE5Mik7ZmlsbC1ydWxlOm5vbnplcm87Ii8+PC9zdmc+); - background-repeat: no-repeat; -} diff --git a/server/sonar-web/src/main/js/app/utils/exposeLibraries.ts b/server/sonar-web/src/main/js/app/utils/exposeLibraries.ts index df9cd6a4b7f..df357c15153 100644 --- a/server/sonar-web/src/main/js/app/utils/exposeLibraries.ts +++ b/server/sonar-web/src/main/js/app/utils/exposeLibraries.ts @@ -23,7 +23,6 @@ import throwGlobalError from './throwGlobalError'; import addGlobalSuccessMessage from './addGlobalSuccessMessage'; import * as measures from '../../helpers/measures'; import * as request from '../../helpers/request'; -import * as icons from '../../components/icons-components/icons'; import DateFromNow from '../../components/intl/DateFromNow'; import DateFormatter from '../../components/intl/DateFormatter'; import DateTimeFormatter from '../../components/intl/DateTimeFormatter'; @@ -43,22 +42,31 @@ import Level from '../../components/ui/Level'; import { EditButton, Button, SubmitButton, ResetButtonLink } from '../../components/ui/buttons'; import DeferredSpinner from '../../components/common/DeferredSpinner'; import ReloadButton from '../../components/controls/ReloadButton'; +import QualifierIcon from '../../components/icons-components/QualifierIcon'; +import AlertErrorIcon from '../../components/icons-components/AlertErrorIcon'; +import AlertSuccessIcon from '../../components/icons-components/AlertSuccessIcon'; +import AlertWarnIcon from '../../components/icons-components/AlertWarnIcon'; +import LockIcon from '../../components/icons-components/LockIcon'; +import DropdownIcon from '../../components/icons-components/DropdownIcon'; const exposeLibraries = () => { const global = window as any; global.ReactRedux = ReactRedux; global.ReactRouter = ReactRouter; - global.SonarIcons = icons; global.SonarMeasures = measures; global.SonarRequest = { ...request, throwGlobalError, addGlobalSuccessMessage }; global.SonarComponents = { + AlertErrorIcon, + AlertSuccessIcon, + AlertWarnIcon, Button, CoverageRating, DateFormatter, DateFromNow, DateTimeFormatter, DeferredSpinner, + DropdownIcon, DuplicationsRating, EditButton, FavoriteContainer, @@ -67,7 +75,9 @@ const exposeLibraries = () => { Level, LicenseEditionSet, ListFooter, + LockIcon, Modal, + QualifierIcon, ReloadButton, ResetButtonLink, SearchBox, diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js index a4848285d9d..b4624dc821e 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js @@ -20,6 +20,7 @@ import React from 'react'; import { Link } from 'react-router'; import ReadMore from './ReadMore'; +import TagsIcon from '../../../components/icons-components/TagsIcon'; import { translate } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; @@ -52,32 +53,32 @@ export default function AboutStandards(props /*: Props */) {
  • - - + + MISRA
  • - - + + CERT
  • - - + + CWE
  • - - + + OWASP Top 10
  • - - + + SANS Top 25
  • diff --git a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx index f05af84c229..f9946715f89 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx @@ -20,6 +20,7 @@ import * as React from 'react'; import { sortBy } from 'lodash'; import { Link } from 'react-router'; +import ProjectLinkIcon from '../../../components/icons-components/ProjectLinkIcon'; import DateFromNow from '../../../components/intl/DateFromNow'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import Level from '../../../components/ui/Level'; @@ -76,7 +77,7 @@ export default function ProjectCard({ project }: Props) { rel="nofollow" target="_blank" title={link.name}> - + ))} diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx index 7d57ddf1205..3a4c6d80fe1 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import { Link } from 'react-router'; import TaskType from './TaskType'; import { Task } from '../types'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import Organization from '../../../components/shared/Organization'; import { getProjectUrl, diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx index 0bd1290d662..57473532b8a 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx @@ -23,7 +23,7 @@ import Truncated from './Truncated'; import { Component } from '../types'; import * as theme from '../../../app/theme'; import { BranchLike } from '../../../app/types'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import { getBranchLikeQuery } from '../../../helpers/branches'; function getTooltip(component: Component) { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx index 8b3978ea92b..f1b65374fcc 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx @@ -104,12 +104,8 @@ export default class RuleDetailsProfiles extends React.PureComponent - - + + {profile.parentName} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleInheritanceIcon.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleInheritanceIcon.tsx index 264d79f7cc2..6ac38d6a51e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleInheritanceIcon.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleInheritanceIcon.tsx @@ -18,27 +18,31 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import * as classNames from 'classnames'; +import * as theme from '../../../app/theme'; import { RuleInheritance } from '../../../app/types'; -import { translateWithParameters } from '../../../helpers/l10n'; interface Props { + className?: string; inheritance: RuleInheritance.Inherited | RuleInheritance.Overridden; - parentProfileName: string; - profileName: string; } -export default function RuleInheritanceIcon(props: Props) { +export default function RuleInheritanceIcon({ className, inheritance, ...other }: Props) { + const fill = inheritance === RuleInheritance.Overridden ? theme.red : theme.baseFontColor; + return ( - + + + ); } diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx index 9a406f659f7..1983c596e5f 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx @@ -21,16 +21,18 @@ import * as React from 'react'; import * as classNames from 'classnames'; import { Link } from 'react-router'; import ActivationButton from './ActivationButton'; +import RuleInheritanceIcon from './RuleInheritanceIcon'; import SimilarRulesFilter from './SimilarRulesFilter'; import { Activation, Query } from '../query'; import { Profile, deactivateRule } from '../../../api/quality-profiles'; import { Rule, RuleInheritance } from '../../../app/types'; import ConfirmButton from '../../../components/controls/ConfirmButton'; import Tooltip from '../../../components/controls/Tooltip'; -import SeverityIcon from '../../../components/shared/SeverityIcon'; +import SeverityIcon from '../../../components/icons-components/SeverityIcon'; import { Button } from '../../../components/ui/buttons'; import IssueTypeIcon from '../../../components/ui/IssueTypeIcon'; import { translate, translateWithParameters } from '../../../helpers/l10n'; +import TagsIcon from '../../../components/icons-components/TagsIcon'; interface Props { activation?: Activation; @@ -85,7 +87,10 @@ export default class RuleListItem extends React.PureComponent { selectedProfile.name, selectedProfile.parentName )}> - + )} {activation.inherit === RuleInheritance.Inherited && ( @@ -95,7 +100,10 @@ export default class RuleListItem extends React.PureComponent { selectedProfile.name, selectedProfile.parentName )}> - + )} @@ -198,9 +206,9 @@ export default class RuleListItem extends React.PureComponent { {allTags.length > 0 && ( - - - {allTags.join(', ')} + + + {allTags.join(', ')} )} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx index f7106afcc46..34c9041d05a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx @@ -23,6 +23,9 @@ import { Rule } from '../../../app/types'; import Dropdown from '../../../components/controls/Dropdown'; import { translate } from '../../../helpers/l10n'; import SeverityHelper from '../../../components/shared/SeverityHelper'; +import FilterIcon from '../../../components/icons-components/FilterIcon'; +import DropdownIcon from '../../../components/icons-components/DropdownIcon'; +import TagsIcon from '../../../components/icons-components/TagsIcon'; interface Props { onFilterChange: (changes: Partial) => void; @@ -97,8 +100,8 @@ export default class SimilarRulesFilter extends React.PureComponent { {allTags.map(tag => (
  • - - {tag} + + {tag}
  • ))} @@ -108,8 +111,8 @@ export default class SimilarRulesFilter extends React.PureComponent { }> - - + + ); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx index deb1a36043a..c403ff97449 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx @@ -21,7 +21,9 @@ import * as React from 'react'; import { uniq } from 'lodash'; import Facet, { BasicProps } from './Facet'; import { getRuleTags } from '../../../api/rules'; +import * as theme from '../../../app/theme'; import FacetFooter from '../../../components/facet/FacetFooter'; +import TagsIcon from '../../../components/icons-components/TagsIcon'; interface Props extends BasicProps { organization: string | undefined; @@ -40,7 +42,7 @@ export default class TagFacet extends React.PureComponent { renderName = (tag: string) => ( <> - + {tag} ); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/styles.css b/server/sonar-web/src/main/js/apps/coding-rules/styles.css index b553e505507..b8dac9824ec 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/styles.css +++ b/server/sonar-web/src/main/js/apps/coding-rules/styles.css @@ -192,17 +192,10 @@ } .coding-rules-detail-quality-profile-inheritance { - margin-top: 4px; font-size: var(--smallFontSize); font-weight: normal; } -.coding-rules-detail-quality-profile-inheritance i { - position: relative; - top: -1px; - font-size: var(--mediumFontSize); -} - .coding-rules-detail-quality-profiles-activation { margin-top: -3px; margin-left: 10px; @@ -275,11 +268,6 @@ textarea.coding-rules-markdown-description { font-size: var(--smallFontSize); } -.coding-rule-meta .icon-tags:before { - color: var(--secondFontColor); - font-size: var(--smallFontSize); -} - .coding-rule-activation { width: 40px; line-height: 19.5px; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.js b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.js index 3d1130b7862..5582f01e151 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.js +++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.js @@ -93,13 +93,13 @@ it('should render with branch', () => { it('should not render link to activity page for files', () => { expect( shallow() - .find('IconHistory') + .find('HistoryIcon') .exists() ).toBeTruthy(); expect( shallow() - .find('IconHistory') + .find('HistoryIcon') .exists() ).toBeFalsy(); }); diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/MeasureHeader-test.js.snap b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/MeasureHeader-test.js.snap index c9208efcfee..49f756bc4a6 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/MeasureHeader-test.js.snap +++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/MeasureHeader-test.js.snap @@ -92,7 +92,7 @@ exports[`should render correctly 1`] = ` } } > - +
@@ -191,7 +191,7 @@ exports[`should render with branch 1`] = ` } } > - + `; @@ -238,7 +238,7 @@ exports[`should work with measure without value 1`] = ` } } > - + diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx index 95d0e0dacea..1fdf6a39c56 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx @@ -69,7 +69,7 @@ import { RawQuery } from '../../../helpers/query'; import { scrollToElement } from '../../../helpers/scrolling'; import EmptySearch from '../../../components/common/EmptySearch'; import Checkbox from '../../../components/controls/Checkbox'; - +import DropdownIcon from '../../../components/icons-components/DropdownIcon'; import '../styles.css'; interface FetchIssuesPromise { @@ -821,7 +821,7 @@ export default class App extends React.PureComponent { }> ) : ( diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx index bff7ef1c391..32f8fd2bdf5 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx @@ -24,7 +24,7 @@ import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import { translate } from '../../../helpers/l10n'; import { collapsePath } from '../../../helpers/path'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx index cb998d44698..db57e1698e4 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx @@ -24,7 +24,7 @@ import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import { translate } from '../../../helpers/l10n'; import { collapsePath } from '../../../helpers/path'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ModuleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ModuleFacet.tsx index 672678258e6..9626862ec69 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ModuleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ModuleFacet.tsx @@ -24,7 +24,7 @@ import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx index 675fdb92fb0..a326a2f65e2 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx @@ -28,7 +28,7 @@ import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import FacetFooter from '../../../components/facet/FacetFooter'; import Organization from '../../../components/shared/Organization'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx index 86e876d11c5..ad563640a4f 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx @@ -24,6 +24,7 @@ import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; +import StatusHelper from '../../../components/shared/StatusHelper'; import { translate } from '../../../helpers/l10n'; interface Props { @@ -64,14 +65,6 @@ export default class StatusFacet extends React.PureComponent { return stats ? stats[status] : undefined; } - renderStatus(status: string) { - return ( - - {translate('issue.status', status)} - - ); - } - renderItem = (status: string) => { const active = this.props.statuses.includes(status); const stat = this.getStat(status); @@ -83,7 +76,7 @@ export default class StatusFacet extends React.PureComponent { halfWidth={true} key={status} loading={this.props.loading} - name={this.renderStatus(status)} + name={} onClick={this.handleItemClick} stat={formatFacetStat(stat, this.props.facetMode)} value={status} diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx index ba44ec51a29..7a2fbe66e12 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx @@ -21,12 +21,14 @@ import * as React from 'react'; import { sortBy, uniq, without } from 'lodash'; import { formatFacetStat, Query } from '../utils'; import { searchIssueTags } from '../../../api/issues'; +import * as theme from '../../../app/theme'; import { Component } from '../../../app/types'; import FacetBox from '../../../components/facet/FacetBox'; import FacetFooter from '../../../components/facet/FacetFooter'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; +import TagsIcon from '../../../components/icons-components/TagsIcon'; import { translate } from '../../../helpers/l10n'; interface Props { @@ -87,7 +89,7 @@ export default class TagFacet extends React.PureComponent { renderTag(tag: string) { return ( - + {tag} ); diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx index a2ff350334b..a5240093619 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx @@ -20,6 +20,7 @@ import * as React from 'react'; import PluginChangeLog from './PluginChangeLog'; import { Release, Update } from '../../../api/plugins'; +import EllipsisIcon from '../../../components/icons-components/EllipsisIcon'; import Dropdown from '../../../components/controls/Dropdown'; import { Button } from '../../../components/ui/buttons'; @@ -33,7 +34,9 @@ export default function PluginChangeLogButton({ release, update }: Props) { }> - ); } diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx index df497ccd8fc..bc0bca0a822 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx @@ -46,7 +46,9 @@ export default function OrganizationNavigationHeader({ organization, organizatio ))} }> - + {organization.name} diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/__snapshots__/OrganizationNavigationHeader-test.tsx.snap b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/__snapshots__/OrganizationNavigationHeader-test.tsx.snap index 626ef846617..82dd13c2a2a 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/__snapshots__/OrganizationNavigationHeader-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/__snapshots__/OrganizationNavigationHeader-test.tsx.snap @@ -52,7 +52,7 @@ exports[`renders dropdown 1`] = ` } > Foo diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.tsx index 7a3caf2ab7a..a336ee988bf 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.tsx @@ -18,10 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { isProvided, getLinkName } from '../../project-admin/links/utils'; +import { getLinkName } from '../../project-admin/links/utils'; import { ProjectLink } from '../../../app/types'; -import DetachIcon from '../../../components/icons-components/DetachIcon'; -import BugTrackerIcon from '../../../components/icons-components/BugTrackerIcon'; +import ProjectLinkIcon from '../../../components/icons-components/ProjectLinkIcon'; interface Props { link: ProjectLink; @@ -31,16 +30,9 @@ export default function MetaLink({ link }: Props) { return (
  • - {getLinkName(link)} + + {getLinkName(link)}
  • ); } - -function MetaLinkIcon({ link }: Props) { - if (link.type === 'issue') { - return ; - } - - return isProvided(link) ? : ; -} diff --git a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/__snapshots__/MetaLink-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/__snapshots__/MetaLink-test.tsx.snap index 1b37c9bfe64..553a37c7bf1 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/__snapshots__/MetaLink-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/__snapshots__/MetaLink-test.tsx.snap @@ -8,17 +8,10 @@ exports[`should expand and collapse link 1`] = ` rel="nofollow" target="_blank" > - - Foo @@ -32,17 +25,10 @@ exports[`should expand and collapse link 2`] = ` rel="nofollow" target="_blank" > - - Foo @@ -56,17 +42,10 @@ exports[`should expand and collapse link 3`] = ` rel="nofollow" target="_blank" > - - Foo @@ -80,17 +59,10 @@ exports[`should match snapshot 1`] = ` rel="nofollow" target="_blank" > - - Foo diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx index 7ef344a3b23..771e50e4292 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx @@ -29,7 +29,7 @@ import { } from '../../../api/permissions'; import { PermissionTemplate } from '../../../app/types'; import ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import { translate } from '../../../helpers/l10n'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/HistoryButtonLink.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/HistoryButtonLink.tsx index de74c2bf650..b89f1a5a309 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/HistoryButtonLink.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/HistoryButtonLink.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { HistoryIcon } from '../../../components/icons-components/icons'; +import HistoryIcon from '../../../components/icons-components/HistoryIcon'; import { getMeasureHistoryUrl } from '../../../helpers/urls'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx index 2dc04f3278b..89752754338 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx @@ -22,7 +22,7 @@ import { Link } from 'react-router'; import { max } from 'lodash'; import { SubComponent } from '../types'; import Measure from '../../../components/measure/Measure'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { formatMeasure } from '../../../helpers/measures'; import { getProjectUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/HistoryButtonLink-test.tsx.snap b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/HistoryButtonLink-test.tsx.snap index 8f25ec024e1..4b12c321e5f 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/HistoryButtonLink-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/HistoryButtonLink-test.tsx.snap @@ -16,7 +16,7 @@ exports[`renders 1`] = ` } } > - diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/FineGrainedUpdate.js b/server/sonar-web/src/main/js/apps/project-admin/key/FineGrainedUpdate.js index 563b2398dac..8d816beecb0 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/FineGrainedUpdate.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/FineGrainedUpdate.js @@ -19,7 +19,7 @@ */ import React from 'react'; import UpdateKeyForm from './UpdateKeyForm'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; export default function FineGrainedUpdate(props) { const { component, modules } = props; diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.tsx b/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.tsx index a39c7cfe903..14725ed3c59 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.tsx +++ b/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.tsx @@ -21,8 +21,7 @@ import * as React from 'react'; import { isProvided, getLinkName } from './utils'; import { ProjectLink } from '../../../app/types'; import ConfirmButton from '../../../components/controls/ConfirmButton'; -import DetachIcon from '../../../components/icons-components/DetachIcon'; -import BugTrackerIcon from '../../../components/icons-components/BugTrackerIcon'; +import ProjectLinkIcon from '../../../components/icons-components/ProjectLinkIcon'; import { Button } from '../../../components/ui/buttons'; import { translate, translateWithParameters } from '../../../helpers/l10n'; @@ -32,49 +31,30 @@ interface Props { } export default class LinkRow extends React.PureComponent { - renderIcon = (iconClassName: string) => { - if (iconClassName === 'icon-issue') { - return ( -
    - -
    - ); - } - - return ( -
    - -
    - ); - }; - renderNameForProvided = (link: ProjectLink) => { return ( -
    - {this.renderIcon(`icon-${link.type}`)} -
    -
    - {getLinkName(link)} -
    -
    - {`sonar.links.${link.type}`} -
    +
    +
    + {getLinkName(link)} +
    +
    + {`sonar.links.${link.type}`}
    ); }; renderName = (link: ProjectLink) => { - if (isProvided(link)) { - return this.renderNameForProvided(link); - } - return (
    - -
    - {link.name} -
    + + {isProvided(link) ? ( + this.renderNameForProvided(link) + ) : ( +
    + {link.name} +
    + )}
    ); }; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx index 72e658c8727..5537721739e 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx @@ -24,7 +24,7 @@ import { Project } from './utils'; import { Visibility } from '../../app/types'; import PrivateBadge from '../../components/common/PrivateBadge'; import Checkbox from '../../components/controls/Checkbox'; -import QualifierIcon from '../../components/shared/QualifierIcon'; +import QualifierIcon from '../../components/icons-components/QualifierIcon'; import DateTooltipFormatter from '../../components/intl/DateTooltipFormatter'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx index 7c82c9e6d22..6e280bbdc81 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx @@ -25,7 +25,7 @@ import { QUALIFIERS_ORDER, Project } from './utils'; import { Organization } from '../../app/types'; import Checkbox from '../../components/controls/Checkbox'; import { translate } from '../../helpers/l10n'; -import QualifierIcon from '../../components/shared/QualifierIcon'; +import QualifierIcon from '../../components/icons-components/QualifierIcon'; import HelpTooltip from '../../components/controls/HelpTooltip'; import DateInput from '../../components/controls/DateInput'; import Select from '../../components/controls/Select'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx index 3cb3c7ce586..054f9777d03 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx @@ -89,9 +89,7 @@ export default function Changelog(props: Props) { - + diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx index 5ce4b88f331..fc475311f68 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { Link } from 'react-router'; import ComparisonEmpty from './ComparisonEmpty'; -import SeverityIcon from '../../../components/shared/SeverityIcon'; +import SeverityIcon from '../../../components/icons-components/SeverityIcon'; import { translateWithParameters } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx index 4acaf357bd9..02c86c35088 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx @@ -22,7 +22,6 @@ import * as React from 'react'; import { Link } from 'react-router'; import ComparisonResults from '../ComparisonResults'; import ComparisonEmpty from '../ComparisonEmpty'; -import SeverityIcon from '../../../../components/shared/SeverityIcon'; it('should render ComparisonEmpty', () => { const output = shallow( @@ -75,8 +74,8 @@ it('should compare', () => { expect(leftDiffs.find(Link).length).toBe(1); expect(leftDiffs.find(Link).prop('to')).toHaveProperty('query', { rule_key: 'rule1' }); expect(leftDiffs.find(Link).prop('children')).toContain('rule1'); - expect(leftDiffs.find(SeverityIcon).length).toBe(1); - expect(leftDiffs.find(SeverityIcon).prop('severity')).toBe('BLOCKER'); + expect(leftDiffs.find('SeverityIcon').length).toBe(1); + expect(leftDiffs.find('SeverityIcon').prop('severity')).toBe('BLOCKER'); const rightDiffs = output.find('.js-comparison-in-right'); expect(rightDiffs.length).toBe(2); @@ -93,11 +92,11 @@ it('should compare', () => { .find(Link) .prop('children') ).toContain('rule2'); - expect(rightDiffs.at(0).find(SeverityIcon).length).toBe(1); + expect(rightDiffs.at(0).find('SeverityIcon').length).toBe(1); expect( rightDiffs .at(0) - .find(SeverityIcon) + .find('SeverityIcon') .prop('severity') ).toBe('CRITICAL'); @@ -115,7 +114,7 @@ it('should compare', () => { .at(0) .prop('children') ).toContain('rule4'); - expect(modifiedDiffs.find(SeverityIcon).length).toBe(2); + expect(modifiedDiffs.find('SeverityIcon').length).toBe(2); expect(modifiedDiffs.text()).toContain('bar'); expect(modifiedDiffs.text()).toContain('qwe'); }); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx index 7ac978ea69e..b73f69f04fc 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx @@ -22,7 +22,7 @@ import { Link } from 'react-router'; import ChangeProjectsForm from './ChangeProjectsForm'; import { Profile } from '../types'; import { getProfileProjects } from '../../../api/quality-profiles'; -import QualifierIcon from '../../../components/shared/QualifierIcon'; +import QualifierIcon from '../../../components/icons-components/QualifierIcon'; import { Button } from '../../../components/ui/buttons'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.js index e045d181f13..9a91a268bfb 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.js @@ -18,8 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import * as theme from '../../../../app/theme'; import { translate } from '../../../../helpers/l10n'; import { defaultInputPropTypes } from '../../propTypes'; +import LockIcon from '../../../../components/icons-components/LockIcon'; import { Button } from '../../../../components/ui/buttons'; export default class InputForPassword extends React.PureComponent { @@ -71,8 +73,10 @@ export default class InputForPassword extends React.PureComponent { return (
    - - + +
    ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.js index 935a500e979..f16f9086307 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.js @@ -27,7 +27,7 @@ it('should render lock icon, but no form', () => { const input = shallow( ); - expect(input.find('.icon-lock').length).toBe(1); + expect(input.find('LockIcon').length).toBe(1); expect(input.find('form').length).toBe(0); }); diff --git a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx index dd4c07d9b84..5e7c229c427 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx @@ -25,6 +25,7 @@ import Dropdown from '../../../components/controls/Dropdown'; import { EditButton, Button } from '../../../components/ui/buttons'; import { getBaseUrl } from '../../../helpers/urls'; import { translate } from '../../../helpers/l10n'; +import DropdownIcon from '../../../components/icons-components/DropdownIcon'; interface Props { canDownloadLogs: boolean; @@ -145,7 +146,7 @@ export default class PageActions extends React.PureComponent { }> )} diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap index 14a070daf60..5a77e7cd965 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap @@ -73,8 +73,8 @@ exports[`should render correctly 1`] = ` > @@ -150,8 +150,8 @@ exports[`should render correctly 2`] = ` > diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/__snapshots__/SysInfoItem-test.tsx.snap b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/__snapshots__/SysInfoItem-test.tsx.snap index 3992c45c04c..ce4b5077ba0 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/__snapshots__/SysInfoItem-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/__snapshots__/SysInfoItem-test.tsx.snap @@ -128,23 +128,33 @@ Array [ value={true} > - - + - + version="1.1" + viewBox="0 0 16 16" + width={16} + xmlSpace="preserve" + xmlnsXlink="http://www.w3.org/1999/xlink" + > + + + diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx index 25b32e6eadc..5e4d31417d9 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import * as classNames from 'classnames'; +import DropdownIcon from '../../../../components/icons-components/DropdownIcon'; import DateFormatter from '../../../../components/intl/DateFormatter'; import { SystemUpgrade } from '../../../../api/system'; import { translate } from '../../../../helpers/l10n'; @@ -57,16 +57,11 @@ export default class SystemUpgradeIntermediate extends React.PureComponent + {showMore && upgrades.map(upgrade => ( -
    +
    {formattedDate => (

    diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/__snapshots__/SystemUpgradeIntermediate-test.tsx.snap b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/__snapshots__/SystemUpgradeIntermediate-test.tsx.snap index 80a70b6f48e..ba4c67f6487 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/__snapshots__/SystemUpgradeIntermediate-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/__snapshots__/SystemUpgradeIntermediate-test.tsx.snap @@ -8,8 +8,9 @@ exports[`should display correctly 1`] = ` onClick={[Function]} > system.show_intermediate_versions -

    @@ -23,8 +24,9 @@ exports[`should display correctly 2`] = ` onClick={[Function]} > system.hide_intermediate_versions -
    { {this.renderBigMeasure(measures.sqale_index)}
    {measures.violations && - !measures.violations.value && ( + !!measures.violations.value && ( <> {typesFacet && (
    @@ -233,7 +234,7 @@ export default class MeasuresOverlay extends React.PureComponent { {tagsFacet.map(f => (
    - + {f.val} diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayTestCase.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayTestCase.tsx index 17b3e455ba0..6f2981c17c8 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayTestCase.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayTestCase.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { TestCase } from '../../../app/types'; -import TestStatusIcon from '../../shared/TestStatusIcon'; +import TestStatusIcon from '../../icons-components/TestStatusIcon'; interface Props { onClick: (testId: string) => void; diff --git a/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx b/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx index 252d26ef618..3245311d458 100644 --- a/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx +++ b/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx @@ -22,6 +22,7 @@ import * as classNames from 'classnames'; import { Link } from 'react-router'; import { LocationDescriptor } from 'history'; import Dropdown from './Dropdown'; +import DropdownIcon from '../icons-components/DropdownIcon'; import SettingsIcon from '../icons-components/SettingsIcon'; import { Button } from '../ui/buttons'; @@ -43,8 +44,8 @@ export default function ActionsDropdown(props: Props) { className={classNames('dropdown-toggle', props.toggleClassName, { 'button-small': props.small })}> - - + + ); diff --git a/server/sonar-web/src/main/js/components/controls/GlobalMessages.tsx b/server/sonar-web/src/main/js/components/controls/GlobalMessages.tsx index 95ee65b06e2..e69702cf848 100644 --- a/server/sonar-web/src/main/js/components/controls/GlobalMessages.tsx +++ b/server/sonar-web/src/main/js/components/controls/GlobalMessages.tsx @@ -19,7 +19,8 @@ */ import * as React from 'react'; import * as classNames from 'classnames'; -import { Button } from '../ui/buttons'; +import ClearIcon from '../icons-components/ClearIcon'; +import { ButtonIcon } from '../ui/buttons'; interface Message { id: string; @@ -41,11 +42,12 @@ export default class GlobalMessages extends React.PureComponent { return (
    {message.message} - + +
    ); }; diff --git a/server/sonar-web/src/main/js/components/icons-components/AlertErrorIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/AlertErrorIcon.tsx index f13ec8871b8..a5fa260a961 100644 --- a/server/sonar-web/src/main/js/components/icons-components/AlertErrorIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/AlertErrorIcon.tsx @@ -18,23 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; -export default function AlertErrorIcon({ className, fill = theme.red, size = 16 }: IconProps) { +export default function AlertErrorIcon({ className, fill = theme.red, size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/AlertSuccessIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/AlertSuccessIcon.tsx index c0eadf86144..8aafc8fba4f 100644 --- a/server/sonar-web/src/main/js/components/icons-components/AlertSuccessIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/AlertSuccessIcon.tsx @@ -18,23 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; -export default function AlertSuccessIcon({ className, fill = theme.green, size = 16 }: IconProps) { +export default function AlertSuccessIcon({ className, fill = theme.green, size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/AlertWarnIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/AlertWarnIcon.tsx index d9fbdfa21f8..3225cfbcbaf 100644 --- a/server/sonar-web/src/main/js/components/icons-components/AlertWarnIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/AlertWarnIcon.tsx @@ -18,23 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; -export default function AlertWarnIcon({ className, fill = theme.orange, size = 16 }: IconProps) { +export default function AlertWarnIcon({ className, fill = theme.orange, size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx index 9ff03913a0d..f4dae266050 100644 --- a/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import ShortLivingBranchIcon from './ShortLivingBranchIcon'; import LongLivingBranchIcon from './LongLivingBranchIcon'; import PullRequestIcon from './PullRequestIcon'; -import { IconProps } from './types'; +import { IconProps } from './Icon'; import { BranchLike } from '../../app/types'; import { isShortLivingBranch, isPullRequest } from '../../helpers/branches'; diff --git a/server/sonar-web/src/main/js/components/icons-components/BubblesIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/BubblesIcon.tsx index 786343a412c..168626ec296 100644 --- a/server/sonar-web/src/main/js/components/icons-components/BubblesIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/BubblesIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function BubblesIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function BubblesIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/BugIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/BugIcon.tsx index cc37a484d75..fee70433856 100644 --- a/server/sonar-web/src/main/js/components/icons-components/BugIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/BugIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function BugIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function BugIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/BugTrackerIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/BugTrackerIcon.tsx index f42e84aaa6e..75cb4afcce1 100644 --- a/server/sonar-web/src/main/js/components/icons-components/BugTrackerIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/BugTrackerIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function BugTrackerIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function BugTrackerIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/BulletListIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/BulletListIcon.tsx index e59d3c4d372..97e840370c5 100644 --- a/server/sonar-web/src/main/js/components/icons-components/BulletListIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/BulletListIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function BulletListIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function BulletListIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/CalendarIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/CalendarIcon.tsx index 8ad412ea309..2e3e01ddf7f 100644 --- a/server/sonar-web/src/main/js/components/icons-components/CalendarIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/CalendarIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function CalendarIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function CalendarIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ChartLegendIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ChartLegendIcon.tsx index 5b4b986adbe..8cabb7d905f 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ChartLegendIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ChartLegendIcon.tsx @@ -18,26 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function ChartLegendIcon({ - className, - fill = 'currentColor', - size = 16 -}: IconProps) { +export default function ChartLegendIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/CheckIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/CheckIcon.tsx index 0b5de3b7bb0..8482a8ee941 100644 --- a/server/sonar-web/src/main/js/components/icons-components/CheckIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/CheckIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function CheckIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function CheckIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + ; - + style={{ fill }} + /> + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ChevronDownIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ChevronDownIcon.tsx index e70784e8f26..d15b44bb6b0 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ChevronDownIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ChevronDownIcon.tsx @@ -18,26 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function ChevronDownIcon({ - className, - fill = 'currentColor', - size = 16 -}: IconProps) { +export default function ChevronDownIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + ; - + /> + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ChevronLeftIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ChevronLeftIcon.tsx index 8bfb0dc2218..86ebb675004 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ChevronLeftIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ChevronLeftIcon.tsx @@ -18,26 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function ChevronLeftIcon({ - className, - fill = 'currentColor', - size = 16 -}: IconProps) { +export default function ChevronLeftIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + ; - + /> + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ChevronRightcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ChevronRightcon.tsx index 86772ee1529..6139224a430 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ChevronRightcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ChevronRightcon.tsx @@ -18,26 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function ChevronRightIcon({ - className, - fill = 'currentColor', - size = 16 -}: IconProps) { +export default function ChevronRightIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + ; - + /> + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ChevronUpIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ChevronUpIcon.tsx index e1d105e919b..cd73db7d926 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ChevronUpIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ChevronUpIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function ChevronUpIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function ChevronUpIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + ; - + /> + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ClearIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ClearIcon.tsx index 5222dec139f..fd8556f4b2a 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ClearIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ClearIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function ClearIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function ClearIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ClockIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ClockIcon.tsx index d5da0ec03e9..2f7d8e23b52 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ClockIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ClockIcon.tsx @@ -19,22 +19,15 @@ */ import * as React from 'react'; import * as classNames from 'classnames'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; export default function ClockIcon({ className, size = 16 }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/CodeSmellIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/CodeSmellIcon.tsx index 43f1c02c7a8..db7fd1d3b39 100644 --- a/server/sonar-web/src/main/js/components/icons-components/CodeSmellIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/CodeSmellIcon.tsx @@ -18,20 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function CodeSmellIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function CodeSmellIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/CollapseIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/CollapseIcon.tsx index f1070ac740e..1e9805f061e 100644 --- a/server/sonar-web/src/main/js/components/icons-components/CollapseIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/CollapseIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function CollapseIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function CollapseIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ContinuousIntegrationIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ContinuousIntegrationIcon.tsx new file mode 100644 index 00000000000..c72dd6248c7 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/ContinuousIntegrationIcon.tsx @@ -0,0 +1,36 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; + +export default function ContinuousIntegrationIcon({ + className, + fill = 'currentColor', + size +}: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/DeleteIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/DeleteIcon.tsx index 75b8ea4e6d1..05e3eb4dc8d 100644 --- a/server/sonar-web/src/main/js/components/icons-components/DeleteIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/DeleteIcon.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ClearIcon } from './icons'; +import ClearIcon from './ClearIcon'; import * as theme from '../../app/theme'; interface Props { diff --git a/server/sonar-web/src/main/js/components/icons-components/DetachIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/DetachIcon.tsx index d7b08269119..a3ebec580fa 100644 --- a/server/sonar-web/src/main/js/components/icons-components/DetachIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/DetachIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function DetachIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function DetachIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + ; - + /> + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/DropdownIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/DropdownIcon.tsx index 3fff51c6175..50990b4f72c 100644 --- a/server/sonar-web/src/main/js/components/icons-components/DropdownIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/DropdownIcon.tsx @@ -18,24 +18,29 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function DropdownIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +interface DropdownIconProps { + turned?: boolean; +} + +export default function DropdownIcon({ + className, + fill = 'currentColor', + size = 16, + turned = false +}: IconProps & DropdownIconProps) { return ( - - - - - + width={size / 16 * 7}> + + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/EditIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/EditIcon.tsx index 3cdb3fe388a..77b35e5991a 100644 --- a/server/sonar-web/src/main/js/components/icons-components/EditIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/EditIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function EditIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function EditIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/EllipsisIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/EllipsisIcon.tsx new file mode 100644 index 00000000000..7e3cc0686c2 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/EllipsisIcon.tsx @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; + +export default function EllipsisIcon({ className, fill = 'currentColor', size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/ExpandIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ExpandIcon.tsx index 1105b7833ed..229b9b46807 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ExpandIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ExpandIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function ExpandIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function ExpandIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/FavoriteIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/FavoriteIcon.tsx index 866ca928857..5bfe0eadd37 100644 --- a/server/sonar-web/src/main/js/components/icons-components/FavoriteIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/FavoriteIcon.tsx @@ -19,32 +19,22 @@ */ import * as React from 'react'; import * as classNames from 'classnames'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; export interface Props extends IconProps { favorite: boolean; } -export default function FavoriteIcon({ - className, - favorite, - fill = theme.orange, - size = 16 -}: Props) { +export default function FavoriteIcon({ className, favorite, fill = theme.orange, size }: Props) { return ( - + size={size} + style={{ color: fill }}> - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/FilterIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/FilterIcon.tsx new file mode 100644 index 00000000000..1b0fc0d098e --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/FilterIcon.tsx @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; + +export default function FilterIcon({ className, fill = 'currentColor', size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/GroupIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/GroupIcon.tsx index ec1c9d0b820..edd86a1fea7 100644 --- a/server/sonar-web/src/main/js/components/icons-components/GroupIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/GroupIcon.tsx @@ -18,25 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; export default function GroupIcon({ className, fill = theme.gray67, size = 36 }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/HelpIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/HelpIcon.tsx index 8a2d9394501..50c7af6881b 100644 --- a/server/sonar-web/src/main/js/components/icons-components/HelpIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/HelpIcon.tsx @@ -18,24 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function HelpIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function HelpIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/HistoryIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/HistoryIcon.tsx index e607cad435a..f0b97544912 100644 --- a/server/sonar-web/src/main/js/components/icons-components/HistoryIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/HistoryIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function IconHistory({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function HistoryIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/HomeIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/HomeIcon.tsx index 2db7f50b539..fb537ba5b98 100644 --- a/server/sonar-web/src/main/js/components/icons-components/HomeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/HomeIcon.tsx @@ -19,32 +19,22 @@ */ import * as React from 'react'; import * as classNames from 'classnames'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; export interface Props extends IconProps { filled?: boolean; } -export default function HomeIcon({ - className, - fill = theme.orange, - filled = false, - size = 16 -}: Props) { +export default function HomeIcon({ className, fill = theme.orange, filled = false, size }: Props) { return ( - + size={size} + style={{ color: fill }}> - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/HouseIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/HouseIcon.tsx new file mode 100644 index 00000000000..b36952992cc --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/HouseIcon.tsx @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; + +export default function HouseIcon({ className, fill = 'currentColor', size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/Icon.tsx b/server/sonar-web/src/main/js/components/icons-components/Icon.tsx new file mode 100644 index 00000000000..40a3f9ccdaa --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/Icon.tsx @@ -0,0 +1,70 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; + +export interface IconProps { + className?: string; + fill?: string; + size?: number; +} + +interface Props { + children: React.ReactElement; + className?: string; + size?: number; + style?: React.CSSProperties; + + // try to avoid using these: + width?: number; + height?: number; + viewBox?: string; +} + +export default function Icon({ + children, + className, + size = 16, + style, + height = size, + width = size, + viewBox = '0 0 16 16', + ...other +}: Props) { + return ( + + {children} + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/LightBulbIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/LightBulbIcon.tsx new file mode 100644 index 00000000000..27d99ab4f69 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/LightBulbIcon.tsx @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; + +export default function LightBulbIcon({ className, fill = 'currentColor', size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/LinkIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/LinkIcon.tsx index 5950062776b..81846ab602e 100644 --- a/server/sonar-web/src/main/js/components/icons-components/LinkIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/LinkIcon.tsx @@ -18,24 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function LinkIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function LinkIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ListIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ListIcon.tsx index 3c85e521d83..55afd722eda 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ListIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ListIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function ListIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function ListIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/LockIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/LockIcon.tsx new file mode 100644 index 00000000000..a6dd2bd0112 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/LockIcon.tsx @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; + +export default function LockIcon({ className, fill = 'currentColor', size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/LongLivingBranchIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/LongLivingBranchIcon.tsx index fe6793ba85b..50193a76d75 100644 --- a/server/sonar-web/src/main/js/components/icons-components/LongLivingBranchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/LongLivingBranchIcon.tsx @@ -18,29 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; -export default function LongLivingBranchIcon({ - className, - fill = theme.blue, - size = 16 -}: IconProps) { +export default function LongLivingBranchIcon({ className, fill = theme.blue, size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/MinimizeIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/MinimizeIcon.tsx index 4478239ddf1..f891acbe2bf 100644 --- a/server/sonar-web/src/main/js/components/icons-components/MinimizeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/MinimizeIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function MinimizeIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function MinimizeIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/OpenCloseIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/OpenCloseIcon.tsx index a42f3285601..a3fd0dd23ab 100644 --- a/server/sonar-web/src/main/js/components/icons-components/OpenCloseIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/OpenCloseIcon.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import { IconProps } from './Icon'; import ChevronDownIcon from './ChevronDownIcon'; import ChevronRightIcon from './ChevronRightcon'; diff --git a/server/sonar-web/src/main/js/components/icons-components/PendingIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/PendingIcon.tsx index fbf7564f505..d07b45f45f9 100644 --- a/server/sonar-web/src/main/js/components/icons-components/PendingIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/PendingIcon.tsx @@ -18,25 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; -export default function PendingIcon({ className, fill = theme.gray67, size = 16 }: IconProps) { +export default function PendingIcon({ className, fill = theme.gray67, size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/PinIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/PinIcon.tsx index 3e83487feeb..7411e56edd2 100644 --- a/server/sonar-web/src/main/js/components/icons-components/PinIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/PinIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function PinIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function PinIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + ; - + /> + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/PlusCircleIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/PlusCircleIcon.tsx index eb529b71d77..f9ae7c4f614 100644 --- a/server/sonar-web/src/main/js/components/icons-components/PlusCircleIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/PlusCircleIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function PlusCircleIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function PlusCircleIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + ; - + /> + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/PlusIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/PlusIcon.tsx index 50330780a4c..4e0f9cefa82 100644 --- a/server/sonar-web/src/main/js/components/icons-components/PlusIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/PlusIcon.tsx @@ -18,19 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function PlusIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function PlusIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - - - + + + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ProjectEventIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ProjectEventIcon.tsx index 514073bf3d1..4f792b767e2 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ProjectEventIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ProjectEventIcon.tsx @@ -18,26 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import Icon, { IconProps } from './Icon'; -interface Props { - className?: string; - size?: number; -} - -export default function ProjectEventIcon({ className, size = 14 }: Props) { +export default function ProjectEventIcon({ className, fill = '#fff', size = 14 }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/ProjectLinkIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ProjectLinkIcon.tsx new file mode 100644 index 00000000000..0c5e362ade9 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/ProjectLinkIcon.tsx @@ -0,0 +1,45 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import { IconProps } from './Icon'; +import BugTrackerIcon from './BugTrackerIcon'; +import HouseIcon from './HouseIcon'; +import ContinuousIntegrationIcon from './ContinuousIntegrationIcon'; +import SCMIcon from './SCMIcon'; +import DetachIcon from './DetachIcon'; + +interface ProjectLinkIconProps { + type: string; +} + +export default function ProjectLinkIcon({ type, ...props }: IconProps & ProjectLinkIconProps) { + switch (type) { + case 'issue': + return ; + case 'homepage': + return ; + case 'ci': + return ; + case 'scm': + return ; + default: + return ; + } +} diff --git a/server/sonar-web/src/main/js/components/icons-components/PullRequestIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/PullRequestIcon.tsx index 0e7571a54dc..2d210aa9fa1 100644 --- a/server/sonar-web/src/main/js/components/icons-components/PullRequestIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/PullRequestIcon.tsx @@ -18,24 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; -export default function PullRequestIcon({ className, fill = theme.blue, size = 16 }: IconProps) { +export default function PullRequestIcon({ className, fill = theme.blue, size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.js b/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.js deleted file mode 100644 index f050ca071b4..00000000000 --- a/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.js +++ /dev/null @@ -1,122 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import React from 'react'; - -const DEFAULT_COLOR = '#2D88C0'; - -const ICONS /*: Object */ = { - dir: (color = '#F90') => ( - - ), - trk: (color = DEFAULT_COLOR) => ( - - ), - brc: (color = DEFAULT_COLOR) => ( - - - - - ), - uts: (color = DEFAULT_COLOR) => ( - - - - - ), - fil: (color = DEFAULT_COLOR) => ( - - - - - ), - lib: (color = DEFAULT_COLOR) => ( - - ), - vw: (color = DEFAULT_COLOR) => ( - - - - - ), - svw: (color = DEFAULT_COLOR) => ( - - - - - - ), - dev: (color = DEFAULT_COLOR) => ( - - ), - app: (color = '#4A9ED5') => ( - - - - - - - - - - - - ) -}; - -ICONS.pac = ICONS.dir; -ICONS.dev_prj = ICONS.trk; -ICONS.cla = ICONS.uts; - -/*:: type Props = { className?: string, color?: string, qualifier: string, size?: number }; */ - -export default function QualifierIcon({ className, color, qualifier, size = 16 } /*: Props */) { - const icon = ICONS[qualifier.toLowerCase()]; - if (!icon) { - return null; - } - - return ( - - {icon(color)} - - ); -} diff --git a/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.tsx new file mode 100644 index 00000000000..0264d83d0cb --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.tsx @@ -0,0 +1,166 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; +import * as theme from '../../app/theme'; + +const qualifierIcons: { [x: string]: (props: IconProps) => React.ReactElement } = { + app: ApplicationIcon, + brc: SubProjectIcon, + dev: DeveloperIcon, + dir: DirectoryIcon, + fil: FileIcon, + svw: SubPortfolioIcon, + trk: ProjectIcon, + uts: UnitTestIcon, + vw: PortfolioIcon, + + // deprecated: + cla: UnitTestIcon, + // eslint-disable-next-line camelcase + dev_prj: ProjectIcon, + lib: LibraryIcon, + pac: DirectoryIcon +}; + +interface QualifierIconProps { + className?: string; + qualifier: string | null | undefined; +} + +export default function QualifierIcon(props: QualifierIconProps) { + if (!props.qualifier) { + return null; + } + + const qualifier = props.qualifier.toLowerCase(); + const FoundIcon = qualifierIcons[qualifier]; + return FoundIcon ? : null; +} + +function ApplicationIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function DeveloperIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function DirectoryIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function FileIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function LibraryIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function PortfolioIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function ProjectIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function SubPortfolioIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function SubProjectIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function UnitTestIcon({ className, size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/RuleScopeIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/RuleScopeIcon.tsx index 27dcdc277e7..d2ab349753a 100644 --- a/server/sonar-web/src/main/js/components/icons-components/RuleScopeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/RuleScopeIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function RuleScopeIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function RuleScopeIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/SCMIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/SCMIcon.tsx new file mode 100644 index 00000000000..c408f56ce55 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/SCMIcon.tsx @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; + +export default function SCMIcon({ className, fill = 'currentColor', size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/SearchIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/SearchIcon.tsx index 17e4141a1aa..c4d5995c872 100644 --- a/server/sonar-web/src/main/js/components/icons-components/SearchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/SearchIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function SearchIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function SearchIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/SettingsIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/SettingsIcon.tsx index 4c14f717d3d..7aa92495d6e 100644 --- a/server/sonar-web/src/main/js/components/icons-components/SettingsIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/SettingsIcon.tsx @@ -18,24 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; export default function SettingsIcon({ className, fill = 'currentColor', size = 14 }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/SeverityIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/SeverityIcon.tsx new file mode 100644 index 00000000000..f1c96f06a4c --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/SeverityIcon.tsx @@ -0,0 +1,100 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; +import * as theme from '../../app/theme'; + +interface Props { + className?: string; + severity: string | null | undefined; +} + +const severityIcons: { [x: string]: (props: IconProps) => React.ReactElement } = { + blocker: BlockerSeverityIcon, + critical: CriticalSeverityIcon, + major: MajorSeverityIcon, + minor: MinorSeverityIcon, + info: InfoSeverityIcon +}; + +export default function SeverityIcon(props: Props) { + if (!props.severity) { + return null; + } + + const severity = props.severity.toLowerCase(); + const Icon = severityIcons[severity]; + return Icon ? : null; +} + +function BlockerSeverityIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function CriticalSeverityIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function MajorSeverityIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function MinorSeverityIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function InfoSeverityIcon({ className, size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/ShortLivingBranchIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/ShortLivingBranchIcon.tsx index 6c41adff490..a8bfd92d526 100644 --- a/server/sonar-web/src/main/js/components/icons-components/ShortLivingBranchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/ShortLivingBranchIcon.tsx @@ -18,29 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; import * as theme from '../../app/theme'; -export default function ShortLivingBranchIcon({ - className, - fill = theme.blue, - size = 16 -}: IconProps) { +export default function ShortLivingBranchIcon({ className, fill = theme.blue, size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/SortAscIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/SortAscIcon.tsx index a0824e89689..3f1fa2d0e9e 100644 --- a/server/sonar-web/src/main/js/components/icons-components/SortAscIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/SortAscIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function SortAscIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function SortAscIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/SortDescIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/SortDescIcon.tsx index 21b1c2a462d..233183ae27a 100644 --- a/server/sonar-web/src/main/js/components/icons-components/SortDescIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/SortDescIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function SortDescIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function SortDescIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/StatusIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/StatusIcon.tsx new file mode 100644 index 00000000000..62c6c7b9911 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/StatusIcon.tsx @@ -0,0 +1,96 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; +import * as theme from '../../app/theme'; + +interface Props { + className?: string; + status: string; +} + +const statusIcons: { [x: string]: (props: IconProps) => React.ReactElement } = { + open: OpenStatusIcon, + confirmed: ConfirmedStatusIcon, + reopened: ReopenedStatusIcon, + resolved: ResolvedStatusIcon, + closed: ClosedStatusIcon +}; + +export default function StatusIcon(props: Props) { + const status = props.status.toLowerCase(); + const Icon = statusIcons[status]; + return Icon ? : null; +} + +function OpenStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function ConfirmedStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function ReopenedStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function ResolvedStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function ClosedStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/TagsIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/TagsIcon.tsx new file mode 100644 index 00000000000..4abfa9db1f0 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/TagsIcon.tsx @@ -0,0 +1,32 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; + +export default function TagsIcon({ className, fill = 'currentColor', size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/TestStatusIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/TestStatusIcon.tsx new file mode 100644 index 00000000000..7930d25764a --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/TestStatusIcon.tsx @@ -0,0 +1,84 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import Icon, { IconProps } from './Icon'; +import * as theme from '../../app/theme'; + +interface Props { + className?: string; + status: string; +} + +const statusIcons: { [x: string]: (props: IconProps) => React.ReactElement } = { + ok: OkTestStatusIcon, + failure: FailureTestStatusIcon, + error: ErrorTestStatusIcon, + skipped: SkippedTestStatusIcon +}; + +export default function TestStatusIcon(props: Props) { + const status = props.status.toLowerCase(); + const Icon = statusIcons[status]; + return Icon ? : null; +} + +function OkTestStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function FailureTestStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function ErrorTestStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} + +function SkippedTestStatusIcon({ className, size }: IconProps) { + return ( + + + + ); +} diff --git a/server/sonar-web/src/main/js/components/icons-components/TreeIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/TreeIcon.tsx index db4187076ff..b5faecee735 100644 --- a/server/sonar-web/src/main/js/components/icons-components/TreeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/TreeIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function TreeIcon({ className, fill = 'currentColor', size = 16 }: IconProps) { +export default function TreeIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/TreemapIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/TreemapIcon.tsx index b14408b1132..e5133c8d84c 100644 --- a/server/sonar-web/src/main/js/components/icons-components/TreemapIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/TreemapIcon.tsx @@ -18,22 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; export default function TreemapIcon({ className, fill = 'currentColor', size = 14 }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/VulnerabilityIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/VulnerabilityIcon.tsx index 34b5f1153f0..76e78570867 100644 --- a/server/sonar-web/src/main/js/components/icons-components/VulnerabilityIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/VulnerabilityIcon.tsx @@ -18,26 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { IconProps } from './types'; +import Icon, { IconProps } from './Icon'; -export default function VulnerabilityIcon({ - className, - fill = 'currentColor', - size = 16 -}: IconProps) { +export default function VulnerabilityIcon({ className, fill = 'currentColor', size }: IconProps) { return ( - + - + ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/icons.ts b/server/sonar-web/src/main/js/components/icons-components/icons.ts deleted file mode 100644 index 5483ff8007e..00000000000 --- a/server/sonar-web/src/main/js/components/icons-components/icons.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -export { default as AlertErrorIcon } from './AlertErrorIcon'; -export { default as AlertWarnIcon } from './AlertWarnIcon'; -export { default as BranchIcon } from './BranchIcon'; -export { default as BubblesIcon } from './BubblesIcon'; -export { default as BugIcon } from './BugIcon'; -// @deprecated use EditIcon -export { default as ChangeIcon } from './EditIcon'; -export { default as ChartLegendIcon } from './ChartLegendIcon'; -export { default as CheckIcon } from './CheckIcon'; -export { default as ClearIcon } from './ClearIcon'; -// @deprecated use ClearIcon -export { default as CloseIcon } from './ClearIcon'; -export { default as CodeSmellIcon } from './CodeSmellIcon'; -// @deprecated use ClearIcon -export { default as DeleteIcon } from './DeleteIcon'; -export { default as EditIcon } from './EditIcon'; -export { default as FavoriteIcon } from './FavoriteIcon'; -export { default as HelpIcon } from './HelpIcon'; -export { default as HistoryIcon } from './HistoryIcon'; -export { default as LinkIcon } from './LinkIcon'; -export { default as ListIcon } from './ListIcon'; -export { default as LongLivingBranchIcon } from './LongLivingBranchIcon'; -export { default as OpenCloseIcon } from './OpenCloseIcon'; -export { default as PendingIcon } from './PendingIcon'; -export { default as ProjectEventIcon } from './ProjectEventIcon'; -export { default as PullRequestIcon } from './PullRequestIcon'; -export { default as QualifierIcon } from './QualifierIcon'; -export { default as ShortLivingBranchIcon } from './ShortLivingBranchIcon'; -export { default as SortAscIcon } from './SortAscIcon'; -export { default as SortDescIcon } from './SortDescIcon'; -export { default as TreeIcon } from './TreeIcon'; -export { default as TreemapIcon } from './TreemapIcon'; -export { default as VulnerabilityIcon } from './VulnerabilityIcon'; diff --git a/server/sonar-web/src/main/js/components/icons-components/types.ts b/server/sonar-web/src/main/js/components/icons-components/types.ts deleted file mode 100644 index e196f63db86..00000000000 --- a/server/sonar-web/src/main/js/components/icons-components/types.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -export interface IconProps { - className?: string; - fill?: string; - size?: number; -} diff --git a/server/sonar-web/src/main/js/components/issue/IssueView.js b/server/sonar-web/src/main/js/components/issue/IssueView.js index 0598c4f9f07..100e1942d23 100644 --- a/server/sonar-web/src/main/js/components/issue/IssueView.js +++ b/server/sonar-web/src/main/js/components/issue/IssueView.js @@ -119,10 +119,6 @@ export default class IssueView extends React.PureComponent { ))}
    )} - - - - {hasCheckbox && (
    - {translate('date')} - {translate('date')} {translate('user')} {translate('action')} {translate('rule')}
    -
      +
      • - + diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.js b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.js index 74bf39609ab..5b4e82d413b 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.js +++ b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.js @@ -20,6 +20,7 @@ // @flow import React from 'react'; import PropTypes from 'prop-types'; +import EllipsisIcon from '../../icons-components/EllipsisIcon'; import Tooltip from '../../controls/Tooltip'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Button } from '../../ui/buttons'; @@ -50,9 +51,10 @@ export default class IssueMessage extends React.PureComponent { {this.props.message} {this.props.engine && ( diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js index 781eebd1f06..b19581aea98 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js @@ -81,7 +81,7 @@ export default function IssueTitleBar(props /*: Props */) { />
        -
          +
          • - - + +
        diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueChangelog-test.js.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueChangelog-test.js.snap index 0628de785bf..7ba9bfa806c 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueChangelog-test.js.snap +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueChangelog-test.js.snap @@ -48,8 +48,8 @@ exports[`should open the popup when the button is clicked 2`] = ` date="2017-03-01T09:36:01+0100" /> -
        @@ -96,8 +96,8 @@ exports[`should render correctly 1`] = ` date="2017-03-01T09:36:01+0100" /> - diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.js.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.js.snap index 91587572e88..edda212b2f0 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.js.snap +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.js.snap @@ -7,8 +7,10 @@ exports[`should render with the message and a link to open the rule 1`] = ` Reduce the number of conditional operators (4) used in the expression `; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.js.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.js.snap index 93d4a3f72d2..47648a5f921 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.js.snap +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.js.snap @@ -19,7 +19,7 @@ exports[`should render the titlebar correctly 1`] = ` className="issue-row-meta" >
          • ( - - {tag} + + {tag} ))} diff --git a/server/sonar-web/src/main/js/components/nav/NavBarTabs.css b/server/sonar-web/src/main/js/components/nav/NavBarTabs.css index 366aaf02b49..fdd7a424799 100644 --- a/server/sonar-web/src/main/js/components/nav/NavBarTabs.css +++ b/server/sonar-web/src/main/js/components/nav/NavBarTabs.css @@ -32,7 +32,8 @@ .navbar-tabs > li > a { display: block; height: var(--controlHeight); - line-height: calc(var(--controlHeight) - 6px); + line-height: 16px; + padding-top: 2px; border-bottom: 3px solid transparent; box-sizing: border-box; color: var(--baseFontColor); diff --git a/server/sonar-web/src/main/js/components/shared/QualifierIcon.tsx b/server/sonar-web/src/main/js/components/shared/QualifierIcon.tsx deleted file mode 100644 index 3b6c0c1704f..00000000000 --- a/server/sonar-web/src/main/js/components/shared/QualifierIcon.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import * as React from 'react'; -import * as classNames from 'classnames'; - -interface Props { - className?: string; - qualifier: string | null; -} - -export default function QualifierIcon(props: Props) { - if (!props.qualifier) { - return null; - } - - const className = classNames('icon-qualifier-' + props.qualifier.toLowerCase(), props.className); - - return ; -} diff --git a/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx b/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx index 40788425b7b..bd81a6e7d53 100644 --- a/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SeverityIcon from './SeverityIcon'; +import SeverityIcon from '../icons-components/SeverityIcon'; import { translate } from '../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/components/shared/SeverityIcon.tsx b/server/sonar-web/src/main/js/components/shared/SeverityIcon.tsx deleted file mode 100644 index 38ee50884a4..00000000000 --- a/server/sonar-web/src/main/js/components/shared/SeverityIcon.tsx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import * as React from 'react'; -import * as classNames from 'classnames'; - -interface Props { - className?: string; - severity: string | null | undefined; -} - -export default function SeverityIcon(props: Props) { - if (!props.severity) { - return null; - } - return ( - - ); -} diff --git a/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx b/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx index b6921effdac..f5cd7f21dc9 100644 --- a/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import StatusIcon from './StatusIcon'; +import StatusIcon from '../icons-components/StatusIcon'; import { translate } from '../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/components/shared/StatusIcon.tsx b/server/sonar-web/src/main/js/components/shared/StatusIcon.tsx deleted file mode 100644 index d043b034406..00000000000 --- a/server/sonar-web/src/main/js/components/shared/StatusIcon.tsx +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import * as React from 'react'; -import * as classNames from 'classnames'; - -interface Props { - className?: string; - status: string; -} - -export default function StatusIcon({ className, status }: Props) { - return ; -} diff --git a/server/sonar-web/src/main/js/components/shared/TestStatusIcon.tsx b/server/sonar-web/src/main/js/components/shared/TestStatusIcon.tsx deleted file mode 100644 index c54fca5654b..00000000000 --- a/server/sonar-web/src/main/js/components/shared/TestStatusIcon.tsx +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import * as React from 'react'; -import * as classNames from 'classnames'; - -interface Props { - className?: string; - status: string; -} - -export default function TestStatusIcon({ className, status }: Props) { - return ; -} diff --git a/server/sonar-web/src/main/js/components/shared/__tests__/QualifierIcon-test.tsx b/server/sonar-web/src/main/js/components/shared/__tests__/QualifierIcon-test.tsx deleted file mode 100644 index 06169277552..00000000000 --- a/server/sonar-web/src/main/js/components/shared/__tests__/QualifierIcon-test.tsx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import * as React from 'react'; -import { shallow } from 'enzyme'; -import QualifierIcon from '../QualifierIcon'; - -it('should render icon', () => { - expect(shallow()).toMatchSnapshot(); - expect(shallow()).toMatchSnapshot(); -}); - -it('should not render icon', () => { - expect(shallow().type()).toBeNull(); -}); - -it('should render with custom class', () => { - expect(shallow()).toMatchSnapshot(); -}); diff --git a/server/sonar-web/src/main/js/components/shared/__tests__/__snapshots__/QualifierIcon-test.tsx.snap b/server/sonar-web/src/main/js/components/shared/__tests__/__snapshots__/QualifierIcon-test.tsx.snap deleted file mode 100644 index 3e1625b3e32..00000000000 --- a/server/sonar-web/src/main/js/components/shared/__tests__/__snapshots__/QualifierIcon-test.tsx.snap +++ /dev/null @@ -1,19 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should render icon 1`] = ` - -`; - -exports[`should render icon 2`] = ` - -`; - -exports[`should render with custom class 1`] = ` - -`; diff --git a/server/sonar-web/src/main/js/components/tags/TagsList.tsx b/server/sonar-web/src/main/js/components/tags/TagsList.tsx index eaf08bd4fb6..4ae39231a1b 100644 --- a/server/sonar-web/src/main/js/components/tags/TagsList.tsx +++ b/server/sonar-web/src/main/js/components/tags/TagsList.tsx @@ -19,8 +19,9 @@ */ import * as React from 'react'; import * as classNames from 'classnames'; -import './TagsList.css'; import DropdownIcon from '../icons-components/DropdownIcon'; +import TagsIcon from '../icons-components/TagsIcon'; +import './TagsList.css'; interface Props { allowUpdate?: boolean; @@ -31,9 +32,9 @@ interface Props { export default function TagsList({ allowUpdate = false, className, tags }: Props) { return ( - - {tags.join(', ')} - {allowUpdate && } + + {tags.join(', ')} + {allowUpdate && } ); } diff --git a/server/sonar-web/src/main/js/components/tags/__tests__/__snapshots__/TagsList-test.tsx.snap b/server/sonar-web/src/main/js/components/tags/__tests__/__snapshots__/TagsList-test.tsx.snap index 3ea92ee6e20..4a09b986130 100644 --- a/server/sonar-web/src/main/js/components/tags/__tests__/__snapshots__/TagsList-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tags/__tests__/__snapshots__/TagsList-test.tsx.snap @@ -5,15 +5,17 @@ exports[`should render with a caret on the right if update is allowed 1`] = ` className="tags-list" title="foo, bar" > - foo, bar - + `; @@ -22,11 +24,11 @@ exports[`should render with a list of tag 1`] = ` className="tags-list" title="foo, bar" > - foo, bar diff --git a/server/sonar-web/src/main/js/components/ui/buttons.css b/server/sonar-web/src/main/js/components/ui/buttons.css index ea2ff4b6b13..81344085756 100644 --- a/server/sonar-web/src/main/js/components/ui/buttons.css +++ b/server/sonar-web/src/main/js/components/ui/buttons.css @@ -18,8 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ .button { - display: inline-block; - vertical-align: baseline; + display: inline-flex; + align-items: center; + vertical-align: middle; height: var(--controlHeight); line-height: calc(var(--controlHeight) - 2px); padding: 0 12px; @@ -63,10 +64,6 @@ box-shadow: none !important; } -.button svg { - margin-top: calc((var(--controlHeight) - 16px - 2px) / 2); -} - /* #region .button-red */ .button-red { border-color: var(--red); @@ -133,10 +130,6 @@ transition: all 0.2s ease; } -.button-link svg { - margin-top: 0; -} - .button-link:hover { background: transparent; color: var(--blue); @@ -164,10 +157,6 @@ font-size: 11px; } -.button-small > svg { - margin-top: 2px; -} - /* #region .button-group */ .button-group { display: inline-block; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx index 8679e169731..0f18a038c89 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { ComponentDescriptor } from './context'; -import QualifierIcon from '../shared/QualifierIcon'; +import QualifierIcon from '../icons-components/QualifierIcon'; import { collapsePath } from '../../helpers/path'; interface Props { diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx index 011991dd54d..f1197e7bf13 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx @@ -25,7 +25,7 @@ import ClearIcon from '../icons-components/ClearIcon'; import CollapseIcon from '../icons-components/CollapseIcon'; import ExpandIcon from '../icons-components/ExpandIcon'; import MinimizeIcon from '../icons-components/MinimizeIcon'; -import { IconProps } from '../icons-components/types'; +import { IconProps } from '../icons-components/Icon'; export interface Props { children: React.ReactNode; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx index ac7387ce23b..3c35798f4ac 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx @@ -19,6 +19,8 @@ */ import * as React from 'react'; import { RuleDescriptor } from './context'; +import LightBulbIcon from '../icons-components/LightBulbIcon'; +import * as theme from '../../app/theme'; interface Props { limited?: boolean; @@ -29,7 +31,7 @@ export default function WorkspaceRuleTitle({ limited, rule }: Props) { const { name = '—' } = rule; return ( <> - + {limited ? {name} : name} ); diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceRuleTitle-test.tsx.snap b/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceRuleTitle-test.tsx.snap index 5ba5fc924a9..9d5ae728816 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceRuleTitle-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceRuleTitle-test.tsx.snap @@ -2,8 +2,9 @@ exports[`should render loaded rule 1`] = ` - Foo @@ -11,8 +12,9 @@ exports[`should render loaded rule 1`] = ` exports[`should render rule 1`] = ` - — diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java index fd4bad56bc4..502d17cab79 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java @@ -142,7 +142,7 @@ public abstract class ServletFilter implements Filter { public static class Builder { private static final String WILDCARD_CHAR = "*"; private static final Collection STATIC_RESOURCES = unmodifiableList(asList( - "*.css", "*.css.map", "*.ico", "*.png", "*.jpg", "*.jpeg", "*.gif", "*.svg", "*.js", "*.js.map", "*.eot", "*.ttf", "*.woff", + "*.css", "*.css.map", "*.ico", "*.png", "*.jpg", "*.jpeg", "*.gif", "*.svg", "*.js", "*.js.map", "/static/*", "/robots.txt","/favicon.ico", "/apple-touch-icon*", "/mstile*" )); diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java index 33389b6a321..84e800559ce 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java @@ -238,9 +238,6 @@ public class ServletFilterTest { "*.svg", "*.js", "*.js.map", - "*.eot", - "*.ttf", - "*.woff", "/static/*", "/robots.txt", "/favicon.ico", diff --git a/tests/src/test/java/org/sonarqube/tests/rule/RulesPageTest.java b/tests/src/test/java/org/sonarqube/tests/rule/RulesPageTest.java index c7fc21f5ccc..94b712785f0 100644 --- a/tests/src/test/java/org/sonarqube/tests/rule/RulesPageTest.java +++ b/tests/src/test/java/org/sonarqube/tests/rule/RulesPageTest.java @@ -320,9 +320,9 @@ public class RulesPageTest { QualityProfile profile = createInheritedQualityProfile(); RuleDetails ruleDetails = openRulesAsAdmin().takeRule(SAMPLE_RULE).open(); - ruleDetails.activationShouldHaveSeverity(profile.getKey(), "BLOCKER"); + ruleDetails.activationShouldHaveSeverity(profile.getKey(), "Blocker"); ruleDetails.revertActivationToParentDefinition(profile.getKey()); - ruleDetails.activationShouldHaveSeverity(profile.getKey(), "MAJOR"); + ruleDetails.activationShouldHaveSeverity(profile.getKey(), "Major"); } private RulesPage openRulesAsAdmin() {