Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
8da7dc2
Add `core.getSyncProvider` filter
chriszarate Jul 24, 2025
2879565
Promote @wordpress/sync to public package
chriszarate Jul 24, 2025
da6ac8e
Separate experimental flags for feature and transport
chriszarate Jul 24, 2025
b354743
Restore `register` property, for now.
chriszarate Jul 25, 2025
019fd34
Fix unit test
chriszarate Jul 25, 2025
4144f8c
Remove conditional loading of @wordpress/sync
chriszarate Jul 28, 2025
b91ef4b
Remove @wordpress/hooks dependency
chriszarate Jul 28, 2025
8d62300
Remove new experimental flag
chriszarate Jul 28, 2025
2cfe35c
Correctly fall back to no-op sync provider
chriszarate Jul 28, 2025
3865ac9
Remove dependency from base package-lock
chriszarate Jul 28, 2025
571c951
Add Yjs-aware entity config
chriszarate Jul 29, 2025
b0d09f7
Remove awareness implementation
chriszarate Jul 29, 2025
4e01172
Convert SyncProvider to class
chriszarate Jul 30, 2025
b3cc7e3
Update the package-lock.json and bump the y- packages
ingeniumed Aug 1, 2025
76b6288
Add awareness as optional property on ConnectDocResult
chriszarate Aug 5, 2025
323eaab
Update SyncProvider for better extensibility
chriszarate Aug 5, 2025
e9aabe2
Add the Yjs undo manager in the provider.ts
ingeniumed Aug 6, 2025
8404bed
Make a separate exported clas for the undo manager coming from the pr…
ingeniumed Aug 6, 2025
9ef29f5
Cleanup and separation of concerns
chriszarate Aug 6, 2025
cdb3bc4
Rely on a single instance of UndoManager
chriszarate Aug 6, 2025
c9844b5
Remove launch.json
chriszarate Aug 6, 2025
c5ae8fb
Remove feature flag check
chriszarate Aug 6, 2025
f8d0ac2
Add supportsAwareness: true to post entities
chriszarate Aug 6, 2025
0f37ce2
Merge branch 'add/experimental-collaborative-editing' into add/yjs-un…
chriszarate Aug 6, 2025
7132976
Minor change in the return for undo and undo manger return type
ingeniumed Aug 7, 2025
8924f85
Merge pull request #9 from Automattic/add/yjs-undo-manager-back
ingeniumed Aug 7, 2025
640177a
Fix the missing path in tsconfig for hooks
ingeniumed Aug 7, 2025
8b64dde
Merge pull request #10 from Automattic/fix/failing-checks
ingeniumed Aug 7, 2025
29e972e
Merging latest trunk in
ingeniumed Aug 13, 2025
3d4e50e
Remove sync configs for non-synced entities
chriszarate Aug 14, 2025
c490c8a
Allow custom sync provider to override initial CRDT doc
chriszarate Aug 14, 2025
9feeef1
Merge branch 'trunk' of github.com:Automattic/gutenberg into add/expe…
ingeniumed Aug 15, 2025
c4d613d
Rename method for clarity
chriszarate Aug 15, 2025
1e3b014
Merge pull request #11 from Automattic/improve/yjs-doc-persistence
chriszarate Aug 15, 2025
ffe6c4a
Merge branch 'trunk' of github.com:Automattic/gutenberg into add/expe…
ingeniumed Aug 18, 2025
e51717d
Filter synced properties
chriszarate Aug 18, 2025
4c4fbc9
Reform object
chriszarate Aug 18, 2025
c9ffba1
Remove content and excerpt from synced property list
chriszarate Aug 18, 2025
2f1213d
Move merge functions to separate utils file
chriszarate Aug 19, 2025
2bcce30
Rename Foo type and add comment
chriszarate Aug 19, 2025
0c46711
Merge pull request #12 from Automattic/improve/crdt-utils
ingeniumed Aug 19, 2025
74ed47b
Sync post title
chriszarate Aug 21, 2025
0f67dc4
Merge pull request #13 from Automattic/add/title-sync
chriszarate Aug 21, 2025
6bbaa95
Improve block support
ingeniumed Aug 21, 2025
a78f85f
Move applyChangesToDoc core code to utils/crdt
chriszarate Aug 21, 2025
8e268c5
Add post type support for collaborative editing
chriszarate Aug 21, 2025
81d0d13
Add editor support check
chriszarate Aug 21, 2025
e4321f9
Merge pull request #15 from Automattic/improve/post-type-support
chriszarate Aug 21, 2025
2190d49
Merge branch 'add/experimental-collaborative-editing' of github.com:A…
ingeniumed Aug 22, 2025
b87b3e2
Merge branch 'trunk' of github.com:Automattic/gutenberg into add/expe…
ingeniumed Aug 25, 2025
2f587c7
Merge branch 'add/experimental-collaborative-editing' of github.com:A…
ingeniumed Aug 25, 2025
12cdf98
Tweak the flow with comments
ingeniumed Aug 25, 2025
220b6e5
Drop the filter
ingeniumed Aug 25, 2025
f2dd14f
Merge pull request #14 from Automattic/improve/block-support
ingeniumed Aug 25, 2025
189697e
Change 'mergeBlocks()' to 'mergeCrdtBlocks()' to make it distinct
alecgeatches Aug 27, 2025
be6e0be
Provide bindings for CRDT persistence
chriszarate Aug 27, 2025
860d892
Merge pull request #16 from Automattic/add/persisted-crdt-hooks
chriszarate Aug 27, 2025
ec24872
Change mergeCrdtBlocks() to use direct Y types for yblocks. First ste…
alecgeatches Aug 27, 2025
a41e518
Control and validate CRDT doc version internally
chriszarate Aug 28, 2025
49155fd
Merge branch 'add/experimental-collaborative-editing' into improve/yj…
chriszarate Aug 28, 2025
ec8df1b
Fix CRDT merge object equality check against yBlockAsJson
alecgeatches Aug 28, 2025
dd71bdf
Add createNewYBlock for recursive insert
chriszarate Aug 28, 2025
c12aa9b
Ensure we always recursively merge innerBlocks
chriszarate Aug 28, 2025
131f0e5
In areBlocksEqual(), ensure YBlock type instead of JSON value for com…
alecgeatches Aug 28, 2025
a3720b6
Use Y.Map type for attributes in yblocks
alecgeatches Aug 28, 2025
3b11604
Bugfix: Don't allow non-array values for innerBlocks
chriszarate Aug 28, 2025
cf9a1ce
Cast rich-text types into Y.Text in the ydoc
alecgeatches Aug 28, 2025
9a67df3
Improve type safety, DRY up, and slightly more efficient
chriszarate Aug 28, 2025
a7e8228
Ensure attributes are deleted when removed
chriszarate Aug 28, 2025
15ad201
Bugfix: Make sure new attributes are set.
chriszarate Aug 28, 2025
ac0ffa2
Merge pull request #17 from Automattic/improve/yjs-document-types
alecgeatches Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/experimental/synchronization.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,20 @@ function gutenberg_rest_api_init_collaborative_editing() {
wp_add_inline_script( 'wp-sync', 'window.__experimentalCollaborativeEditingSecret = "' . $collaborative_editing_secret . '";', 'before' );
}
add_action( 'admin_init', 'gutenberg_rest_api_init_collaborative_editing' );

