How do I close A popup view with a button on it?

On your inner view (i.e. the one with "Button"), when you specify the ClosePopup event, you need to pass in the same popupId so that it knows which popup to close.

So, at 0:16 seconds into the video, you can see M62jlFBT as the popup ID. You need to copy that identifier into the Identifier field that's displayed at 0:42 - the action on "Button".

I usually don't open/close popups this way - usually I call system.perspective.openPopup and system.perspective.closePopup and that is how I'm inferring that the Identifier is what is misconfigured (you need to also pass an id when using the scripting equivalent).