ui/expandgallery: publish events after opening and closing