/**
* Add support for collaborative editing to a some built-in post types.
*/
function gutenberg_add_collaborative_editing_post_type_support() {
$gutenberg_experiments = get_option( 'gutenberg-experiments' );
if ( ! $gutenberg_experiments || ! array_key_exists( 'gutenberg-sync-collaboration', $gutenberg_experiments ) ) {
return;
}

foreach ( array( 'page', 'post' ) as $post_type ) {
if ( post_type_exists( $post_type ) ) {
add_post_type_support( $post_type, 'collaborative-editing' );
}
}
}
add_action( 'init', 'gutenberg_add_collaborative_editing_post_type_support', 10, 0 );
4 changes: 2 additions & 2 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ function gutenberg_initialize_experiments_settings() {

add_settings_field(
'gutenberg-sync-collaboration',
__( 'Collaboration: add real time editing', 'gutenberg' ),
__( 'Collaboration: enable real-time collaboration', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Enables live collaboration and offline persistence between peers.', 'gutenberg' ),
'label' => __( 'Enables real-time collaboration between peers.', 'gutenberg' ),
'id' => 'gutenberg-sync-collaboration',
)
);
Expand Down
200 changes: 119 additions & 81 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/core-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@wordpress/data": "file:../data",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/element": "file:../element",
"@wordpress/hooks": "file:../hooks",
"@wordpress/html-entities": "file:../html-entities",
"@wordpress/i18n": "file:../i18n",
"@wordpress/is-shallow-equal": "file:../is-shallow-equal",
Expand All @@ -52,6 +53,7 @@
"change-case": "^4.1.2",
"equivalent-key-map": "^0.2.2",
"fast-deep-equal": "^3.1.3",
"lib0": "^0.2.99",
"memize": "^2.1.0",
"uuid": "^9.0.1"
},
Expand Down
Loading
Loading