codeant-ai-for-open-source[bot] commented on code in PR #41907:
URL: https://github.com/apache/superset/pull/41907#discussion_r4024147308


##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx:
##########
@@ -314,6 +314,7 @@ function createAxisControl(axis: 'x' | 'y'): 
ControlSetRow[] {
 const config: ControlPanelConfig = {
   controlPanelSections: [
     sections.echartsTimeSeriesQueryWithXAxisSort,
+    sections.drilldownHierarchySection,

Review Comment:
   Agreed. The section should be gated at the section level so it is removed 
entirely when `DRILL_DOWN` is disabled, rather than leaving an empty panel.
   
   Update the reusable section definition:
   
   ```tsx
   export const drilldownHierarchySection: ControlPanelSectionConfig = {
     label: t('Drill-down hierarchy'),
     expanded: false,
     visibility: () => isFeatureEnabled(FeatureFlag.DrillDown),
     controlSetRows: [
       [
         {
           name: 'drilldown_hierarchy',
           config: {
             ...dndGroupByControl,
             // ...
           },
         },
       ],
     ],
   };
   ```
   
   The control-level `visibility` can then be removed because the enclosing 
section already provides the same guard. This fixes Bar and the other charts 
that reuse `sections.drilldownHierarchySection`, ensuring no empty panel 
appears with the flag off.



-- 
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