Skip to content
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

Collab: Update peer caret positions more frequently #47

Merged
merged 4 commits into from
Sep 8, 2021
Merged

Conversation

mirka
Copy link
Member

@mirka mirka commented Sep 7, 2021

Proposed changes

Broadcast selection changes to connected peers every time the selection is updated.

This deviates from the behavior in AsBlocks, where the selection data is only sent when content is actually modified. In practice, I think this caused quite a few clashes with other users, because their caret positions aren't really updated in real time.

Testing instructions

  1. yarn storybook
  2. Open http://localhost:6006/?path=/story/collaboration--default in two browser windows.
  3. Type a sentence and move your caret to different positions.
  4. Your peer caret in the other window should update in real time.

@mirka mirka self-assigned this Sep 7, 2021
@mirka mirka marked this pull request as ready for review September 8, 2021 12:11
@mirka mirka merged commit ab97566 into trunk Sep 8, 2021
@mirka mirka deleted the collab/cursors branch September 8, 2021 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant