From b0c02956aa84f3e3f752aa42054e8a4601168b6b Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Thu, 10 Oct 2024 11:01:10 +0200 Subject: [PATCH] SONAR-23137 Remove success status from new code definition days input --- .../components/BranchNewCodeDefinitionSettingModal.tsx | 1 - .../components/ProjectNewCodeDefinitionSelector.tsx | 1 - .../src/main/js/apps/settings/components/NewCodeDefinition.tsx | 1 - .../new-code-definition/NewCodeDefinitionDaysOption.tsx | 3 --- .../new-code-definition/NewCodeDefinitionSelector.tsx | 3 --- 5 files changed, 9 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx index 31360afa2ad..301ede63c7f 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx @@ -185,7 +185,6 @@ export default class BranchNewCodeDefinitionSettingModal extends React.PureCompo /> void; onSelect: (selection: NewCodeDefinitionType) => void; @@ -66,7 +65,6 @@ export default function NewCodeDefinitionDaysOption(props: Props) { projectKey, updatedAt, disabled, - isChanged, isValid, onChangeDays, onSelect, @@ -133,7 +131,6 @@ export default function NewCodeDefinitionDaysOption(props: Props) { onChangeDays(e.currentTarget.value)} diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx index 535803665c5..bf09cda52eb 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx @@ -54,7 +54,6 @@ export default function NewCodeDefinitionSelector(props: Props) { const [globalNcd, setGlobalNcd] = React.useState(null); const [selectedNcdType, setSelectedNcdType] = React.useState(null); const [days, setDays] = React.useState(''); - const [isChanged, setIsChanged] = React.useState(false); React.useEffect(() => { const numberOfDays = getNumberOfDaysDefaultValue(globalNcd); @@ -75,7 +74,6 @@ export default function NewCodeDefinitionSelector(props: Props) { (newNcdType: NewCodeDefinitionType) => { if (newNcdType && newNcdType !== selectedNcdType) { setSelectedNcdType(newNcdType); - setIsChanged(true); } }, [selectedNcdType], @@ -157,7 +155,6 @@ export default function NewCodeDefinitionSelector(props: Props) { disabled={Boolean( !selectedNcdType || selectedNcdType === NewCodeDefinitionType.Inherited, )} - isChanged={isChanged} isValid={isCompliant} onChangeDays={setDays} onSelect={handleNcdChanged} -- 2.39.5