I think the Page Action will be better suited to your needs as you can completely hide the popup. Otherwise, you can disable the popup using:
chrome.browserAction.setPopup({popup: ""});
As for your first question, there are two options. If the popup html remains almost the same all the time (for example, a template), only the data changes - you can transfer the data using the parameters of the GET URL before clicking on the click, using:
chrome.pageAction.setPopup(tabId, popup: {"popup.html?param=value&..."});
(in the pop-up window you will need to parse the URL to receive the data). If there are several different popup styles, you can also use this method to switch between different files.
In the case where the popup html is completely different each time, you can prepare the popup html on the background screen when the user makes a choice, and then transfer the html ready for display when the popup opens.
source share