You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to be able to have the same session open in multiple Hydrogen windows/tabs/iframes. Currently opening one tab with a session that is already open in another tab, results in the session being closed in the first tab. I would like for that not to happen, and to have Hydrogen fully functional with the same session in multiple simultaneous windows/tabs/iframes.
Describe the solution you'd like
I've written a proposal to address this issue in #1041. Please see proposal for details (in short, sync would run in a worker).
Describe alternatives you've considered
Please see #1041 for details on this.
Extract an ISync interface from Sync so there can be multiple implementations of Sync. This interface should define the public API of Sync.
Add a SyncProxy which implements ISync (its methods won't be implemented yet)
Create feature flag for same session in multiple tabs
When the feature flag is enabled, instantiate SyncProxy instead of Sync
Implement all methods of ISync in SyncProxy
Enable typescript checks on sync-worker.ts
Make it possible to set the name of the SharedWorker
Iterate on SyncWorker + SyncProxy
Implement Worker abstractions that would facilitate creating workers, communication between workers and main thread, etc.
... WIP
... WIP
Maybe later
Rename Olm worker from main.js to olm-worker.js. Since we'll now have more than one worker in the codebase, having the Olm worker named main.js would be confusing. So we'll have an olm-worker.js, a sync-worker.js, etc.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I would like to be able to have the same session open in multiple Hydrogen windows/tabs/iframes. Currently opening one tab with a session that is already open in another tab, results in the session being closed in the first tab. I would like for that not to happen, and to have Hydrogen fully functional with the same session in multiple simultaneous windows/tabs/iframes.
Describe the solution you'd like
I've written a proposal to address this issue in #1041. Please see proposal for details (in short, sync would run in a worker).
Describe alternatives you've considered
Please see #1041 for details on this.
PRs
TODO
SyncProxy
ISync
interface fromSync
so there can be multiple implementations ofSync
. This interface should define the public API ofSync
.SyncProxy
which implementsISync
(its methods won't be implemented yet)SyncProxy
instead ofSync
ISync
inSyncProxy
sync-worker.ts
name
of theSharedWorker
SyncWorker
+SyncProxy
Worker
abstractions that would facilitate creating workers, communication between workers and main thread, etc.Maybe later
Olm
worker frommain.js
toolm-worker.js
. Since we'll now have more than one worker in the codebase, having theOlm
worker namedmain.js
would be confusing. So we'll have anolm-worker.js
, async-worker.js
, etc.The text was updated successfully, but these errors were encountered: