]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20814 Cleaning up css file for new code settings
authorRevanshu Paliwal <revanshu.paliwal@sonarsource.com>
Wed, 25 Oct 2023 08:31:26 +0000 (10:31 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 25 Oct 2023 20:02:59 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx
server/sonar-web/src/main/js/apps/projectNewCode/styles.css [deleted file]

index c0adff6613af34bfcb7125d8fb7100cd5448343c..7e8300109fa23cab8f5f9936951f460511d2397d 100644 (file)
@@ -199,6 +199,7 @@ export default class BranchNewCodeDefinitionSettingModal extends React.PureCompo
               referenceBranch={referenceBranch}
               selected={selectedNewCodeDefinitionType === NewCodeDefinitionType.ReferenceBranch}
               settingLevel={NewCodeDefinitionLevels.Branch}
+              inputSelectMenuPlacement="top"
             />
             {currentSetting === NewCodeDefinitionType.SpecificAnalysis && (
               <NewCodeDefinitionSettingAnalysis
index b5b6972069ca3ce847c1714fe232b1f9328c671f..067878af8bb7d7ef33219a6a48948bcfb40216c2 100644 (file)
@@ -19,7 +19,7 @@
  */
 import { Badge, FlagErrorIcon, FormField, InputSelect, SelectionCard } from 'design-system';
 import * as React from 'react';
-import { OptionProps, components } from 'react-select';
+import { MenuPlacement, OptionProps, components } from 'react-select';
 import Tooltip from '../../../components/controls/Tooltip';
 import { NewCodeDefinitionLevels } from '../../../components/new-code-definition/utils';
 import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';
@@ -38,6 +38,7 @@ export interface BaselineSettingReferenceBranchProps {
     NewCodeDefinitionLevels,
     NewCodeDefinitionLevels.NewProject | NewCodeDefinitionLevels.Global
   >;
+  inputSelectMenuPlacement?: MenuPlacement;
 }
 
 export interface BranchOption {
@@ -85,7 +86,15 @@ function renderBranchOption(props: OptionProps<BranchOption, false>) {
 export default function NewCodeDefinitionSettingReferenceBranch(
   props: Readonly<BaselineSettingReferenceBranchProps>,
 ) {
-  const { branchList, className, disabled, referenceBranch, selected, settingLevel } = props;
+  const {
+    branchList,
+    className,
+    disabled,
+    referenceBranch,
+    selected,
+    settingLevel,
+    inputSelectMenuPlacement,
+  } = props;
 
   const currentBranch = branchList.find((b) => b.value === referenceBranch) || {
     label: referenceBranch,
@@ -123,13 +132,15 @@ export default function NewCodeDefinitionSettingReferenceBranch(
               >
                 <InputSelect
                   inputId="new-code-definition-reference-branch"
-                  size="large"
+                  className="sw-w-abs-300"
+                  size="full"
                   options={branchList}
                   onChange={(option: BranchOption) => props.onChangeReferenceBranch(option.value)}
                   value={currentBranch}
                   components={{
                     Option: renderBranchOption,
                   }}
+                  menuPlacement={inputSelectMenuPlacement}
                 />
               </FormField>
             </div>
index 94934c501052f102108387df807cde26d67f0784..e0c0348e9b8bd2806d1ea695b3d2d9868073809e 100644 (file)
@@ -43,7 +43,6 @@ import { Branch, BranchLike } from '../../../types/branch-like';
 import { Feature } from '../../../types/features';
 import { NewCodeDefinitionType } from '../../../types/new-code-definition';
 import { Component } from '../../../types/types';
-import '../styles.css';
 import { getSettingValue } from '../utils';
 import AppHeader from './AppHeader';
 import BranchList from './BranchList';
diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/styles.css b/server/sonar-web/src/main/js/apps/projectNewCode/styles.css
deleted file mode 100644 (file)
index dc17c44..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2023 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.
- */
-
-.branch-baseline-selector > hr {
-  margin: 0 calc(-4 * var(--gridSize)) calc(4 * var(--gridSize));
-}
-
-.branch-baseline-setting-modal {
-  min-height: 450px;
-  display: flex;
-  flex-direction: column;
-}
-
-.branch-setting-warning {
-  background-color: var(--alertBackgroundWarning) !important;
-}
-
-.project-activity-event-icon.VERSION {
-  color: var(--blue);
-}
-
-.project-activity-event-icon.QUALITY_GATE {
-  color: var(--purple);
-}
-
-.project-activity-event-icon.QUALITY_PROFILE {
-  color: #cccccc;
-}
-
-.project-activity-event-icon.DEFINITION_CHANGE {
-  color: #33a759;
-}
-
-.project-activity-event-icon.OTHER {
-  color: #442d1b;
-}