extract popover functionality to separate widget