From 6c8fcd24fc0a84c26ef17a26cf0f898486df3d09 Mon Sep 17 00:00:00 2001 From: Caroline Jeandat Date: Fri, 7 Nov 2025 09:20:06 +0100 Subject: [PATCH 1/3] modifications cut paste --- .../network-modification-node-editor.tsx | 39 ++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) 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 7ce902a27f..849c7f4b88 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 @@ -142,6 +142,12 @@ const emptyCopiedModificationsSelection = { copyInfos: null, }; +enum TabToClean { + AllTabs, + CurrentTab, + OtherTabs, +} + const NetworkModificationNodeEditor = () => { const notificationIdList = useSelector((state: AppState) => state.notificationIdList); const studyUuid = useSelector((state: AppState) => state.studyUuid); @@ -194,7 +200,7 @@ const NetworkModificationNodeEditor = () => { console.info('message received from broadcast channel: ', event.data); isInitiatingCopyTab.current = false; if (JSON.stringify(emptyCopiedModificationsSelection) === JSON.stringify(event.data)) { - cleanClipboard(); + cleanClipboard(true, TabToClean.CurrentTab); } else { setCopiedModifications(event.data.modificationsUuids); setCopyInfos({ @@ -221,17 +227,21 @@ const NetworkModificationNodeEditor = () => { }, [broadcastChannel, snackInfo]); const cleanClipboard = useCallback( - (showSnackInfo: boolean = true) => { - setCopyInfos(null); - setCopiedModifications((oldCopiedModifications) => { - if (oldCopiedModifications.length && showSnackInfo) { - snackInfo({ - messageId: 'CopiedModificationInvalidationMessage', - }); - } - return []; - }); - if (true === isInitiatingCopyTab.current) { + (showSnackInfo: boolean = true, tab: TabToClean = TabToClean.AllTabs) => { + const isCleanCurrentTab = tab !== TabToClean.OtherTabs; + const isCleanOtherTabs = tab !== TabToClean.CurrentTab && isInitiatingCopyTab.current; + if (isCleanCurrentTab) { + setCopyInfos(null); + setCopiedModifications((oldCopiedModifications) => { + if (oldCopiedModifications.length && showSnackInfo) { + snackInfo({ + messageId: 'CopiedModificationInvalidationMessage', + }); + } + return []; + }); + } + if (isCleanOtherTabs) { broadcastChannel.postMessage(emptyCopiedModificationsSelection); isInitiatingCopyTab.current = false; } @@ -1078,7 +1088,8 @@ const NetworkModificationNodeEditor = () => { originStudyUuid: studyUuid ?? undefined, originNodeUuid: currentNode?.id, }); - }, [currentNode?.id, selectedModificationsIds, studyUuid]); + cleanClipboard(false, TabToClean.OtherTabs); + }, [cleanClipboard, currentNode?.id, selectedModificationsIds, studyUuid]); const doCopyModifications = useCallback(() => { setCopiedModifications(selectedModificationsIds()); @@ -1105,7 +1116,7 @@ const NetworkModificationNodeEditor = () => { if (copyInfos.copyType === NetworkModificationCopyType.MOVE) { copyOrMoveModifications(studyUuid, currentNode.id, copiedModifications, copyInfos) .then(() => { - cleanClipboard(false); + cleanClipboard(false, TabToClean.CurrentTab); }) .catch((errmsg) => { snackError({ From a0e38f1756d1add4558f80c5ed084b1dfe52cd86 Mon Sep 17 00:00:00 2001 From: Caroline Jeandat Date: Fri, 14 Nov 2025 14:35:57 +0100 Subject: [PATCH 2/3] harmonize copy paste behavior --- .../network-modification-node-editor.tsx | 102 +++++++++--------- .../network-modification-tree-pane.jsx | 102 +++++++++++++----- src/translations/en.json | 15 ++- src/translations/fr.json | 15 ++- 4 files changed, 145 insertions(+), 89 deletions(-) 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 849c7f4b88..2b908334da 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 @@ -142,12 +142,6 @@ const emptyCopiedModificationsSelection = { copyInfos: null, }; -enum TabToClean { - AllTabs, - CurrentTab, - OtherTabs, -} - const NetworkModificationNodeEditor = () => { const notificationIdList = useSelector((state: AppState) => state.notificationIdList); const studyUuid = useSelector((state: AppState) => state.studyUuid); @@ -199,56 +193,60 @@ const NetworkModificationNodeEditor = () => { broadcast.onmessage = (event) => { console.info('message received from broadcast channel: ', event.data); isInitiatingCopyTab.current = false; - if (JSON.stringify(emptyCopiedModificationsSelection) === JSON.stringify(event.data)) { - cleanClipboard(true, TabToClean.CurrentTab); + if (JSON.stringify(emptyCopiedModificationsSelection) === JSON.stringify(event.data.modificationsToCopy)) { + cleanCurrentTabClipboard(event.data.message); } else { - setCopiedModifications(event.data.modificationsUuids); + setCopiedModifications(event.data.modificationsToCopy.modificationsUuids); setCopyInfos({ - copyType: event.data.copyInfos.copyType, - originStudyUuid: event.data.copyInfos.originStudyUuid, - originNodeUuid: event.data.copyInfos.originNodeUuid, + copyType: event.data.modificationsToCopy.copyInfos.copyType, + originStudyUuid: event.data.modificationsToCopy.copyInfos.originStudyUuid, + originNodeUuid: event.data.modificationsToCopy.copyInfos.originNodeUuid, }); - snackInfo({ messageId: 'CopiedModificationUpdateMessageFromAnotherStudy' }); + snackInfo({ messageId: event.data.message }); } }; return broadcast; }); - useEffect(() => { - //If the tab is closed we want to invalidate the copy on all tabs because we won't able to track the node modification - window.addEventListener('beforeunload', (event) => { + const cleanCurrentTabClipboard = useCallback( + (snackInfoMessage?: string) => { + setCopyInfos(null); + setCopiedModifications((oldCopiedModifications) => { + if (oldCopiedModifications.length && snackInfoMessage) { + snackInfo({ + messageId: snackInfoMessage, + }); + } + return []; + }); + }, + [snackInfo] + ); + const cleanOtherTabsClipboard = useCallback( + (snackInfoMessage?: string) => { if (true === isInitiatingCopyTab.current) { - broadcastChannel.postMessage(emptyCopiedModificationsSelection); - snackInfo({ - messageId: 'CopiedModificationInvalidationMessageAfterTabClosure', + broadcastChannel.postMessage({ + modificationsToCopy: emptyCopiedModificationsSelection, + message: snackInfoMessage, }); - } - }); - }, [broadcastChannel, snackInfo]); - - const cleanClipboard = useCallback( - (showSnackInfo: boolean = true, tab: TabToClean = TabToClean.AllTabs) => { - const isCleanCurrentTab = tab !== TabToClean.OtherTabs; - const isCleanOtherTabs = tab !== TabToClean.CurrentTab && isInitiatingCopyTab.current; - if (isCleanCurrentTab) { - setCopyInfos(null); - setCopiedModifications((oldCopiedModifications) => { - if (oldCopiedModifications.length && showSnackInfo) { - snackInfo({ - messageId: 'CopiedModificationInvalidationMessage', - }); - } - return []; - }); - } - if (isCleanOtherTabs) { - broadcastChannel.postMessage(emptyCopiedModificationsSelection); isInitiatingCopyTab.current = false; } }, - [snackInfo, broadcastChannel] + [broadcastChannel] ); + const cleanClipboard = useCallback(() => { + cleanCurrentTabClipboard('copiedModificationsInvalidationMsg'); + cleanOtherTabsClipboard('copiedModificationsInvalidationMsgFromOtherTab'); + }, [cleanCurrentTabClipboard, cleanOtherTabsClipboard]); + + useEffect(() => { + //If the tab is closed we want to invalidate the copy on all tabs because we won't able to track the node modification + window.addEventListener('beforeunload', (event) => { + cleanOtherTabsClipboard('copiedModificationsInvalidationMsgFromTabClosure'); + }); + }, [cleanOtherTabsClipboard]); + // TODO this is not complete. // We should clean Clipboard on notifications when another user edit // a modification on a public study which is in the clipboard. @@ -1088,8 +1086,9 @@ const NetworkModificationNodeEditor = () => { originStudyUuid: studyUuid ?? undefined, originNodeUuid: currentNode?.id, }); - cleanClipboard(false, TabToClean.OtherTabs); - }, [cleanClipboard, currentNode?.id, selectedModificationsIds, studyUuid]); + isInitiatingCopyTab.current = true; + cleanOtherTabsClipboard('copiedModificationsInvalidationMsg'); + }, [cleanOtherTabsClipboard, currentNode?.id, selectedModificationsIds, studyUuid]); const doCopyModifications = useCallback(() => { setCopiedModifications(selectedModificationsIds()); @@ -1099,12 +1098,15 @@ const NetworkModificationNodeEditor = () => { originNodeUuid: currentNode?.id, }); broadcastChannel.postMessage({ - modificationsUuids: selectedModificationsIds(), - copyInfos: { - copyType: NetworkModificationCopyType.COPY, - originStudyUuid: studyUuid, - originNodeUuid: currentNode?.id, + modificationsToCopy: { + modificationsUuids: selectedModificationsIds(), + copyInfos: { + copyType: NetworkModificationCopyType.COPY, + originStudyUuid: studyUuid, + originNodeUuid: currentNode?.id, + }, }, + message: 'copiedModificationsUpdateMsg', }); isInitiatingCopyTab.current = true; }, [broadcastChannel, currentNode?.id, selectedModificationsIds, studyUuid]); @@ -1116,7 +1118,7 @@ const NetworkModificationNodeEditor = () => { if (copyInfos.copyType === NetworkModificationCopyType.MOVE) { copyOrMoveModifications(studyUuid, currentNode.id, copiedModifications, copyInfos) .then(() => { - cleanClipboard(false, TabToClean.CurrentTab); + cleanCurrentTabClipboard(); }) .catch((errmsg) => { snackError({ @@ -1132,7 +1134,7 @@ const NetworkModificationNodeEditor = () => { }); }); } - }, [copyInfos, studyUuid, currentNode?.id, copiedModifications, cleanClipboard, snackError]); + }, [copyInfos, studyUuid, currentNode?.id, copiedModifications, cleanCurrentTabClipboard, snackError]); const removeNullFields = useCallback((data: NetworkModificationData) => { let dataTemp = data; diff --git a/src/components/network-modification-tree-pane.jsx b/src/components/network-modification-tree-pane.jsx index fcc55e84c5..400c45f50c 100644 --- a/src/components/network-modification-tree-pane.jsx +++ b/src/components/network-modification-tree-pane.jsx @@ -74,19 +74,32 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid [dispatch] ); + const dispatchNoNodeSelectionForCopy = useCallback( + (snackInfoMessage = null) => { + if (nodeSelectionForCopyRef.current.nodeId && snackInfoMessage) { + snackInfo({ + messageId: snackInfoMessage, + }); + } + dispatch(setNodeSelectionForCopy(noNodeSelectionForCopy)); + }, + [dispatch, snackInfo] + ); + const [broadcastChannel] = useState(() => { const broadcast = new BroadcastChannel('nodeCopyChannel'); broadcast.onmessage = (event) => { - console.info('message received from broadcast channel'); - console.info(event.data); + console.info('message received from broadcast channel: ', event.data); isInitiatingCopyTab.current = false; - if (JSON.stringify(noNodeSelectionForCopy) === JSON.stringify(event.data)) { - dispatch(setNodeSelectionForCopy(noNodeSelectionForCopy)); - snackInfo({ - messageId: 'CopiedNodeInvalidationMessage', - }); + if (JSON.stringify(noNodeSelectionForCopy) === JSON.stringify(event.data.nodeToCopy)) { + dispatchNoNodeSelectionForCopy(event.data.message); } else { - dispatchNodeSelectionForCopy(event.data.sourceStudyUuid, event.data.nodeId, event.data.copyType); + dispatchNodeSelectionForCopy( + event.data.nodeToCopy.sourceStudyUuid, + event.data.nodeToCopy.nodeId, + event.data.nodeToCopy.copyType + ); + snackInfo({ messageId: event.data.message }); } }; return broadcast; @@ -100,7 +113,10 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid //If the tab is closed we want to invalidate the copy on all tabs because we won't able to track the node modification window.addEventListener('beforeunload', (event) => { if (true === isInitiatingCopyTab.current) { - broadcastChannel.postMessage(noNodeSelectionForCopy); + broadcastChannel.postMessage({ + nodeToCopy: noNodeSelectionForCopy, + message: 'copiedNodeInvalidationMsgFromTabClosure', + }); } }); //broadcastChannel doesn't change @@ -152,19 +168,19 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid ); const resetNodeClipboard = useCallback(() => { - dispatch(setNodeSelectionForCopy(noNodeSelectionForCopy)); - snackInfo({ - messageId: 'CopiedNodeInvalidationMessage', - }); + dispatchNoNodeSelectionForCopy('copiedNodeInvalidationMsg'); //only the tab that initiated the copy should update through the websocket, all the other tabs will get the info through broadcast if (true === isInitiatingCopyTab.current) { - broadcastChannel.postMessage(noNodeSelectionForCopy); + broadcastChannel.postMessage({ + nodeToCopy: noNodeSelectionForCopy, + message: 'copiedNodeInvalidationMsgFromOtherTab', + }); //we need to reset isInitiatingCopyTab here otherwise it won't in the current tab thus next unrelated pasting actions will reset other tabs clipboard isInitiatingCopyTab.current = false; } - }, [broadcastChannel, dispatch, snackInfo]); + }, [broadcastChannel, dispatchNoNodeSelectionForCopy]); const reorderSubtree = useCallback( (parentNodeId, orderedChildrenNodeIds) => { @@ -371,16 +387,30 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid isInitiatingCopyTab.current = true; dispatchNodeSelectionForCopy(studyUuid, nodeId, CopyType.NODE_COPY); broadcastChannel.postMessage({ - sourceStudyUuid: studyUuid, - nodeId: nodeId, - copyType: CopyType.NODE_COPY, + nodeToCopy: { + sourceStudyUuid: studyUuid, + nodeId: nodeId, + copyType: CopyType.NODE_COPY, + }, + message: 'copiedNodeUpdateMsg', }); }; const handleCutNode = (nodeId) => { - nodeId - ? dispatchNodeSelectionForCopy(studyUuid, nodeId, CopyType.NODE_CUT) - : dispatch(setNodeSelectionForCopy(noNodeSelectionForCopy)); + if (nodeId) { + dispatchNodeSelectionForCopy(studyUuid, nodeId, CopyType.NODE_CUT); + broadcastChannel.postMessage({ + nodeToCopy: noNodeSelectionForCopy, + message: 'copiedNodeInvalidationMsgFromOtherTab', + }); + } else { + dispatchNoNodeSelectionForCopy(); + broadcastChannel.postMessage({ + nodeToCopy: noNodeSelectionForCopy, + message: null, + }); + } + isInitiatingCopyTab.current = false; }; const handlePasteNode = useCallback( @@ -395,7 +425,7 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid } ); //Do not wait for the response, after the first CUT / PASTE operation, we can't paste anymore - dispatch(setNodeSelectionForCopy(noNodeSelectionForCopy)); + dispatchNoNodeSelectionForCopy(); } else if (CopyType.NODE_COPY === nodeSelectionForCopyRef.current.copyType) { copyTreeNode( nodeSelectionForCopyRef.current.sourceStudyUuid, @@ -412,7 +442,7 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid //In copy/paste, we can still paste the same node later } }, - [studyUuid, dispatch, snackError] + [studyUuid, dispatchNoNodeSelectionForCopy, snackError] ); const handleRemoveNode = useCallback( @@ -524,16 +554,30 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid isInitiatingCopyTab.current = true; dispatchNodeSelectionForCopy(studyUuid, nodeId, CopyType.SUBTREE_COPY); broadcastChannel.postMessage({ - sourceStudyUuid: studyUuid, - nodeId: nodeId, - copyType: CopyType.SUBTREE_COPY, + nodeToCopy: { + sourceStudyUuid: studyUuid, + nodeId: nodeId, + copyType: CopyType.SUBTREE_COPY, + }, + message: 'copiedNodeInvalidationMsgFromOtherTab', }); }; const handleCutSubtree = (nodeId) => { - nodeId - ? dispatchNodeSelectionForCopy(studyUuid, nodeId, CopyType.SUBTREE_CUT) - : dispatch(setNodeSelectionForCopy(noNodeSelectionForCopy)); + if (nodeId) { + dispatchNodeSelectionForCopy(studyUuid, nodeId, CopyType.SUBTREE_CUT); + broadcastChannel.postMessage({ + nodeToCopy: noNodeSelectionForCopy, + message: 'copiedNodeInvalidationMsgFromOtherTab', + }); + } else { + dispatchNoNodeSelectionForCopy(); + broadcastChannel.postMessage({ + nodeToCopy: noNodeSelectionForCopy, + message: null, + }); + } + isInitiatingCopyTab.current = false; }; const handlePasteSubtree = useCallback( diff --git a/src/translations/en.json b/src/translations/en.json index 6af3db65b6..c8304e0116 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -27,11 +27,16 @@ "moveStudyNotification": "The study has been moved from {oldStudyPath} to {studyPath}", - "CopiedNodeInvalidationMessage": "As a result of node modification, the contents of the clipboard have been deleted", - "CopiedModificationInvalidationMessage": "Following a modification of the hypothesis, the content of the clipboard has been deleted", - "CopiedModificationInvalidationMessageFromAnotherStudy": "Following a change in the modifications in another study, the content of the clipboard has been deleted", - "CopiedModificationUpdateMessageFromAnotherStudy": "As a result of copying modifications from another study, the content of the clipboard has been updated", - "CopiedModificationInvalidationMessageAfterTabClosure": "As a result of closing the tab from another study, the content of the clipboard has been deleted", + "copiedNodeInvalidationMsg": "Clipboard content cleared due to changes in nodes", + "copiedNodeInvalidationMsgFromOtherTab": "Clipboard content cleared due to changes in nodes in another tab", + "copiedNodeInvalidationMsgFromTabClosure": "Clipboard content cleared due to a tab being closed", + "copiedNodeUpdateMsg": "Clipboard content updated after copying a node in another tab", + + "copiedModificationsInvalidationMsg": "Clipboard content cleared due to changes in modifications", + "copiedModificationsInvalidationMsgFromOtherTab": "Clipboard content cleared due to changes in modifications in another tab", + "copiedModificationsInvalidationMsgFromTabClosure": "Clipboard content cleared due to a tab being closed", + "copiedModificationsUpdateMsg": "Clipboard content updated after copying modifications in another tab", + "exportNetwork": "Export the network", "export": "Export", "download.fileName": "File name", diff --git a/src/translations/fr.json b/src/translations/fr.json index cf7b88cd5e..6e7ddc42a2 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -27,11 +27,16 @@ "moveStudyNotification": "L'étude a été déplacée de {oldStudyPath} à {studyPath}", - "CopiedNodeInvalidationMessage": "Suite à modification de nœud, le contenu du presse papier a été supprimé", - "CopiedModificationInvalidationMessage": "Suite à modification d'hypothèse, le contenu du presse papier a été supprimé", - "CopiedModificationInvalidationMessageFromAnotherStudy": "Suite à un changement des modifications dans une autre étude, le contenu du presse papier a été supprimé", - "CopiedModificationUpdateMessageFromAnotherStudy": "Suite à la copie de modifications dans une autre étude, le presse papier a été modifié", - "CopiedModificationInvalidationMessageAfterTabClosure": "Suite à la fermeture de l'onglet d'une autre étude, le presse papier a été supprimé", + "copiedNodeInvalidationMsg": "Contenu du presse-papier supprimé, suite à un changement dans les noeuds", + "copiedNodeInvalidationMsgFromOtherTab": "Contenu du presse-papier supprimé, suite à un changement dans les noeuds dans un autre onglet", + "copiedNodeInvalidationMsgFromTabClosure": "Contenu du presse-papier supprimé, suite à la fermeture d'un onglet", + "copiedNodeUpdateMsg": "Contenu du presse-papier mis à jour, suite à la copie d'un noeud dans un autre onglet", + + "copiedModificationsInvalidationMsg": "Contenu du presse-papier supprimé, suite à un changement dans les modifications", + "copiedModificationsInvalidationMsgFromOtherTab": "Contenu du presse-papier supprimé, suite à un changement dans les modifications dans un autre onglet", + "copiedModificationsInvalidationMsgFromTabClosure": "Contenu du presse-papier supprimé, suite à la fermeture d'un onglet", + "copiedModificationsUpdateMsg": "Contenu du presse-papier mis à jour, suite à la copie de modifications dans un autre onglet", + "exportNetwork": "Exporter le réseau", "export": "Exporter", "download.fileName": "Nom de fichier", From d04c2e38027ff8cf572f58074fadadad7f3e1b4e Mon Sep 17 00:00:00 2001 From: Caroline Jeandat Date: Fri, 14 Nov 2025 14:45:50 +0100 Subject: [PATCH 3/3] update id name --- .../network-modification-node-editor.tsx | 4 ++-- src/components/network-modification-tree-pane.jsx | 10 +++++----- src/translations/en.json | 12 ++++++------ src/translations/fr.json | 12 ++++++------ 4 files changed, 19 insertions(+), 19 deletions(-) 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 2b908334da..4c4fb03d46 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 @@ -237,13 +237,13 @@ const NetworkModificationNodeEditor = () => { const cleanClipboard = useCallback(() => { cleanCurrentTabClipboard('copiedModificationsInvalidationMsg'); - cleanOtherTabsClipboard('copiedModificationsInvalidationMsgFromOtherTab'); + cleanOtherTabsClipboard('copiedModificationsInvalidationMsgFromOtherStudy'); }, [cleanCurrentTabClipboard, cleanOtherTabsClipboard]); useEffect(() => { //If the tab is closed we want to invalidate the copy on all tabs because we won't able to track the node modification window.addEventListener('beforeunload', (event) => { - cleanOtherTabsClipboard('copiedModificationsInvalidationMsgFromTabClosure'); + cleanOtherTabsClipboard('copiedModificationsInvalidationMsgFromStudyClosure'); }); }, [cleanOtherTabsClipboard]); diff --git a/src/components/network-modification-tree-pane.jsx b/src/components/network-modification-tree-pane.jsx index 400c45f50c..eb2539c036 100644 --- a/src/components/network-modification-tree-pane.jsx +++ b/src/components/network-modification-tree-pane.jsx @@ -115,7 +115,7 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid if (true === isInitiatingCopyTab.current) { broadcastChannel.postMessage({ nodeToCopy: noNodeSelectionForCopy, - message: 'copiedNodeInvalidationMsgFromTabClosure', + message: 'copiedNodeInvalidationMsgFromStudyClosure', }); } }); @@ -174,7 +174,7 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid if (true === isInitiatingCopyTab.current) { broadcastChannel.postMessage({ nodeToCopy: noNodeSelectionForCopy, - message: 'copiedNodeInvalidationMsgFromOtherTab', + message: 'copiedNodeInvalidationMsgFromOtherStudy', }); //we need to reset isInitiatingCopyTab here otherwise it won't in the current tab thus next unrelated pasting actions will reset other tabs clipboard @@ -401,7 +401,7 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid dispatchNodeSelectionForCopy(studyUuid, nodeId, CopyType.NODE_CUT); broadcastChannel.postMessage({ nodeToCopy: noNodeSelectionForCopy, - message: 'copiedNodeInvalidationMsgFromOtherTab', + message: 'copiedNodeInvalidationMsgFromOtherStudy', }); } else { dispatchNoNodeSelectionForCopy(); @@ -559,7 +559,7 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid nodeId: nodeId, copyType: CopyType.SUBTREE_COPY, }, - message: 'copiedNodeInvalidationMsgFromOtherTab', + message: 'copiedNodeInvalidationMsgFromOtherStudy', }); }; @@ -568,7 +568,7 @@ export const NetworkModificationTreePane = ({ studyUuid, currentRootNetworkUuid dispatchNodeSelectionForCopy(studyUuid, nodeId, CopyType.SUBTREE_CUT); broadcastChannel.postMessage({ nodeToCopy: noNodeSelectionForCopy, - message: 'copiedNodeInvalidationMsgFromOtherTab', + message: 'copiedNodeInvalidationMsgFromOtherStudy', }); } else { dispatchNoNodeSelectionForCopy(); diff --git a/src/translations/en.json b/src/translations/en.json index c8304e0116..e118632cb5 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -28,14 +28,14 @@ "moveStudyNotification": "The study has been moved from {oldStudyPath} to {studyPath}", "copiedNodeInvalidationMsg": "Clipboard content cleared due to changes in nodes", - "copiedNodeInvalidationMsgFromOtherTab": "Clipboard content cleared due to changes in nodes in another tab", - "copiedNodeInvalidationMsgFromTabClosure": "Clipboard content cleared due to a tab being closed", - "copiedNodeUpdateMsg": "Clipboard content updated after copying a node in another tab", + "copiedNodeInvalidationMsgFromOtherStudy": "Clipboard content cleared due to changes in nodes in another study", + "copiedNodeInvalidationMsgFromStudyClosure": "Clipboard content cleared due to a study being closed", + "copiedNodeUpdateMsg": "Clipboard content updated after copying a node in another study", "copiedModificationsInvalidationMsg": "Clipboard content cleared due to changes in modifications", - "copiedModificationsInvalidationMsgFromOtherTab": "Clipboard content cleared due to changes in modifications in another tab", - "copiedModificationsInvalidationMsgFromTabClosure": "Clipboard content cleared due to a tab being closed", - "copiedModificationsUpdateMsg": "Clipboard content updated after copying modifications in another tab", + "copiedModificationsInvalidationMsgFromOtherStudy": "Clipboard content cleared due to changes in modifications in another study", + "copiedModificationsInvalidationMsgFromStudyClosure": "Clipboard content cleared due to a study being closed", + "copiedModificationsUpdateMsg": "Clipboard content updated after copying modifications in another study", "exportNetwork": "Export the network", "export": "Export", diff --git a/src/translations/fr.json b/src/translations/fr.json index 6e7ddc42a2..8db6f1447e 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -28,14 +28,14 @@ "moveStudyNotification": "L'étude a été déplacée de {oldStudyPath} à {studyPath}", "copiedNodeInvalidationMsg": "Contenu du presse-papier supprimé, suite à un changement dans les noeuds", - "copiedNodeInvalidationMsgFromOtherTab": "Contenu du presse-papier supprimé, suite à un changement dans les noeuds dans un autre onglet", - "copiedNodeInvalidationMsgFromTabClosure": "Contenu du presse-papier supprimé, suite à la fermeture d'un onglet", - "copiedNodeUpdateMsg": "Contenu du presse-papier mis à jour, suite à la copie d'un noeud dans un autre onglet", + "copiedNodeInvalidationMsgFromOtherStudy": "Contenu du presse-papier supprimé, suite à un changement dans les noeuds dans une autre étude", + "copiedNodeInvalidationMsgFromStudyClosure": "Contenu du presse-papier supprimé, suite à la fermeture d'une étude", + "copiedNodeUpdateMsg": "Contenu du presse-papier mis à jour, suite à la copie d'un noeud dans une autre étude", "copiedModificationsInvalidationMsg": "Contenu du presse-papier supprimé, suite à un changement dans les modifications", - "copiedModificationsInvalidationMsgFromOtherTab": "Contenu du presse-papier supprimé, suite à un changement dans les modifications dans un autre onglet", - "copiedModificationsInvalidationMsgFromTabClosure": "Contenu du presse-papier supprimé, suite à la fermeture d'un onglet", - "copiedModificationsUpdateMsg": "Contenu du presse-papier mis à jour, suite à la copie de modifications dans un autre onglet", + "copiedModificationsInvalidationMsgFromOtherStudy": "Contenu du presse-papier supprimé, suite à un changement dans les modifications dans une autre étude", + "copiedModificationsInvalidationMsgFromStudyClosure": "Contenu du presse-papier supprimé, suite à la fermeture d'une étude", + "copiedModificationsUpdateMsg": "Contenu du presse-papier mis à jour, suite à la copie de modifications dans une autre étude", "exportNetwork": "Exporter le réseau", "export": "Exporter",