From: Jeremy Davis Date: Fri, 8 Mar 2024 15:00:19 +0000 (+0100) Subject: SONAR-21656 Remove legacy misc.css X-Git-Tag: 10.5.0.89998~137 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a393cdca6e25aa10d23104ba9a501fa1bb8bb32b;p=sonarqube.git SONAR-21656 Remove legacy misc.css --- diff --git a/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx b/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx index 08ceb637caf..351d89f6fb1 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import styled from '@emotion/styled'; import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; import * as React from 'react'; import Favorite from '../../../../components/controls/Favorite'; @@ -61,7 +62,7 @@ export function Breadcrumb(props: Readonly) { {breadcrumbElement.name} - {isNotLast && } + {isNotLast && } ); })} @@ -70,3 +71,10 @@ export function Breadcrumb(props: Readonly) { } export default React.memo(Breadcrumb); + +const SlashSeparator = styled.span` + &:after { + content: '/'; + color: rgba(68, 68, 68, 0.3); + } +`; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx index c9398fbdc82..bc23a0d9ae0 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx @@ -17,10 +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. */ +import { Link } from '@sonarsource/echoes-react'; import { HelperHintIcon } from 'design-system'; import React from 'react'; import DocumentationTooltip from '../../../../../components/common/DocumentationTooltip'; -import Link from '../../../../../components/common/Link'; import HelpTooltip from '../../../../../components/controls/HelpTooltip'; import { translate, translateWithParameters } from '../../../../../helpers/l10n'; import { getApplicationAdminUrl } from '../../../../../helpers/urls'; @@ -54,7 +54,7 @@ export default function BranchHelpTooltip({ overlay={ <>

{translate('application.branches.help')}

-
+
{translate('application.branches.link')} diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx index 869374576b7..6d9f8045669 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import styled from '@emotion/styled'; import { ButtonSecondary, Popup, PopupPlacement, PopupZLevel } from 'design-system'; import * as React from 'react'; import EscKeydownHandler from '../../../../../components/controls/EscKeydownHandler'; @@ -67,7 +68,7 @@ export function BranchLikeNavigation(props: BranchLikeNavigationProps) { return ( <> - +
{translate('branch_like_navigation.orphan_pull_requests')} diff --git a/server/sonar-web/src/main/js/app/styles/init/misc.css b/server/sonar-web/src/main/js/app/styles/init/misc.css deleted file mode 100644 index e003b586cb9..00000000000 --- a/server/sonar-web/src/main/js/app/styles/init/misc.css +++ /dev/null @@ -1,198 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 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. - */ -.nowrap { - white-space: nowrap !important; -} - -table.nowrap td, -td.nowrap, -th.nowrap { - white-space: nowrap !important; -} - -table.hide-overflow td, -td.hide-overflow, -th.hide-overflow { - text-overflow: ellipsis; - overflow: hidden; -} - -.null-spacer-bottom { - margin-bottom: 0 !important; -} - -.spacer { - margin: 8px !important; -} - -.spacer-left { - margin-left: 8px !important; -} - -.spacer-right { - margin-right: 8px !important; -} - -.spacer-bottom { - margin-bottom: 8px !important; -} - -.spacer-top { - margin-top: 8px !important; -} - -.little-spacer { - margin: 4px !important; -} - -.little-spacer-left { - margin-left: 4px !important; -} - -.little-spacer-right { - margin-right: 4px !important; -} - -.little-spacer-bottom { - margin-bottom: 4px !important; -} - -.little-spacer-top { - margin-top: 4px !important; -} - -.padded { - padding: var(--gridSize) !important; -} - -.big-padded { - padding: calc(2 * var(--gridSize)) !important; -} - -.padded-right { - padding-right: var(--gridSize) !important; -} - -.padded-bottom { - padding-bottom: var(--gridSize) !important; -} - -.padded-left { - padding-left: var(--gridSize) !important; -} - -.big-padded-right { - padding-right: calc(2 * var(--gridSize)); -} - -td.little-spacer-left { - padding-left: 4px !important; -} - -td.little-spacer-right { - padding-right: 4px !important; -} - -td.spacer-left { - padding-left: 8px !important; -} - -td.spacer-right { - padding-right: 8px !important; -} - -td.spacer-bottom { - padding-bottom: 8px !important; -} - -td.spacer-top { - padding-top: 8px !important; -} - -.pull-left { - float: left !important; -} - -.overflow-hidden { - overflow: hidden !important; -} - -.overflow-y-auto { - overflow-y: auto !important; -} - -.width-100 { - width: 100% !important; -} - -.abs-width-100 { - width: 100px !important; -} - -.abs-width-400 { - width: 400px !important; -} - -.abs-width-600 { - width: 600px !important; -} - -.display-flex-column { - display: flex !important; - flex-direction: column; -} - -.display-flex-center { - display: flex !important; - align-items: center; -} - -.display-flex-justify-center { - display: flex !important; - justify-content: center; -} - -.display-flex-start { - display: flex !important; - align-items: flex-start !important; -} - -.display-inline-flex-center { - display: inline-flex !important; - align-items: center; -} - -.flex-1 { - flex: 1; -} - -.flex-grow { - flex-grow: 1; -} - -.slash-separator { - margin-left: 5px; - margin-right: 5px; -} - -.slash-separator:after { - content: '/'; - color: rgba(68, 68, 68, 0.3); -} diff --git a/server/sonar-web/src/main/js/app/styles/sonar.ts b/server/sonar-web/src/main/js/app/styles/sonar.ts index bd9a6735581..5aa66548f47 100644 --- a/server/sonar-web/src/main/js/app/styles/sonar.ts +++ b/server/sonar-web/src/main/js/app/styles/sonar.ts @@ -25,6 +25,5 @@ import '../../../../../public/fonts/Ubuntu/Ubuntu.css'; import './components/global-loading.css'; import './init/base.css'; -import './init/misc.css'; import './print.css'; import './style.css'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx index 679af45f6f0..821621de0ff 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx @@ -35,7 +35,7 @@ export default function Header(props: Readonly) { {translate('background_tasks.page')}

{translate('background_tasks.page.description')} - + {translate('learn_more')}

diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx index 1a5e3b3f8af..03e7e4ef504 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx @@ -120,7 +120,7 @@ export default function RuleDetails(props: Readonly) { {params.length > 0 && } {isEditable && ( -
+
{/* `templateRule` is used to get rule meta data, `customRule` is used to get parameter values */} {/* it's expected to pass the same rule to both parameters */} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx index 939f4707d69..f723b214a48 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx @@ -143,7 +143,7 @@ export class RuleDetailsIssues extends React.PureComponent { const path = getIssuesUrl({ ...DEFAULT_ISSUES_QUERY, rules: key }); const totalItem = ( - + {'('} {total} {')'} diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx index ab37446e10f..f307a7d6530 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx @@ -212,7 +212,7 @@ export default class BubbleChartView extends React.PureComponent {
{title} - +
@@ -260,7 +260,7 @@ export default class BubbleChartView extends React.PureComponent {
{colorsMetric && ( diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx index 693a42f32eb..67ec7546d9b 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx @@ -93,7 +93,7 @@ export default function Sidebar(props: Props) { {translate('component_measures.not_all_measures_are_shown')} diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx index 7f105354cdd..f9f16a25f18 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx @@ -953,10 +953,10 @@ export class App extends React.PureComponent { } return ( -
+
- ); + return ; } diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx index d25c0bd1f5a..be83012b577 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx @@ -302,7 +302,7 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone )} {
{isAvailablePlugin(plugin) && (
-

- {translate('marketplace.available_under_commercial_license')} -

+

{translate('marketplace.available_under_commercial_license')}

{plugin.homepageUrl && ( {translate('marketplace.learn_more')} @@ -95,12 +93,12 @@ export default class PluginActions extends React.PureComponent { )} {isInstalledPlugin(plugin) && (

- + {translate('marketplace.installed')}

)} {isInstalledPlugin(plugin) && plugin.updates && plugin.updates.length > 0 && ( -
+
{plugin.updates.map((update, idx) => ( - {currentTask.errorMessage} + {currentTask.errorMessage} {appState.canAdmin ? ( {translate('license.component_navigation.button', currentTask.errorType)}. diff --git a/server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx b/server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx index 90690bf1347..57ca2e0521e 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { Spinner } from '@sonarsource/echoes-react'; import { BasicSeparator, ButtonSecondary, @@ -25,7 +26,6 @@ import { FormField, IllustratedSelectionCard, InputSelect, - Spinner, SubTitle, ToggleButton, } from 'design-system'; @@ -96,7 +96,7 @@ export default function ProjectBadges(props: ProjectBadgesProps) { {translate('overview.badges.get_badge')}

{translate('overview.badges.description', qualifier)}

- +
- + {!isLoading && ( { renewToken(project); }} diff --git a/server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx b/server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx index f8f6bb8e80f..1eacae66395 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Checkbox, FlagMessage, Spinner, SubTitle } from 'design-system'; +import { Spinner } from '@sonarsource/echoes-react'; +import { Checkbox, FlagMessage, SubTitle } from 'design-system'; import * as React from 'react'; import { WithNotificationsProps, @@ -74,11 +75,11 @@ export function ProjectNotifications(props: WithNotificationsProps & Props) {
{translate('project.info.notifications')} - + {translate('notification.dispatcher.information')} - +

{translate('notifications.send_email')}

diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx index fba51f7f6db..fde87b3a979 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx @@ -70,7 +70,7 @@ function renderQualitygateOption(props: OptionProps) {
( diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx index 7f9238f9ab2..9b4128d882e 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx @@ -133,7 +133,7 @@ export default function ProjectQualityProfilesAppRenderer( <> {profile.name} {profile.isBuiltIn && ( - + )} )} diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx index 33b748c3221..5d7c9e57d97 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx @@ -36,13 +36,13 @@ export default function ProjectCreationMenuItem(props: ProjectCreationMenuItemPr } return ( {alm !== 'manual' && ( {alm} diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycBadgeTooltip.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycBadgeTooltip.tsx index f6ad7515ffd..cedae01a995 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycBadgeTooltip.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycBadgeTooltip.tsx @@ -24,7 +24,7 @@ import { translate } from '../../../helpers/l10n'; export default function CaycBadgeTooltip() { return (
-

+

{translate('quality_gates.cayc.tooltip.message')}

diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx index 393ba70e739..7912c9a159a 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx @@ -27,7 +27,7 @@ interface Props { export default function SeverityChange({ severity }: Props) { return ( -
+
{translate('quality_profiles.deprecated_severity_set_to')}{' '}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx index 25eddb7192e..42cda967548 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx @@ -240,7 +240,7 @@ export default function CreateProfileForm(props: Readonly) { onClick={handleSelectExtend} title={intl.formatMessage({ id: 'quality_profiles.creation_from_extend' })} > -

+

{intl.formatMessage({ id: 'quality_profiles.creation_from_extend_description_1' })}

@@ -252,7 +252,7 @@ export default function CreateProfileForm(props: Readonly) { onClick={handleSelectCopy} title={intl.formatMessage({ id: 'quality_profiles.creation_from_copy' })} > -

+

{intl.formatMessage({ id: 'quality_profiles.creation_from_copy_description_1' })}

diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx index 47541983381..1752f19a262 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx @@ -50,7 +50,7 @@ export default function DeleteModal({ id, onDelete, onCancel, projectCount }: De onConfirm={onDelete} > <> -

+

+ {key} ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx index 81310536cc7..e4bb23b2240 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx @@ -49,7 +49,7 @@ export default function InputForFormattedText(props: DefaultSpecializedInputProp

  • {legendItem} diff --git a/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx b/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx index 065feee2609..1fa817dd339 100644 --- a/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx +++ b/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx @@ -34,9 +34,7 @@ export default function DisableableSelectOption(props: DisableableSelectOptionPr {label} - {disabledReason !== undefined && ( - ({disabledReason}) - )} + {disabledReason !== undefined && ({disabledReason})} ) : ( diff --git a/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx b/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx index 385f6670f47..7fd645b4976 100644 --- a/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx +++ b/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx @@ -81,7 +81,7 @@ export default function DocumentationTooltip(props: DocumentationTooltipProps) { overlay={
    {title && ( -
    +
    {title}
    )} @@ -93,7 +93,7 @@ export default function DocumentationTooltip(props: DocumentationTooltipProps) {
    {links.map(({ href, label, inPlace, doc = true }, index) => ( -
    +
    {doc ? ( { if (isPermissionDefinitionGroup(permission)) { return permission.permissions.map((permission) => ( - {permission.name}: + {permission.name}: