From 20f6dfafa1d0c3595338cd1aff75aea39a3244a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristijan=20Ribari=C4=87?= Date: Fri, 4 Oct 2024 15:57:43 +0200 Subject: [PATCH] feat: Add Workspaces to Sync options This commit adds Workspaces to the list of data types that can be synced. This introduces the following changes: - Adds a new preference `services.sync.engine.workspaces` to control syncing of Workspaces. - Updates the `syncChooseWhatToSync.js` and `syncChooseWhatToSync.xhtml` files to include the new Workspaces option in the UI. - Adds relevant localization strings to `preferences-ftl`. - Updates CSS styling for the Workspaces option. - Updates `zen-browser.js` to disable Workspace syncing by default. This change allows users to choose whether to sync their Workspaces across devices. --- src/browser/app/profile/zen-browser.js | 1 + .../dialogs/syncChooseWhatToSync-js.patch | 12 ++++++++++ .../dialogs/syncChooseWhatToSync-xhtml.patch | 17 +++++++++++++ .../preferences/sync-inc-xhtml.patch | 15 ++++++++++++ .../browser/preferences/preferences-ftl.patch | 24 +++++++++++++++++++ .../shared/preferences/preferences-css.patch | 14 ++++++++++- 6 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 src/browser/components/preferences/dialogs/syncChooseWhatToSync-js.patch create mode 100644 src/browser/components/preferences/dialogs/syncChooseWhatToSync-xhtml.patch create mode 100644 src/browser/components/preferences/sync-inc-xhtml.patch create mode 100644 src/browser/locales/en-US/browser/preferences/preferences-ftl.patch diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index e066a14b1..856f0d62c 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -131,6 +131,7 @@ 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.icons', '["๐ŸŒ", "๐Ÿ“", "๐Ÿ’ผ", "๐Ÿ“", "๐Ÿ“…", "๐Ÿ“Š","๐Ÿง "]'); +pref('services.sync.engine.workspaces', false); // Zen Watermark pref('zen.watermark.enabled', true, sticky); diff --git a/src/browser/components/preferences/dialogs/syncChooseWhatToSync-js.patch b/src/browser/components/preferences/dialogs/syncChooseWhatToSync-js.patch new file mode 100644 index 000000000..a50c94c65 --- /dev/null +++ b/src/browser/components/preferences/dialogs/syncChooseWhatToSync-js.patch @@ -0,0 +1,12 @@ +diff --git a/browser/components/preferences/dialogs/syncChooseWhatToSync.js b/browser/components/preferences/dialogs/syncChooseWhatToSync.js +index 2cc965b4e1b20e1ae422bfb5c90a237dcd31fcf6..cfed9dfa67c7c34cd812885a72d66dd37ba414fc 100644 +--- a/browser/components/preferences/dialogs/syncChooseWhatToSync.js ++++ b/browser/components/preferences/dialogs/syncChooseWhatToSync.js +@@ -13,6 +13,7 @@ Preferences.addAll([ + { id: "services.sync.engine.passwords", type: "bool" }, + { id: "services.sync.engine.addresses", type: "bool" }, + { id: "services.sync.engine.creditcards", type: "bool" }, ++ { id: "services.sync.engine.workspaces", type: "bool" }, + ]); + + let gSyncChooseWhatToSync = { diff --git a/src/browser/components/preferences/dialogs/syncChooseWhatToSync-xhtml.patch b/src/browser/components/preferences/dialogs/syncChooseWhatToSync-xhtml.patch new file mode 100644 index 000000000..76b1a677e --- /dev/null +++ b/src/browser/components/preferences/dialogs/syncChooseWhatToSync-xhtml.patch @@ -0,0 +1,17 @@ +diff --git a/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml b/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml +index 83bd09c0c3f8fd5febf1721e6b462ca90e54327b..71c9e8e4056edaeb354cf7844494bd83c2089561 100644 +--- a/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml ++++ b/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml +@@ -82,6 +82,12 @@ + preference="services.sync.engine.prefs" + /> + ++ ++ ++ + + + diff --git a/src/browser/components/preferences/sync-inc-xhtml.patch b/src/browser/components/preferences/sync-inc-xhtml.patch new file mode 100644 index 000000000..8ca7a8588 --- /dev/null +++ b/src/browser/components/preferences/sync-inc-xhtml.patch @@ -0,0 +1,15 @@ +diff --git a/browser/components/preferences/sync.inc.xhtml b/browser/components/preferences/sync.inc.xhtml +index 492491a369b53797aded1d3e4cf24d6f11394267..b294aa3005b11276ba8f1c58730b85043a19bf3f 100644 +--- a/browser/components/preferences/sync.inc.xhtml ++++ b/browser/components/preferences/sync.inc.xhtml +@@ -229,6 +229,10 @@ + +