Commit e23a02a
Backport RTC fixes from GB trunk to GB 22.8 for a point release (#76834)
* Real Time Collaboration: Introduce filters for the polling intervals. (#76518)
* Introduce filters for the RTC polling intervals.
Introduces four filters for the polling intervals in the real time collaboration client:
* `sync.pollingManager.pollingIntervalNoCollaborators` the interval in milliseconds when there are no collaborators in the room
* `sync.pollingManager.pollingIntervalWithCollaborators` the interval in milliseconds when there are collaborators in the room
* Remove background tab interval filter
* Match filter to constant name
---------
Co-authored-by: peterwilsoncc <peterwilsoncc@git.wordpress.org>
Co-authored-by: chriszarate <czarate@git.wordpress.org>
* RTC: Fix RichTextData deserialization (#76607)
* Add failing unit test for RichTextData conversion
* Fix RichText attribute type via deserializeBlockAttributes() call in getPostChangesFromCRDTDoc()
* Add test for nested RichText value
* Modify deserializeAttributeValue() to recurse arrays and object, using block schema for deeply nested strings
* Remove deserializeBlockAttributeValues to avoid 3 different deserialization functions
* Add factory wrapper for rich text cache, testing
Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>
Co-authored-by: chriszarate <czarate@git.wordpress.org>
Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org>
* RTC: Scroll to collaborator on click (#76561)
* Add createCursorRegistry factory and use it for scrolling to cursors
* Use createCursorRegistry for scrolling
* Localize spoken scroll to cursor announcement
* Merge two matching conditionals
* Use removeAll in cursor registry
------
Co-authored-by: maxschmeling <maxschmeling@git.wordpress.org>
Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org>
* RTC: Change RTC option name (#76643)
* Change RTC option name
* Add backport changelog
* Restore option migration
* Cover previous option name in setCollaboration
* Respect previous value in setting injection
* Update migration const
* Temporary bridge
Co-authored-by: chriszarate <czarate@git.wordpress.org>
Co-authored-by: sc0ttkclark <sc0ttkclark@git.wordpress.org>
Co-authored-by: maxschmeling <maxschmeling@git.wordpress.org>
Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org>
* RTC: Backport race condition fix (#76649)
* Backport race condition fix
* Add backport changelog entry
* RTC: Increase polling intervals, increase polling on primary room only (#76704)
* Bump polling intervals up by 4x
* Reset `hasCollaborators` flag on awareness check
* Use the first registered room as the primaryRoom, and only pay attention to awareness results from that entity to avoid poll increases from shared entities like categores
* Simplify primaryRoom and enforceConnectionLimit
* Fix the collaboration utility setup for collaboration tests
---------
Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>
Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org>
Co-authored-by: chriszarate <czarate@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
* RTC: Use activation hook to enable RTC by default (#76736)
* Use activation hook to enable RTC by default
* Fix plugin file reference
* Directly hook into the `activate_` function for enabling collaboration
* Add PR backport for opt-in change
---------
Co-authored-by: Alec Geatches <alec.geatches@automattic.com>
* RTC: Add E2E "stress test" with complex interactions (#76055)
* Add RTC E2E "stress test" with complex interactions
* Refactor collab utils to work for n users instead of just 2 users
* Attempting to fix the timeout, as well as the text insertion being slightly off
* insert the test rather than sequentially type it
* Respect the collaborators limit of 3
* Switch the type to insertText
* Remove refresh as that causes editor limit exceeded
* Check Gamma's movement
---------
Co-authored-by: chriszarate <czarate@git.wordpress.org>
Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org>
Co-authored-by: shekharnwagh <shekharnwagh@git.wordpress.org>
* RTC: Use prepared queries instead of `*_post_meta` functions (#76779)
## What?
Use prepared queries instead of `*_post_meta` functions.
## Why?
Backport of WordPress/wordpress-develop#11325. Prevents post and post meta cache invalidation when RTC requests are handled.
- See: https://core.trac.wordpress.org/ticket/64696
- See: https://core.trac.wordpress.org/ticket/64916
* RTC: Remove stale wp_enable_real_time_collaboration option check (#76810)
Co-authored-by: shekharnwagh <shekharnwagh@git.wordpress.org>
Co-authored-by: chriszarate <czarate@git.wordpress.org>
* RTC: Fix editor freeze when replacing code editor content (#76815)
* Add failing performance test for huge code editor changes
* Use diffLines() when strings are > 10_000 characters
* Handle diffLines in diffWithCursor() when cursor information is sent. We don't care about the cursor for huge performance-sensitive updates
* Explicitly use "primary" instead of "meta" key
* Revert "Explicitly use "primary" instead of "meta" key"
This reverts commit 33e7aba.
* Fix paste keys for CI, lower timeouts
* Remove console.log
Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>
Co-authored-by: chriszarate <czarate@git.wordpress.org>
* Preferences: Hide collaboration options when RTC is not enabled (#76819)
* Preferences: Hide collaboration options when RTC is not enabled
Only show the "Show avatar in blocks" and "Show collaboration
notifications" preference controls when real-time collaboration
is actually enabled for the current post.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Preferences: Consolidate editorStore select call
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: chriszarate <czarate@git.wordpress.org>
* Fix navigation block rendering unit test (#76685)
* Fix navigation block rendering unit test
* Remove semicolon
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: westonruter <westonruter@git.wordpress.org>
* Fix navigation block unit test and e2e test (#76692)
* Fix navigation block rendering unit test (second try)
* Fix e2e test
* Revert unncessary change
---------
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Co-authored-by: peterwilsoncc <peterwilsoncc@git.wordpress.org>
Co-authored-by: chriszarate <czarate@git.wordpress.org>
Co-authored-by: Alec Geatches <alec.geatches@automattic.com>
Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>
Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org>
Co-authored-by: Max Schmeling <max.schmeling@automattic.com>
Co-authored-by: maxschmeling <maxschmeling@git.wordpress.org>
Co-authored-by: Chris Zarate <chris.zarate@automattic.com>
Co-authored-by: sc0ttkclark <sc0ttkclark@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: shekharnwagh <shekharnwagh@git.wordpress.org>
Co-authored-by: Shekhar Wagh <shekharnwagh@gmail.com>
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Co-authored-by: westonruter <westonruter@git.wordpress.org>1 parent 8173777 commit e23a02a
32 files changed
Lines changed: 2763 additions & 247 deletions
File tree
- backport-changelog/7.0
- lib
- compat/wordpress-7.0
- packages
- core-data/src/utils
- test
- editor/src/components
- collaborators-overlay
- collaborators-presence
- preferences-modal
- sync-connection-error-modal
- sync/src
- providers/http-polling
- quill-delta
- phpunit
- blocks
- tests/collaboration
- test/e2e/specs/editor
- collaboration
- data
- fixtures
- plugins
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
Lines changed: 140 additions & 84 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
88 | 99 | | |
89 | | - | |
90 | | - | |
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
94 | | - | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| 107 | + | |
| 108 | + | |
98 | 109 | | |
99 | | - | |
| 110 | + | |
100 | 111 | | |
101 | | - | |
102 | | - | |
| 112 | + | |
| 113 | + | |
103 | 114 | | |
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
108 | 119 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
121 | 129 | | |
122 | 130 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 131 | + | |
139 | 132 | | |
140 | 133 | | |
141 | 134 | | |
142 | | - | |
| 135 | + | |
143 | 136 | | |
144 | 137 | | |
145 | 138 | | |
| |||
153 | 146 | | |
154 | 147 | | |
155 | 148 | | |
| 149 | + | |
| 150 | + | |
156 | 151 | | |
157 | 152 | | |
158 | 153 | | |
159 | 154 | | |
160 | 155 | | |
| 156 | + | |
| 157 | + | |
161 | 158 | | |
162 | 159 | | |
163 | 160 | | |
164 | 161 | | |
165 | 162 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
169 | 197 | | |
170 | 198 | | |
171 | 199 | | |
172 | 200 | | |
173 | 201 | | |
174 | 202 | | |
175 | | - | |
176 | | - | |
| 203 | + | |
177 | 204 | | |
178 | 205 | | |
179 | 206 | | |
| |||
210 | 237 | | |
211 | 238 | | |
212 | 239 | | |
| 240 | + | |
| 241 | + | |
213 | 242 | | |
214 | 243 | | |
215 | 244 | | |
| |||
243 | 272 | | |
244 | 273 | | |
245 | 274 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | 275 | | |
258 | 276 | | |
259 | 277 | | |
| |||
267 | 285 | | |
268 | 286 | | |
269 | 287 | | |
270 | | - | |
271 | | - | |
| 288 | + | |
272 | 289 | | |
273 | 290 | | |
274 | 291 | | |
| 292 | + | |
| 293 | + | |
275 | 294 | | |
276 | | - | |
| 295 | + | |
277 | 296 | | |
278 | 297 | | |
279 | 298 | | |
280 | | - | |
281 | | - | |
| 299 | + | |
282 | 300 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
287 | 306 | | |
288 | 307 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
293 | 315 | | |
294 | 316 | | |
295 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
296 | 350 | | |
297 | 351 | | |
298 | 352 | | |
299 | 353 | | |
300 | 354 | | |
301 | 355 | | |
302 | 356 | | |
| 357 | + | |
| 358 | + | |
303 | 359 | | |
304 | | - | |
| 360 | + | |
305 | 361 | | |
306 | 362 | | |
307 | 363 | | |
| 364 | + | |
| 365 | + | |
308 | 366 | | |
309 | 367 | | |
310 | 368 | | |
311 | 369 | | |
312 | 370 | | |
313 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
314 | 379 | | |
315 | | - | |
316 | | - | |
| 380 | + | |
317 | 381 | | |
318 | 382 | | |
319 | 383 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
| 384 | + | |
329 | 385 | | |
330 | 386 | | |
331 | 387 | | |
0 commit comments