fix: properties panel obscures menus in legacy layout (#8474)

## Summary

Fixes overlap issue where the new menu's node properties panel could
cover the old floating menu.

## Changes

Hide the properties panel when using the legacy menu, so it doesn't
obscure the old menu. The properties panel did not work anyway (empy
content).


┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8474-fix-increase-z-index-of-legacy-floating-menu-2f86d73d365081a0ab44db24c2ea6357)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Christian Byrne
2026-01-30 08:16:11 -08:00
committed by GitHub
parent b4649bc96d
commit e7d3bc7285

View File

@@ -1,5 +1,5 @@
import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
import { computed, ref, watch } from 'vue'
import { useSettingStore } from '@/platform/settings/settingStore'
@@ -19,8 +19,13 @@ type RightSidePanelSection = 'advanced-inputs' | string
export const useRightSidePanelStore = defineStore('rightSidePanel', () => {
const settingStore = useSettingStore()
const isLegacyMenu = computed(
() => settingStore.get('Comfy.UseNewMenu') === 'Disabled'
)
const isOpen = computed({
get: () => settingStore.get('Comfy.RightSidePanel.IsOpen'),
get: () =>
!isLegacyMenu.value && settingStore.get('Comfy.RightSidePanel.IsOpen'),
set: (value: boolean) =>
settingStore.set('Comfy.RightSidePanel.IsOpen', value)
})
@@ -29,7 +34,15 @@ export const useRightSidePanelStore = defineStore('rightSidePanel', () => {
const focusedSection = ref<RightSidePanelSection | null>(null)
const searchQuery = ref('')
// Auto-close panel when switching to legacy menu mode
watch(isLegacyMenu, (legacy) => {
if (legacy) {
void settingStore.set('Comfy.RightSidePanel.IsOpen', false)
}
})
function openPanel(tab?: RightSidePanelTab) {
if (isLegacyMenu.value) return
isOpen.value = true
if (tab) {
activeTab.value = tab