korbit-ai[bot] commented on code in PR #31794:
URL: https://github.com/apache/superset/pull/31794#discussion_r1911183678


##########
superset-frontend/src/dashboard/util/crossFilters.ts:
##########
@@ -38,8 +36,7 @@ import { CHART_TYPE } from './componentTypes';
 export const isCrossFiltersEnabled = (
   metadataCrossFiltersEnabled: boolean | undefined,
 ): boolean =>
-  isFeatureEnabled(FeatureFlag.DashboardCrossFilters) &&
-  (metadataCrossFiltersEnabled === undefined || metadataCrossFiltersEnabled);
+  metadataCrossFiltersEnabled === undefined || metadataCrossFiltersEnabled;

Review Comment:
   ### Cross Filters Default Behavior Changed <sub>![category 
Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The function isCrossFiltersEnabled now always returns true when 
metadataCrossFiltersEnabled is undefined, which might enable cross filters in 
scenarios where they should be disabled.
   
   ###### Why this matters
   Prior to this change, cross filters required both the feature flag AND the 
metadata check. Now it only relies on metadata, which could unexpectedly enable 
cross filters in dashboards that previously had them disabled.
   
   ###### Suggested change ∙ *Feature Preview*
   To maintain the previous default behavior, consider modifying the function 
to default to false when the metadata is undefined:
   ```typescript
   export const isCrossFiltersEnabled = (
     metadataCrossFiltersEnabled: boolean | undefined,
   ): boolean =>
     metadataCrossFiltersEnabled === true;
   ```
   
   
   </details>
   
   ###### Chat with Korbit by mentioning @korbit-ai, and give a 👍 or 👎 to help 
Korbit improve your reviews.
   
   <!--- korbi internal id:cdb4d0ea-4fa2-4d36-99e5-95cf20ad7d0c -->
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to