Refactor popovers to use templates and only specify text in chat.ui