some refactoring on the sidebar bubbling