-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
User story
When a user is on the collaborative editor with other users, we want to
- know exactly what state the other users are in whether
active|away|idle - when users leave their tab to another tab, there's a change JS execution in the tab gets throttled which makes these users flicker. we need to resolve that.
Details
- [a] Initial solution for this has been implemented via fix: flickering of active collaborator icons between states #3951 which caches all remote users to prevent the flickering. It also makes use of the
lastSeenvariable to determine the activity state of a user. - [b] There's another PR fix: flickering of inactive collaborator #4053 which uses a different method, two states, 1.
lastSeento keep updating ydoc and 2.lastStateto determine the actual state of a user. It also solves flickering by only cachingawayusers. This is because we can assert that, throttling is likely to only happen for away users.
Implementation notes
Since [a] has already been merged into main. there doesn't seem to be much conflict from [b] to main tho. but we need to make few changes to make sure [b] can land in main safe and beautifully.
-
do we still need the caching at the
useAwarenesslevel? this is because [b] puts the caching at theuseRemoteUserslevel.useRemoteUsersis just likeuseAwarenessbut shows a single user for their several connections sorted by theactiveconnection thenlastSeen. -
rebase [b] onto main
-
resolve the difference in tests between [b] and [a]
Release notes
User acceptance criteria
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Tech Backlog