Improve types and keep WordPress domain knowledge out of sync package#74869
Conversation
|
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. |
|
Size Change: -210 B (-0.01%) Total Size: 3.09 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 79db62a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/21261160125
|
|
Note: The failing JS unit test is from |
731eea5
into
add/user-and-selection-to-awareness
…ess (#74728) * Being adding user info * Got the user fetch working * Added in some test logging * Attempting to fix the sync * Add a comment explining the bug * Add support for selection * Ensure the pckakge-lock changes are in * Add more comments and simplify the user handling * Tweak the exported functions * Revert the webpack workaround * Fix the type error * ignore types for block editor import * Fix the typo in the constant * Tweaked the local storage key * Attempting to solve the test failures * Fix the test fialures * Remove a TODO * Re-wrote the user selection to be in the core-data, and move the awareness instance management to sync via getSyncanager * Clean up the code * Added a todo for local storage * Remove the block-editor fix * Fix the test using STORE_NAME * Move awareness implementation details to core-data, and only leave the base interface behind * Replace undefined awareness test with a mock * Fix the tests failures in resolvers * Improve types and keep WordPress domain knowledge out of sync package (#74869) * Improve types and keep WordPress domain knowledge out of sync package * Fix core-data tests * Remove unnecessary exports * Rename getAwarenessInstance => getAwareness for symmetry * Remove vestial userInfo reference * Relocate selection types and use YMapWrap --------- Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org> Co-authored-by: chriszarate <czarate@git.wordpress.org> Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org> Co-authored-by: shekharnwagh <shekharnwagh@git.wordpress.org>
What?
Improve our
AwarenessStateclass / type and move WordPress domain knowledge out of thesyncpackage. Remove the need to pass aroundRecordHandlers.Why?
Keeping WordPress-specific schema out of the
syncpackage provides simplification and improves maintainability.RecordHandlersinto the sync manager only to pull them out again was unnecessarytrunk. We can add it back if needed and ideally using preferences.