From 8f228260a3e39261e24b9ce066179627415442dc Mon Sep 17 00:00:00 2001 From: MokireddySampath <120497218+MokireddySampath@users.noreply.github.com> Date: Wed, 26 Jul 2023 20:09:41 +0530 Subject: [PATCH 1/7] Update PanelContainerComponent.tsx --- src/Explorer/Panes/PanelContainerComponent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index 7652053b4..e6e4d1ade 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -78,7 +78,7 @@ export class PanelContainerComponent extends React.Component): void => { - const targetElementDataTest = useSelectedNode.getState().findSelectedCollection().id(); + const targetElementDataTest: string = useSelectedNode.getState().findSelectedCollection().id(); const targetElement: HTMLElement = document.querySelector(`[data-test="${targetElementDataTest}"]`); if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") { ev.preventDefault(); From 140313e5e3e9743e4a46abefb3b4b21193b0fe60 Mon Sep 17 00:00:00 2001 From: MokireddySampath <120497218+MokireddySampath@users.noreply.github.com> Date: Wed, 26 Jul 2023 20:22:10 +0530 Subject: [PATCH 2/7] Update PanelContainerComponent.tsx --- src/Explorer/Panes/PanelContainerComponent.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index e6e4d1ade..6d5de0af2 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -78,15 +78,15 @@ export class PanelContainerComponent extends React.Component): void => { - const targetElementDataTest: string = useSelectedNode.getState().findSelectedCollection().id(); - const targetElement: HTMLElement = document.querySelector(`[data-test="${targetElementDataTest}"]`); + const targetElementDataTest: string | undefined = useSelectedNode.getState().findSelectedCollection().id(); + const targetElement: HTMLElement | null = document.querySelector(`[data-test="${targetElementDataTest}"]`); if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") { ev.preventDefault(); } else { useSidePanel.getState().closeSidePanel(); } if (targetElement) { - const moreButton: HTMLElement = targetElement.querySelector('[name="More"]'); + const moreButton: HTMLElement | null = targetElement.querySelector('[name="More"]'); if (moreButton) { moreButton.focus(); } From fd50580ff7b112625ea7871618616a91dc87e681 Mon Sep 17 00:00:00 2001 From: MokireddySampath <120497218+MokireddySampath@users.noreply.github.com> Date: Wed, 26 Jul 2023 20:31:35 +0530 Subject: [PATCH 3/7] Update PanelContainerComponent.tsx --- src/Explorer/Panes/PanelContainerComponent.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index 6d5de0af2..4ddc59033 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -1,5 +1,4 @@ import { IPanelProps, IRenderFunction, Panel, PanelType } from "@fluentui/react"; -import { useSelectedNode } from "Explorer/useSelectedNode"; import * as React from "react"; import { useNotificationConsole } from "../../hooks/useNotificationConsole"; import { useSidePanel } from "../../hooks/useSidePanel"; @@ -78,19 +77,11 @@ export class PanelContainerComponent extends React.Component): void => { - const targetElementDataTest: string | undefined = useSelectedNode.getState().findSelectedCollection().id(); - const targetElement: HTMLElement | null = document.querySelector(`[data-test="${targetElementDataTest}"]`); if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") { ev.preventDefault(); } else { useSidePanel.getState().closeSidePanel(); } - if (targetElement) { - const moreButton: HTMLElement | null = targetElement.querySelector('[name="More"]'); - if (moreButton) { - moreButton.focus(); - } - } }; private getPanelHeight = (): string => { From 19cf52353cedd358b4709ff18368169dd699fb9f Mon Sep 17 00:00:00 2001 From: MokireddySampath <120497218+MokireddySampath@users.noreply.github.com> Date: Wed, 26 Jul 2023 20:32:04 +0530 Subject: [PATCH 4/7] Update PanelContainerComponent.tsx --- src/Explorer/Panes/PanelContainerComponent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index 4ddc59033..3b3e59169 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -58,7 +58,7 @@ export class PanelContainerComponent extends React.Component Date: Wed, 26 Jul 2023 20:36:12 +0530 Subject: [PATCH 5/7] Update PanelContainerComponent.tsx --- src/Explorer/Panes/PanelContainerComponent.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index 3b3e59169..6d5de0af2 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -1,4 +1,5 @@ import { IPanelProps, IRenderFunction, Panel, PanelType } from "@fluentui/react"; +import { useSelectedNode } from "Explorer/useSelectedNode"; import * as React from "react"; import { useNotificationConsole } from "../../hooks/useNotificationConsole"; import { useSidePanel } from "../../hooks/useSidePanel"; @@ -58,7 +59,7 @@ export class PanelContainerComponent extends React.Component): void => { + const targetElementDataTest: string | undefined = useSelectedNode.getState().findSelectedCollection().id(); + const targetElement: HTMLElement | null = document.querySelector(`[data-test="${targetElementDataTest}"]`); if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") { ev.preventDefault(); } else { useSidePanel.getState().closeSidePanel(); } + if (targetElement) { + const moreButton: HTMLElement | null = targetElement.querySelector('[name="More"]'); + if (moreButton) { + moreButton.focus(); + } + } }; private getPanelHeight = (): string => { From ec9d56e55f8d610a3391d9ffa3566b9a64d5c473 Mon Sep 17 00:00:00 2001 From: MokireddySampath <120497218+MokireddySampath@users.noreply.github.com> Date: Wed, 26 Jul 2023 21:56:31 +0530 Subject: [PATCH 6/7] Update PanelContainerComponent.tsx --- src/Explorer/Panes/PanelContainerComponent.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index 6d5de0af2..51c3e7b29 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -78,7 +78,8 @@ export class PanelContainerComponent extends React.Component): void => { - const targetElementDataTest: string | undefined = useSelectedNode.getState().findSelectedCollection().id(); + const collection = useSelectedNode.getState().findSelectedCollection(); + const targetElementDataTest: string | undefined = collection.id(); const targetElement: HTMLElement | null = document.querySelector(`[data-test="${targetElementDataTest}"]`); if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") { ev.preventDefault(); From c727d82cddf84e08f9c54812a06966a47cfb6fe0 Mon Sep 17 00:00:00 2001 From: MokireddySampath <120497218+MokireddySampath@users.noreply.github.com> Date: Wed, 26 Jul 2023 22:56:08 +0530 Subject: [PATCH 7/7] Update PanelContainerComponent.tsx --- src/Explorer/Panes/PanelContainerComponent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index 51c3e7b29..253be3b1c 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -79,7 +79,7 @@ export class PanelContainerComponent extends React.Component): void => { const collection = useSelectedNode.getState().findSelectedCollection(); - const targetElementDataTest: string | undefined = collection.id(); + const targetElementDataTest: string = collection.id(); const targetElement: HTMLElement | null = document.querySelector(`[data-test="${targetElementDataTest}"]`); if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") { ev.preventDefault();