-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Firefox Sync support for workspaces, folders, and pinned tabs #12063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
src/zen/folders/ZenFolders.mjs
Outdated
|
|
||
| // Notify sync engine if pinned/essential tab was moved to folder | ||
| if (group.isZenFolder && (tab.pinned || tab.hasAttribute("zen-essential"))) { | ||
| Services.obs.notifyObservers(null, "zen-pinned-tabs-changed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These notifiers should be called from ZenWindowSync imo
src/zen/workspaces/ZenWorkspaces.mjs
Outdated
| window.dispatchEvent(new CustomEvent("ZenWorkspaceDataChanged"), { bubbles: true }); | ||
| window.gZenWindowSync.propagateWorkspacesToAllWindows(aSpaceData ?? this._workspaceCache); | ||
| // Notify sync engine of workspace changes | ||
| Services.obs.notifyObservers(null, "zen-workspaces-changed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also call from the WindowSync manager
src/zen/tabs/ZenPinnedTabManager.mjs
Outdated
| // Only notify sync engine if tab is being unpinned, not closed | ||
| // When a tab is closing, it will be removed anyway, no need to sync | ||
| if (!tab.closing) { | ||
| Services.obs.notifyObservers(null, "zen-pinned-tabs-changed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also call from the WindowSync manager
…all locales" This reverts commit 7f8d764.
This adds a new Firefox Sync engine that syncs:
The sync is enabled by default when Firefox Sync is active. It uses a single-record approach similar to the Prefs engine, with last-writer-wins conflict resolution.
Key things:
The engine triggers sync on workspace changes, folder changes, pinned tab changes, tab moves, and folder icon updates.