Long time Keyboard Maestro user, first time poster. I created a macro that is probably adaptable to most any program. It toggles the Sidebar, Toolbar, and Inspector and resizes the window all at once. The effect is like this:
It's not the smoothest macro since if you don't have all components open or closed, it stalls. But I use it all the time. Any suggestions on improvement are most welcome!