referenceBranch={referenceBranch}
selected={selectedNewCodeDefinitionType === NewCodeDefinitionType.ReferenceBranch}
settingLevel={NewCodeDefinitionLevels.Branch}
+ inputSelectMenuPlacement="top"
/>
{currentSetting === NewCodeDefinitionType.SpecificAnalysis && (
<NewCodeDefinitionSettingAnalysis
*/
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';
NewCodeDefinitionLevels,
NewCodeDefinitionLevels.NewProject | NewCodeDefinitionLevels.Global
>;
+ inputSelectMenuPlacement?: MenuPlacement;
}
export interface BranchOption {
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,
>
<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>
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';
+++ /dev/null
-/*
- * 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;
-}