feat: Add preference to force container tabs to a workspace with that container set as default (#2095)

This commit introduces a new preference, "zen.workspaces.force-container-workspace", that allows users to control whether container tabs are automatically placed in a dedicated workspace. When enabled, this feature ensures that all tabs from a container are grouped together within a specific workspace.

The following files were modified:

- `src/browser/components/preferences/zen-settings.js`: Added the new preference definition.
- `src/browser/app/profile/zen-browser.js`: Set the default value for the new preference.
- `src/browser/components/preferences/zenTabsManagement.inc.xhtml`: Added a checkbox to control the new preference in the settings UI.
This commit is contained in:
kristijanribaric
2024-10-14 17:24:14 +02:00
committed by GitHub
parent 17943dcf1a
commit 8ecbbd0719
3 changed files with 9 additions and 0 deletions

View File

@@ -135,6 +135,7 @@ pref('zen.workspaces.enabled', true);
pref('zen.workspaces.hide-default-container-indicator', true);
pref('zen.workspaces.individual-pinned-tabs', true);
pref('zen.workspaces.show-icon-strip', true);
pref('zen.workspaces.force-container-workspace', true);
pref('zen.workspaces.icons', '["🌐", "📁", "💼", "📝", "📅", "📊","🧠"]');
pref('services.sync.prefs.sync.zen.workspaces.icons', true);
pref('services.sync.engine.workspaces', false);

View File

@@ -1030,4 +1030,9 @@ Preferences.addAll([
type: 'string',
default: 'switch',
},
{
id: 'zen.workspaces.force-container-workspace',
type: 'bool',
default: true,
},
]);

View File

@@ -30,6 +30,9 @@
<checkbox id="zenWorkspacesDisplayAsIconStrip"
data-l10n-id="zen-settings-workspaces-display-as-icon-strip"
preference="zen.workspaces.show-icon-strip"/>
<checkbox id="zenWorkspacesForceContainerTabsToWorkspace"
data-l10n-id="zen-settings-workspaces-force-container-tabs-to-workspace"
preference="zen.workspaces.force-container-workspace"/>
</vbox>
</groupbox>