close the sidebar before swtiching project