CS3219-AY2324S1 / ay2324s1-course-assessment-g05

A collaborative technical interview preparation platform that is going to boost your interview performance!
MIT License
0 stars 3 forks source link

Upgrade collaboration service's existing functionality #132

Closed weidak closed 1 year ago

weidak commented 1 year ago

Pull Request

Description

This PR improves the functionality provided by collaboration service and fixes some bugs discussed previously.

Related Issue(s)

Closes #128 Closes #125

Changes Made

Previously, I was using useState to set the content of the editor and it was causing a cursors to jump and texts to flash white (since it was constantly resetting the editor's value).

With these new changes, I have implemented changes based on a specific range and offset, where in theory the editor is now able to update in isolation to the other user. We will have to test this out once this is merged to master and deployed to AWS for further investigation when latency is introduced. Also, I have added live cursors.

Fixed the bugs mentioned in #128 by removing setError() useState to fix build check, as we are now reliant on the isNotFoundError() that exists within collab context.

Screenshots (if applicable)

Introducing live cursor and selections:

image

Shows the name of the other user on hover:

image

Checklist

Additional Notes/References

weidak commented 1 year ago

LGTM

Minor, possible to stick the icons to one side? seem to be out of place when stretched. image

sure, did not notice this when developing since it was always half half.. will update this to make the ui better

weidak commented 1 year ago

Updated UI:

image