I’ve taken a first pass at updating Quick Messages to the new header logic
@eviltrout Some issues / questions / thoughts:
-
Could you break out the
avatarImg
method from the post widget? It seems to be a useful general way to include avatars in widgets. -
It’s a little inconvenient to add new menus to the header widget because the widget contents are wrapped inside html in the render function. I ended up adding the quick message menu itself as another list item after the quick message icon.
edit I’m probably missing something, but there seems to be a similar issue for the Header Search Plugin. If I insert it after the
home-logo
widget, i.e.api.decorateWidget('home-logo:after' ...
it ends up inside thetitle
element, which leads to conflicts with thehome-logo
click event… -
I’m wondering what the point of having widget events as separate from widget actions is? i.e. when would you use an event instead of an action?
-
Following your lead with the
_notificationsChanged
function, I put my observers for messages in thesite-header
component and then re-rendered all of the header widgets when the observer fires. This pattern doesn’t feel amazing. Thoughts on best practices in this kind of situation?
Cheers,
Angus