Bug 1892941 - Add a "Always Show" sidebar visibility setting r=sidebar-reviewers,fluent-reviewers,sessionstore-reviewers,bolsson,sclements,reusable-components-reviewers,mstriemer

Differential Revision: https://phabricator.services.mozilla.com/D212285
This commit is contained in:
Jonathan Sudiaman
2024-06-27 19:34:08 +00:00
parent 27036e30ca
commit 52e63f2908
14 changed files with 258 additions and 21 deletions

View File

@@ -4553,6 +4553,12 @@ var SessionStoreInternal = {
delete winData.sidebar.command;
}
if (aWindow.SidebarController.sidebarRevampEnabled) {
winData.sidebar = Object.assign(winData.sidebar || {}, {
expanded: aWindow.SidebarController.sidebarMain.expanded,
});
}
let workspaceID = aWindow.getWorkspaceID();
if (workspaceID) {
winData.workspaceID = workspaceID;
@@ -5609,6 +5615,9 @@ var SessionStoreInternal = {
sidebarBox.setAttribute("style", aSidebar.style);
}
}
if (aSidebar?.expanded) {
aWindow.SidebarController.sidebarMain.expanded = true;
}
},
/**
@@ -6303,7 +6312,7 @@ var SessionStoreInternal = {
}
// We want to preserve the sidebar if previously open in the window
if (window.sidebar?.command) {
if (window.sidebar) {
newWindowState.sidebar = window.sidebar;
}