vaadin / collaboration-engine

The simplest way to build real-time collaboration into web apps
https://vaadin.com/collaboration
Other
3 stars 1 forks source link

CollaborationAvatarGroup should not remove the own avatar when another tab is closed #16

Closed heruan closed 3 years ago

heruan commented 3 years ago

Describe the bug Consider having a CollaborationAvatarGroup with isOwnAvatarVisible() == true, and the use opens multiple tabs connecting to the same topic: the user's own avatar is displayed, but if one of those tabs is closed, a beacon is sent which triggers the removal of the user's avatar from the component in the still open tabs; this should not happen, i.e. the user's own avatar should disappear only when there are no more open tabs on the same topic.

To Reproduce Steps to reproduce the behavior:

  1. add a CollaborationAvatarGroup to a view and set a topic to it;
  2. start the app and open the view in multiple browser tabs;
  3. close one of those tabs;
  4. notice how the avatar group is empty.

Expected behavior The avatar group should still display the user's own avatar.

Versions

Technical details and solution proposal The CollaborationAvatarGroup should work like this: