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

enzomartellucci 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 53b9045943 chore(DatabaseModal): simplify collapsible logic for extra 
extension section (#36118)
53b9045943 is described below

commit 53b90459437ae59730440335a734accffb04eaa9
Author: Enzo Martellucci <[email protected]>
AuthorDate: Tue Nov 18 15:55:16 2025 +0100

    chore(DatabaseModal): simplify collapsible logic for extra extension 
section (#36118)
---
 .../databases/DatabaseModal/ExtraOptions.test.tsx       | 17 +++++++++++++++++
 .../features/databases/DatabaseModal/ExtraOptions.tsx   |  6 +++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git 
a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx 
b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx
index 0810f53d0a..590b4c9703 100644
--- 
a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx
+++ 
b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx
@@ -220,4 +220,21 @@ describe('ExtraOptions Component', () => {
     );
     expect(sqlLabTab).toHaveAttribute('aria-expanded', 'false');
   });
+
+  test('all collapse panels should expand when clicking anywhere on the 
header', () => {
+    renderComponent();
+    const allPanelTabs = screen.getAllByRole('tab');
+    expect(allPanelTabs.length).toBeGreaterThanOrEqual(4); // At least 4 main 
panels
+
+    allPanelTabs.forEach(panelTab => {
+      // Initially should be collapsed
+      expect(panelTab).toHaveAttribute('aria-expanded', 'false');
+      // Click on the panel tab (entire header should be clickable)
+      fireEvent.click(panelTab);
+      expect(panelTab).toHaveAttribute('aria-expanded', 'true');
+      fireEvent.click(panelTab);
+      // Panel should collapse back
+      expect(panelTab).toHaveAttribute('aria-expanded', 'false');
+    });
+  });
 });
diff --git 
a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx 
b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx
index df57bf2eba..b2c6c9398e 100644
--- a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx
+++ b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx
@@ -613,9 +613,9 @@ const ExtraOptions = ({
           ? [
               {
                 key: extraExtension?.title,
-                collapsible: extraExtension.enabled?.()
-                  ? ('icon' as const)
-                  : ('disabled' as const),
+                ...(extraExtension.enabled?.()
+                  ? {}
+                  : { collapsible: 'disabled' as const }),
                 label: (
                   <CollapseLabelInModal
                     key={extraExtension?.title}

Reply via email to