This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new d0ffe9af7c fix(dashboard): Chart menu disable is fixed on 
chart-fullscreen in issue #25992 (#26410)
d0ffe9af7c is described below

commit d0ffe9af7c802b2a996e3b2029838eedb93aa03b
Author: Siva Sathyaseelan <[email protected]>
AuthorDate: Thu Jan 4 20:03:07 2024 +0530

    fix(dashboard): Chart menu disable is fixed on chart-fullscreen in issue 
#25992 (#26410)
---
 superset-frontend/src/components/Dropdown/index.tsx               | 8 +-------
 .../src/dashboard/components/SliceHeaderControls/index.tsx        | 7 +++++++
 .../features/reports/ReportModal/HeaderReportDropdown/index.tsx   | 7 +++++++
 3 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/superset-frontend/src/components/Dropdown/index.tsx 
b/superset-frontend/src/components/Dropdown/index.tsx
index c40f479579..1e2e03ceb2 100644
--- a/superset-frontend/src/components/Dropdown/index.tsx
+++ b/superset-frontend/src/components/Dropdown/index.tsx
@@ -104,12 +104,6 @@ interface ExtendedDropDownProps extends DropDownProps {
   ref?: RefObject<HTMLDivElement>;
 }
 
-// @z-index-below-dashboard-header (100) - 1 = 99
 export const NoAnimationDropdown = (
   props: ExtendedDropDownProps & { children?: React.ReactNode },
-) => (
-  <AntdDropdown
-    overlayStyle={{ zIndex: 99, animationDuration: '0s' }}
-    {...props}
-  />
-);
+) => <AntdDropdown overlayStyle={props.overlayStyle} {...props} />;
diff --git 
a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx 
b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
index 287d83692f..17d5bdc83e 100644
--- a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
+++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
@@ -373,6 +373,12 @@ const SliceHeaderControls = (props: 
SliceHeaderControlsPropsWithRouter) => {
     ? t('Exit fullscreen')
     : t('Enter fullscreen');
 
+  // @z-index-below-dashboard-header (100) - 1 = 99 for !isFullSize and 101 
for isFullSize
+  const dropdownOverlayStyle = {
+    zIndex: isFullSize ? 101 : 99,
+    animationDuration: '0s',
+  };
+
   const menu = (
     <Menu
       onClick={handleMenuClick}
@@ -541,6 +547,7 @@ const SliceHeaderControls = (props: 
SliceHeaderControlsPropsWithRouter) => {
       )}
       <NoAnimationDropdown
         overlay={menu}
+        overlayStyle={dropdownOverlayStyle}
         trigger={['click']}
         placement="bottomRight"
       >
diff --git 
a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx
 
b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx
index b38d44a710..84d19bae69 100644
--- 
a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx
+++ 
b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx
@@ -191,6 +191,12 @@ export default function HeaderReportDropDown({
 
   const showReportSubMenu = report && setShowReportSubMenu && canAddReports();
 
+  // @z-index-below-dashboard-header (100) - 1 = 99
+  const dropdownOverlayStyle = {
+    zIndex: 99,
+    animationDuration: '0s',
+  };
+
   useEffect(() => {
     if (showReportSubMenu) {
       setShowReportSubMenu(true);
@@ -288,6 +294,7 @@ export default function HeaderReportDropDown({
       <>
         <NoAnimationDropdown
           overlay={menu()}
+          overlayStyle={dropdownOverlayStyle}
           trigger={['click']}
           getPopupContainer={(triggerNode: any) =>
             triggerNode.closest('.action-button')

Reply via email to