Show “Loading” overlay while the browsers loads
Created by: vdavid
Fixes https://github.com/sourcegraph/sourcegraph/issues/34694
I've fixed it by using a JLayeredPane (suggested by @madppiper)—or actually, a class extended from that one—and “hiding” the browser window by making in 1x1 pixel big while the web page is loading. Once we loaded the config, theme, and initiated a React render, we display the browser.
Might be even better if we waited for the first React render. So there's still room for improvement.
Another thing: I'm a bit confused with the naming "pane" and "panel" and couldn't learn it efficiently, so it might include bad naming in the class and variable names. This is very easy to fix later, however, so I went ahead and created the PR.
Test plan
Open the popup, see if the browser flickers. It should not flicker.
App preview:
Check out the client app preview documentation to learn more.