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

beto pushed a commit to branch dbt-metricflow
in repository https://gitbox.apache.org/repos/asf/superset.git

commit a8ccce576245a5b66844aed503050498cbc38e9b
Author: Beto Dealmeida <robe...@dealmeida.net>
AuthorDate: Thu Jul 17 21:49:22 2025 -0400

    Checkpoint
---
 .../plugin-chart-table/src/controlPanel.tsx        | 36 ++++++++++++++--------
 .../DndColumnSelectControl/ColumnSelectPopover.tsx | 12 ++++----
 2 files changed, 29 insertions(+), 19 deletions(-)

diff --git a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx 
b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
index 1c7cb036a2..86bdcc6f3e 100644
--- a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
+++ b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx
@@ -244,10 +244,12 @@ const config: ControlPanelConfig = {
                 controlState: ControlState,
               ) => {
                 const { controls } = state;
+                // Get the enhanced mapStateToProps from the DND control 
(includes semantic layer verification)
                 const originalMapStateToProps =
                   sharedControls?.groupby?.mapStateToProps;
                 const newState =
                   originalMapStateToProps?.(state, controlState) ?? {};
+                // Add table-specific validation while preserving semantic 
layer enhancements
                 newState.externalValidationErrors = validateAggControlValues(
                   controls,
                   [
@@ -300,26 +302,34 @@ const config: ControlPanelConfig = {
               visibility: isAggMode,
               resetOnHide: false,
               mapStateToProps: (
-                { controls, datasource, form_data }: ControlPanelState,
+                state: ControlPanelState,
                 controlState: ControlState,
-              ) => ({
-                columns: datasource?.columns[0]?.hasOwnProperty('filterable')
+              ) => {
+                const { controls, datasource, form_data } = state;
+                // Get the enhanced mapStateToProps from the DND control 
(includes semantic layer verification)
+                const originalMapStateToProps =
+                  sharedControls?.metrics?.mapStateToProps;
+                const newState =
+                  originalMapStateToProps?.(state, controlState) ?? {};
+                
+                // Add table-specific props while preserving semantic layer 
enhancements
+                newState.columns = 
datasource?.columns[0]?.hasOwnProperty('filterable')
                   ? (datasource as Dataset)?.columns?.filter(
                       (c: ColumnMeta) => c.filterable,
                     )
-                  : datasource?.columns,
-                savedMetrics: defineSavedMetrics(datasource),
-                // current active adhoc metrics
-                selectedMetrics:
-                  form_data.metrics ||
-                  (form_data.metric ? [form_data.metric] : []),
-                datasource,
-                externalValidationErrors: validateAggControlValues(controls, [
+                  : datasource?.columns;
+                newState.savedMetrics = defineSavedMetrics(datasource);
+                newState.selectedMetrics = form_data.metrics ||
+                  (form_data.metric ? [form_data.metric] : []);
+                newState.datasource = datasource;
+                newState.externalValidationErrors = 
validateAggControlValues(controls, [
                   controls.groupby?.value,
                   controls.percent_metrics?.value,
                   controlState.value,
-                ]),
-              }),
+                ]);
+                
+                return newState;
+              },
               rerender: ['groupby', 'percent_metrics'],
             },
           },
diff --git 
a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
 
b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
index d02dddbe37..686af9d467 100644
--- 
a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
+++ 
b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
@@ -275,16 +275,16 @@ const ColumnSelectPopover = ({
     console.log('Should trigger API?', isSemanticLayer && formData && 
datasource && 
         (selectedTab === TABS_KEYS.SIMPLE || selectedTab === null));
     
-    // Temporarily disable column modal API calls to isolate main verification 
timing issue
-    if (false && isSemanticLayer && formData && datasource && 
+    // Re-enable column modal API calls with fixed timing approach
+    if (isSemanticLayer && formData && datasource && 
         (selectedTab === TABS_KEYS.SIMPLE || selectedTab === null)) {
       
       const fetchValidDimensions = async () => {
         setIsLoadingValidDimensions(true);
         
         try {
-          // Wait for Redux state to settle after drag-and-drop operations
-          await new Promise(resolve => setTimeout(resolve, 500));
+          // Use the same 50ms delay that fixed the main verification timing 
issue
+          await new Promise(resolve => setTimeout(resolve, 50));
           
           // Get the most current form data from store
           const currentState = store.getState() as ExplorePageState;
@@ -378,7 +378,7 @@ const ColumnSelectPopover = ({
           setIsLoadingValidDimensions(true);
           
           try {
-            await new Promise(resolve => setTimeout(resolve, 200));
+            await new Promise(resolve => setTimeout(resolve, 50));
             
             const currentState = store.getState() as ExplorePageState;
             const currentFormData = currentState.explore.form_data;
@@ -401,7 +401,7 @@ const ColumnSelectPopover = ({
         
         setTimeout(() => {
           fetchValidDimensions();
-        }, 100);
+        }, 50);
       }
     }
   }, [isSemanticLayer, formData, datasource, store, validDimensions]);

Reply via email to