adding tabs and conditionally displaying sidebar based on tab selection