diff --git a/src/components/graph/menus/network-modifications/network-modification-node-editor.tsx b/src/components/graph/menus/network-modifications/network-modification-node-editor.tsx index a1fea8ff9f..33d780ef9d 100644 --- a/src/components/graph/menus/network-modifications/network-modification-node-editor.tsx +++ b/src/components/graph/menus/network-modifications/network-modification-node-editor.tsx @@ -1284,7 +1284,7 @@ const NetworkModificationNodeEditor = () => { - }> + }> [] => { const tagMinSizes = rootNetworks.map((rootNetwork) => computeTagMinSize(rootNetwork.tag ?? '')); const sharedSize = Math.max(Math.min(...tagMinSizes), 56); + const currentRootNetworkTag = rootNetworks.find((item) => item.rootNetworkUuid === currentRootNetworkUuid)?.tag; return rootNetworks.map((rootNetwork, index) => { const rootNetworkUuid = rootNetwork.rootNetworkUuid; @@ -146,9 +148,18 @@ export const createRootNetworksColumns = ( header: () => isCurrentRootNetwork && modificationsCount >= 1 ? ( - - - + + } + > + + + + ) : null, cell: ({ row }) => ( diff --git a/src/components/graph/menus/network-modifications/network-modification-table/renderers/description-cell.tsx b/src/components/graph/menus/network-modifications/network-modification-table/renderers/description-cell.tsx index 4e39b3401e..702d01dd1f 100644 --- a/src/components/graph/menus/network-modifications/network-modification-table/renderers/description-cell.tsx +++ b/src/components/graph/menus/network-modifications/network-modification-table/renderers/description-cell.tsx @@ -13,6 +13,7 @@ import { useIsAnyNodeBuilding } from '../../../../../utils/is-any-node-building- import { createEditDescriptionStyle } from '../styles'; import { setModificationMetadata } from '../../../../../../services/study/network-modifications'; import { AppState } from '../../../../../../redux/reducer.type'; +import { FormattedMessage } from 'react-intl'; const DescriptionCell: FunctionComponent<{ data: NetworkModificationMetadata }> = (props) => { const { data } = props; @@ -59,14 +60,16 @@ const DescriptionCell: FunctionComponent<{ data: NetworkModificationMetadata }> updateElement={updateModification} /> )} - - - - + } arrow placement="right"> + + + + + ); diff --git a/src/components/graph/menus/network-modifications/network-modification-table/renderers/switch-cell.tsx b/src/components/graph/menus/network-modifications/network-modification-table/renderers/switch-cell.tsx index 7ddd7b67c4..53448d46a0 100644 --- a/src/components/graph/menus/network-modifications/network-modification-table/renderers/switch-cell.tsx +++ b/src/components/graph/menus/network-modifications/network-modification-table/renderers/switch-cell.tsx @@ -71,7 +71,10 @@ const SwitchCell: FunctionComponent = (props) => { }, [modificationUuid, updateModification, setModifications]); return ( - } arrow> + } + arrow + > ( data-row-id={row.original.uuid} sx={mergeSx(styles.tableRow, createRowSx(isHighlighted, snapshot.isDragging, virtualRow))} > - {row.getVisibleCells().map((cell) => ( - handleCellClickCallback(cell.column.id)} - {...(cell.column.id === BASE_MODIFICATION_TABLE_COLUMNS.DRAG_HANDLE.id - ? provided.dragHandleProps - : undefined)} - > - {flexRender(cell.column.columnDef.cell, cell.getContext())} - - ))} + {row.getVisibleCells().map((cell) => { + const isDragHandle = cell.column.id === BASE_MODIFICATION_TABLE_COLUMNS.DRAG_HANDLE.id; + const isCheckboxColumn = cell.column.id === BASE_MODIFICATION_TABLE_COLUMNS.SELECT.id; + const cellContent = flexRender(cell.column.columnDef.cell, cell.getContext()); + // Tooltip for drag + if (isDragHandle) { + return ( + + } arrow> + {cellContent} + + + ); + } + + // Tooltip for checkbox + if (isCheckboxColumn) { + return ( + handleCellClickCallback(cell.column.id)} + > + + } + arrow + > + {cellContent} + + + ); + } + + return ( + handleCellClickCallback(cell.column.id)} + {...(cell.column.id === BASE_MODIFICATION_TABLE_COLUMNS.DRAG_HANDLE.id + ? provided.dragHandleProps + : undefined)} + > + {cellContent} + + ); + })} ); }} diff --git a/src/translations/en.json b/src/translations/en.json index 969be33741..becad60d7b 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -8,9 +8,7 @@ "button.delete": "Delete", "button.continue": "Continue", - "filter": "Filter", - "enable": "Enable", - "disable": "Disable", + "filter": "Filter", "deleteStudy": "Delete Study", "studyNameDidNotMatchMsg": "The given study name did not match with ", @@ -1751,5 +1749,13 @@ "Reload": "Reload", "CopyError": "Copy Error", "Copied": "Copied", - "downloadNetworkModifications" : "Download modifications" -} + "downloadNetworkModifications" : "Download modifications", + "moveToTrash": "Move to trash", + "visualizedRootNetwork": "Visualized root network : {tag}", + "addDescription" : "Add description", + "activateModification" : "Activate network modification", + "deactivateModification" : "Deactivate network modification", + "deselectModification": "Deselect modification", + "selectModification": "Select modification", + "moveModification": "Move modification" +} \ No newline at end of file diff --git a/src/translations/fr.json b/src/translations/fr.json index eb39fc506c..96e624bc2f 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -8,9 +8,7 @@ "button.delete": "Supprimer", "button.continue": "Continuer", - "filter": "Filtre", - "enable": "Activer", - "disable": "Désactiver", + "filter": "Filtre", "deleteStudy": "Supprimer l'étude", "studyNameDidNotMatchMsg": "Le nom d'étude donné ne correspond pas à ", @@ -1744,5 +1742,13 @@ "Reload": "Recharger", "CopyError": "Copier l'erreur", "Copied": "Copiée", - "downloadNetworkModifications" : "Télécharger les modifications" -} + "downloadNetworkModifications" : "Télécharger les modifications", + "moveToTrash": "Mettre à la corbeille", + "visualizedRootNetwork": "Réseau racine visualisé : {tag}", + "addDescription" : "Ajouter une description", + "activateModification" : "Activer la modification réseau", + "deactivateModification" : "Désactiver la modification réseau", + "deselectModification": "Désélectionner la modification" , + "selectModification": "Sélectionner la modification", + "moveModification": "Déplacer la modification" + }