Closed stefanuebe closed 2 years ago
Avatar
is defined by the reusable component. UserInfo
is defined by Collaboration Engine. We don't want to make the component depend on CE, which means that the API would have to be in CE. That would be alternative 3 or 4 from the suggestions.
I would go with alternative 4, i.e. avatarGroup.createLocalUserAvatar()
. This way we don't create a dependency on the component for UserInfo
either, in case we want to extract the component in a separate module.
The CE uses the "UserInfo" type to provide the info about the current user to the CE. This sample shows how to create a separate Avatar. It would be nice to directly use the UserInfo here instead of needing to extract the information manually from it.
This sample code shows some potential alternatives on how to combine UserInfo and Avatar in API form.