This is done via some custom JS code. To create panels disappearing when switching views you would need to take a look at our JS api and create your own solution:
You would need to call your custom JS function when switching view and then find nodes you wish to show or hide.
Take a look at this topic for information about hiding and showing nodes:
And this is relevant JS api documentation about switching views: