Hello community
I need to change the way the <nuxeo-user-avatar> returns the user's initials, which is a simple javascript function.
The problem is, I would need to override all the references in other components throughout the application as well, like the <nuxeo-user-tag> component, or the <nuxeo-user-group-formatter>, which would also have to be overriden and have their references changed in the nuxeo-app.html file or the elements.html file, and so on.
It snowballs to a bunch of other components which I'd also have to override just for a simple function!
Since web components cannot be redefined or unregistered, is there any better way to change the behavior of a component without having to override all the other components that use it?
How can I keep using the same component and only change the logic I need?
Or how to tell the component to use a different function with my custom logic at runtime?
EDIT
This is the xml contribution file I would use to override the component:
org.nuxeo.web.ui.resources
/ui/custom-user-avatar.html
custom-avatar