From e7045ab6ba43684176558c51b7258a199b08d5e0 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 27 Jul 2026 11:12:37 +0800 Subject: [PATCH] fix(shell): sageReloadMenu always sets sidebar width and updates toggle icon Previously sageReloadMenu only set sidebar width when collapsed (64px). When expanded, the inline width was never restored, leaving the sidebar potentially stuck at collapsed width after menu rebuild. The menu text widgets (filler class with overflow:hidden) would clip labels to ~1 char. Now both collapsed (64px) and expanded (240px) states explicitly set sidebar.el.style.width and updateSidebarIcon after menu rebuild. --- wwwroot/shell_theme.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wwwroot/shell_theme.js b/wwwroot/shell_theme.js index 31ca1a7..367a722 100644 --- a/wwwroot/shell_theme.js +++ b/wwwroot/shell_theme.js @@ -185,9 +185,10 @@ var w = await bricks.widgetBuild(desc, sidebar); if (w) { sidebar.addSubWidget(w); - // Re-apply collapsed state and inline width to newly built menu + // Re-apply sidebar width and collapsed state to newly built menu + sidebar.el.style.width = isCollapsed ? '64px' : '240px'; + updateSidebarIcon(isCollapsed); if (isCollapsed) { - sidebar.el.style.width = '64px'; var menu = bricks.getWidgetById('global_nav_menu', bricks.app); if (menu && menu.collapse) { menu.collapse();