Repository navigation
feat(web-pkg): allow following users in the yjs collaborators list - #3803
Merged
Merged
Conversation
dschmidt
force-pushed
the
feat/yjs-collaborators-follow
branch
from
October 14, 2026 19:29
24b1e32 to
1b4533d
Compare
Apps opt in with the followingSupported prop and bind the followed user id via v-model:following. The list gets a follow toggle per peer, the followed user is highlighted, moved into the avatar stack with a badge and named in the trigger label. Following the own user is not possible and a followed user who leaves the session is released.
dschmidt
marked this pull request as ready for review
October 14, 2026 19:33
JammingBen
reviewed
Oct 20, 2026
JammingBen
left a comment
Member
There was a problem hiding this comment.
LGTM overall, just one nitpick.
JammingBen
approved these changes
Oct 20, 2026
The follow toggle carries aria-pressed, which ARIA only allows on a button; as a menu the drop overwrote every item with role=menuitem.
An empty collaborator list is a session that is still syncing, not a user who left, so it no longer cancels following.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
YjsCollaboratorscan now offer to follow another user in the session. It is opt-in: an app passesfollowingSupportedand binds the followed user id withv-model:following. What following means (scroll position, viewport, cursor) stays with the app, the component only handles the UI and the state. Apps that don't passfollowingSupportedsee no change.followingset to the own id emitsnull.null, so the app stops following.+Noverflow.w-auto! p-1!because.oc-drop li buttonappliesw-full, which squeezed the name to zero width.Open question for review: the icon. I went with
focus-mode;eyeandfocus-3were the other candidates.Related Issue
How Has This Been Tested?
WEB_ASSET_CORE_PATH, two users (alan, mary) in the same Yjs sessionYjsCollaborators.spec.ts:followingSupported: no toggle, nothing emitted (existing tests unchanged)nullnullnullpackages/web-pkg/tests/unit/editor(the text editor toolbar uses the component), eslint, prettier,check:typesin web-pkgTypes of changes