Skip to content

Collaboration Engine 3.2.0.rc1

Pre-release
Pre-release
Compare
Choose a tag to compare
@gtzluis gtzluis released this 26 Aug 07:08
· 2 commits to main since this release
cd9acf0

What's new in 3.2

Two new APIs are the biggest changes since 3.1; the PresenceManager to handle user presence in topics, and the MessageConfigurator to customize messages in the CollaborationMessageList component.

PresenceManager API to handle user presence in topics

The new PresenceManager can now be used as a middle-layer API to handle user presence in topics: set the local-user presence, handle user presence changes and get the present users in a topic. This new API makes it easy to create custom components with collaboration features, for example a list of active users in a topic:

PresenceManager presence = new PresenceManager(users, ownUserInfo, topicId);
presence.markAsPresent(true);
// Create your own list to keep track of the users in the topic
List<UserInfo> userList = ...;
// ...
presenceManager.setNewUserHandler(userInfo -> {
    // Add the new user to the local list when she joins the topic
    userList.add(userInfo);
    return () -> {
        // Remove the user from the local list when she leaves the topic
        userList.remove(userInfo);
    };
});

Related issue: #37

Another example of a use-case can be found in our Collab Engine demo that enables seeing who's editing an employee form without opening up the form editing, all in real time. On top of reacting to changes of actual people opening up a form, we created a custom component using the PresenceManager to display bots' avatars that are also making changes in the forms.

MessageConfigurator API to customize messages

Enables changing the properties of MessageListItem after CollaborationMessageList has generated them.

For example, theme variants can be added and removed to differentiate the current user's own messages from the others .

collaborationMessageList.setMessageConfigurator((message, user) -> {
   if (user.equals(localUser)) {
       message.addThemeNames("outbound");
   }
});

Related issue: #30

Other changes

  • Fixed possible memory leak in the ComponentConnectionContext by cleaning up all listeners if closed through the registration (#44)
  • Fixed URL authorization issues with Spring Security (#41)
  • Push is now automatically enabled (#43)

Compatibility

This version is part of Vaadin 21.