Skip to content

Commit

Permalink
Add tech notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Jul 20, 2021
1 parent 948bb07 commit c92a7bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/block-editor-contents/use-yjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function initYDoc( { initialBlocks, onRemoteDataChange, channelId, transport } )
debug( `connected (channelId: ${ channelId })` );

if ( isFirstInChannel ) {
debug( 'first in channel' );
doc.startSharing( { title: '', initialBlocks } );
} else {
doc.connect();
Expand Down
12 changes: 12 additions & 0 deletions src/stories/collab/Collaboration.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ const Template: Story< Props > = ( args ) => {
<>
<p>Open this page in another window to test real time collaborative editing.</p>
<IsolatedBlockEditor { ...args } />
<p>
This local demo depends on shared Local Storage (instead of network) to pass messages across tabs. It
will not work:
</p>
<ul>
<li>across browsers</li>
<li>across private browsing windows</li>
<li>
in Safari, until the fix to <a href="https://bugs.webkit.org/show_bug.cgi?id=225344">this bug</a>{ ' ' }
has shipped
</li>
</ul>
</>
);
};
Expand Down

0 comments on commit c92a7bf

Please sign in to comment.