Real-time collaboration: Remove block client IDs from Awareness, fix …#76090
Real-time collaboration: Remove block client IDs from Awareness, fix …#76090alecgeatches wants to merge 1 commit intowp/7.0from
Conversation
…"Show Template" view (#75590) * Use relative position .parent traversal instead of block client ID when sharing and drawing awareness information * Fix "Show Template" mode by mapping remote positions into absolute block paths * Add tests for block resolution for post-editor-awareness * Remove inner blockPathResolver, use getBlockPathForLocalClientId utility funciton * Make utility function naming a bit easier to follow - change "getAbsolutePositionIndex()" to "convertSelectionStateToAbsolute()", have it return "localClientId" instead of "blockClientId" * Move block lookup functions into block-lookup utils file, improve types * Remove EditorStoreBlock from exported types * Compare relative positions with Yjs built-in function * Replace areSelectionsStatesEqual() relative position comparison with compareRelativePositions() as well * Fix types and tests from crdt-user-selections * Add a guard to avoid getting blocks when path is empty * Rename "useConvertSelectionStateToAbsolute" to "useResolvedSelection" * Add unit tests for getBlockPathInYdoc, resolveBlockClientIdByPath, avoid exporting inner helper functions
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
No longer necessary. |
What?
Backport #75590 to
wp/7.0.