feat: option to hide the sidebar after opening a host (#1652)

This commit is contained in:
LukeGus committed 2026-10-15 21:06:47 -05:00
1 parent f20d64b4f2
commit 7324982f47
7 files changed
+36 -1

No files matched your search

+7
View File
@@ -88,6 +88,8 @@ export interface HostSidebarDisplayPreferences extends HostRowFields {
/** When false, nested folders hide the parent-path breadcrumb before their name. */
showFolderPaths: boolean;
hostClickBehavior: HostClickBehavior;
/** When true, the sidebar closes after a host is opened from it. */
closeOnOpen: boolean;
/**
* Host action id to whether it shows in the row's connect bar. An action
* missing here follows its own default. Every action stays in the menu.
@@ -163,6 +165,7 @@ export function defaultHostSidebarPreferences(): HostSidebarPreferences {
openOnDoubleClick: false,
showFolderPaths: true,
hostClickBehavior: "newTab",
closeOnOpen: false,
barActions: {},
...defaultHostRowFields(),
},
@@ -274,6 +277,10 @@ export function sanitizeHostSidebarPreferences(
)
? (displayObj.hostClickBehavior as HostClickBehavior)
: defaults.display.hostClickBehavior,
closeOnOpen:
typeof displayObj.closeOnOpen === "boolean"
? displayObj.closeOnOpen
: defaults.display.closeOnOpen,
barActions: sanitizeBarActions(displayObj.barActions),
};