tanujdargan commented on code in PR #52408:
URL: https://github.com/apache/airflow/pull/52408#discussion_r2176419110


##########
airflow-core/src/airflow/ui/src/layouts/Nav/PluginMenus.tsx:
##########
@@ -30,32 +30,27 @@ import { PluginMenuItem } from "./PluginMenuItem";
 
 export const PluginMenus = () => {
   const { t: translate } = useTranslation("common");
-  const { data } = usePluginServiceGetPlugins();
+  const menuPlugins = (useConfig("plugins_extra_menu_items") as 
Array<ExternalViewResponse>) ?? [];
 
-  const menuPlugins =
-    data?.plugins.flatMap((plugin) => plugin.external_views).filter((view) => 
view.destination === "nav") ??
-    [];
+  const directExternalViews = menuPlugins.filter((p: ExternalViewResponse) => 
!p.is_menu_item);
+  const menuExternalViews = menuPlugins.filter((p: ExternalViewResponse) => 
p.is_menu_item);
 
-  // Only show external plugins in menu if there are more than 2
-  const menuExternalViews = menuPlugins.length > 2 ? menuPlugins : [];
-  const directExternalViews = menuPlugins.length <= 2 ? menuPlugins : [];

Review Comment:
   The current logic does seem to replace the more granular is_menu_item 
flag-based separation with a hard cutoff at 2 items:
   
   This effectively overrides the earlier logic that distinguishes between 
menuExternalViews and directExternalViews using the is_menu_item property. If 
we previously consolidated plugins into a dropdown based on that flag (rather 
than count), this could be a regression or unintentional change.
   
   Should I revert to using is_menu_item to preserve expected grouping 
behaviour?



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

Reply via email to