-
Notifications
You must be signed in to change notification settings - Fork 940
Revert @platejs/yjs to 52.0.5 #4786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
🦋 Changeset detectedLatest commit: a17120e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| customSharedType ?? (ydoc.get('content', Y.XmlText) as Y.XmlText); | ||
|
|
||
| // Only apply initial value if ydoc is empty (no content from server) | ||
| if (sharedRoot.length === 0 && value !== null) { | ||
| let initialNodes = value as Value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid seeding doc before initial sync completes
After racing the provider sync against a 5s timeout, this block always seeds the shared document whenever it is empty and value is not null, which includes the default undefined case. If a provider simply takes longer than 5s to deliver the server state, we will insert create.value() locally before the first sync and that default paragraph will then be merged with the late-arriving server content, reintroducing the phantom paragraph the previous implementation avoided by waiting for the first onSyncChange before applying any initial value.
Useful? React with 👍 / 👎.
Checklist
yarn typecheckyarn lint:fixyarn testyarn brlyarn changeset