From 573fee337cb2ce215bf02c0c6f23d6c424049816 Mon Sep 17 00:00:00 2001 From: Etienne LESOT Date: Wed, 26 Nov 2025 14:02:56 +0100 Subject: [PATCH 1/2] clean and fix activePowerControl creation Signed-off-by: Etienne LESOT --- .../active-power-control-form.tsx | 14 ++++++++++++-- .../generator/creation/generator-creation-form.tsx | 4 +--- src/translations/en.json | 3 ++- src/translations/fr.json | 5 +++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/dialogs/active-power-control/active-power-control-form.tsx b/src/components/dialogs/active-power-control/active-power-control-form.tsx index f7dcf613c9..efa713a702 100644 --- a/src/components/dialogs/active-power-control/active-power-control-form.tsx +++ b/src/components/dialogs/active-power-control/active-power-control-form.tsx @@ -12,9 +12,10 @@ import { useMemo } from 'react'; import { FloatInput, SwitchInput } from '@gridsuite/commons-ui'; import { FormattedMessage, useIntl } from 'react-intl'; import CheckboxNullableInput from 'components/utils/rhf-inputs/boolean-nullable-input'; -import { Box } from '@mui/material'; +import { Box, Tooltip } from '@mui/material'; import GridItem from '../commons/grid-item'; import { ActivePowerControlInfos } from './active-power-control.type'; +import { InfoOutlined } from '@mui/icons-material'; export interface ActivePowerControlFormProps { isEquipmentModification?: boolean; @@ -60,12 +61,20 @@ export function ActivePowerControlForm({ ); + const descriptionTooltip = useMemo( + () => ( + + + + ), + [intl] + ); + return ( <> {isEquipmentModification ? ( @@ -79,6 +88,7 @@ export function ActivePowerControlForm({ {frequencyRegulationField} )} {droopField} + {descriptionTooltip} ); } diff --git a/src/components/dialogs/network-modifications/generator/creation/generator-creation-form.tsx b/src/components/dialogs/network-modifications/generator/creation/generator-creation-form.tsx index 2030d6d052..3f2037f5e1 100644 --- a/src/components/dialogs/network-modifications/generator/creation/generator-creation-form.tsx +++ b/src/components/dialogs/network-modifications/generator/creation/generator-creation-form.tsx @@ -166,9 +166,7 @@ export default function GeneratorCreationForm({ {/* Short Circuit part */} - - - + {/* Cost of start part */} diff --git a/src/translations/en.json b/src/translations/en.json index 1bd4f233c1..6ae44be988 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1671,5 +1671,6 @@ "manageWorkspaces": "Manage workspaces", "window": "window", "windows": "windows", - "reset": "Reset" + "reset": "Reset", + "activePowerControlTooltip": "Slack bus active power repartition key: maxP/droop, default drrop = 4 (used if balanceType is PROPORTIONAL_TO_GENERATION_P_MAX)" } diff --git a/src/translations/fr.json b/src/translations/fr.json index bf718befe1..5b1b1d0eee 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -708,7 +708,7 @@ "stepUpTransformerX": "Réactance du transformateur (Ω)", "TransformerReactanceForm": "Réactance du transformateur", "FrequencyRegulation": "Compensation", - "Droop": "Participation", + "Droop": "Statisme", "PlannedActivePowerSetPointForm": "Puissance imposée", "plannedActivePowerSetPoint": "P imposée (MW)", "MarginalCost": "Coût de démarrage", @@ -1665,5 +1665,6 @@ "renameWorkspace": "Renommer l'espace de travail", "workspaceName": "Nom de l'espace de travail", "manageWorkspaces": "Gérer les espaces de travail", - "reset": "Réinitialiser" + "reset": "Réinitialiser", + "activePowerControlTooltip": "Clé de distribution de la puissance au nœud bilan : maxP/Statisme, statisme par défaut = 4 (valable pour le mode compensation proportionnel à la puissance maximale des groupes)" } From 9bdb74c52041be51fef9e6480dff7cd282241734 Mon Sep 17 00:00:00 2001 From: Etienne LESOT Date: Wed, 26 Nov 2025 14:13:54 +0100 Subject: [PATCH 2/2] fix sonar Signed-off-by: Etienne LESOT --- .../dialogs/active-power-control/active-power-control-form.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/dialogs/active-power-control/active-power-control-form.tsx b/src/components/dialogs/active-power-control/active-power-control-form.tsx index efa713a702..916c43a52f 100644 --- a/src/components/dialogs/active-power-control/active-power-control-form.tsx +++ b/src/components/dialogs/active-power-control/active-power-control-form.tsx @@ -5,7 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { percentageTextField } from '../dialog-utils'; import { useWatch } from 'react-hook-form'; import { DROOP, FREQUENCY_REGULATION } from 'components/utils/field-constants'; import { useMemo } from 'react';