[lexical-react] Bug Fix: Clear remote cursor immediately on collaborator refresh#8062
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi @aldoprogrammer! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
…n Yjs collaboration
etrepum
left a comment
There was a problem hiding this comment.
This change doesn't pass the type check, looks like there are more annotations that need updating https://github.com/facebook/lexical/actions/runs/20699932262/job/59506710070?pr=8062#step:6:60
Update the mock Client class in test utils to match the ProviderAwareness interface. The setLocalState method now correctly accepts UserState | null instead of just UserState, fixing the TypeScript type check error.
|
Just fixed it, it should pass now |
Descriptions
When a collaborator tab is refreshed or closed, their remote cursor
remains visible for several seconds due to delayed awareness cleanup.
This change clears the Yjs awareness state on page unload so the remote
cursor is removed immediately instead of waiting for a timeout.
Closes #8061
Test Plan
Before
After