From 9a2561c792060dde074034d9c04780bafd120de6 Mon Sep 17 00:00:00 2001 From: Taras Perun Date: Wed, 27 Mar 2024 12:04:45 +0100 Subject: [PATCH 1/3] fix ID --- src/pages/home/report/ReportActionsView.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index 1d66e9d99c22..71dd519792e0 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -133,6 +133,10 @@ function ReportActionsView({ }, [route]); const listID = useMemo(() => { + if (!reportActionID) { + // We only trigger a change of the list ID for comment linking to ensure proper positioning + return listOldID; + } isFirstLinkedActionRender.current = true; const newID = generateNewRandomInt(listOldID, 1, Number.MAX_SAFE_INTEGER); listOldID = newID; From 5724807f74bb0928cd7469c721203e1986ef9680 Mon Sep 17 00:00:00 2001 From: Taras Perun Date: Thu, 28 Mar 2024 09:53:47 +0100 Subject: [PATCH 2/3] move the comment to the top so it's more noticeable --- src/pages/home/report/ReportActionsView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index 71dd519792e0..29338cfc385e 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -132,9 +132,10 @@ function ReportActionsView({ setCurrentReportActionID(''); }, [route]); + // Change the list ID only for comment linking to get the positioning right const listID = useMemo(() => { if (!reportActionID) { - // We only trigger a change of the list ID for comment linking to ensure proper positioning + // here we avoid of using it if we're not in the Comment Linking flow return listOldID; } isFirstLinkedActionRender.current = true; From 8ec3050e6814b3cbe43e809ceeee2ce4d3b21c9d Mon Sep 17 00:00:00 2001 From: Taras Perun Date: Thu, 28 Mar 2024 12:44:46 +0100 Subject: [PATCH 3/3] update comment --- src/pages/home/report/ReportActionsView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index 29338cfc385e..40cb54ed91fd 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -135,7 +135,7 @@ function ReportActionsView({ // Change the list ID only for comment linking to get the positioning right const listID = useMemo(() => { if (!reportActionID) { - // here we avoid of using it if we're not in the Comment Linking flow + // Keep the old list ID since we're not in the Comment Linking flow return listOldID; } isFirstLinkedActionRender.current = true;