Closed alecgibson closed 5 years ago
Hey, any timeline on when this is going to be merged in? In a high latency environment this is invaluable.
@arslnb I was waiting for feedback from the original poster in the original issue, but I haven't heard anything.
Would you mind please testing with this test release, and let me know how you get on? I can look into merging some time this week when I have a chance to do some more in-depth testing myself.
@alecgibson first of all thanks for this awesome library . I have done some testing with test-release you provided . It almost works . There is issue while entering new line characters :
I have marked the original position of the cursor in the screenshot below :
But it actually shows 2-3 lines below
PS : This issue this issue only happens when the user with red Cursor Stays still and does not type
All right. Sorry for the delay on this. Things are happening, just slowly. We need to look into fixing this for ourselves soon, too. And potentially adding support for the upcoming ShareDB presence.
@ashish0910 out of interest, what tweaking did you need to do?
@ashish0910 out of interest, what tweaking did you need to do?
Just reducing set timeout values and adding a fake operational transform event whenever a new User joined did the trick .
@ashish0910 note that the timeout values in the example are literally just to simulate a slow connection (and keeping in the timeouts will make your cursors artificially laggy). The only number you may need to tweak is the debounce interval.
Fixes https://github.com/reedsy/quill-cursors/issues/25
At the moment, we have to wait for clients to report their position before we update it. This is fine on very low-latency connections (like when developing on the same machine), but on high-latency connections, it can lead to some laggy or juddery performance as the cursor drifts out-of-sync with the
text-change
events received by Quill:This change adds in a
text-change
listener that will transform all cursors by the received delta usingquill-delta
'stransformPosition
, which is meant for exactly this sort of application.The example has also been updated to show how a cursor implementation might look on a high-latency connection, using a debounced update to avoid laggy behaviour.