update sidebar collapse and expand