After some back and forth on Slack, we decided it's best to open repl.co webview preview links in the browser instead of a new Electron Chromium window since the experience is strictly worse due to the lack of dev tools, extensions, browser nav, etc and it is not worth trying to recreate it when the user will likely prefer their browser for web development anyways.
Additionally, I realized that we don't want to allow replit.com links to be open in a window like this either. This is because almost all same origin links will be open via a client side transition or hard refresh anyways rather than a target="_blank link or programmatically using window.open. As such, it's an edge case to begin with and any page that is open like this is likely to be unsupported anyways. For example, you can type a link in a comment in the editor (e.g. https://replit.com/about) and Cmd+Click it to reproduce this. On top of that, even if it is supported, we wouldn't want to open it in a limited window like this (e.g. lack of transparent header, not persisted dimensions, etc).
What changed
Open repl.co and same origin links in user's external browser instead of in Electron window.
Test plan
Open WS with server repl in the desktop app
Open repl.co URL via the link in the webview pane
See it opened in the browser instead of new Electron window
Try above repro for replit.com links in the editor
See that is opened in the external browser as well.
Why
After some back and forth on Slack, we decided it's best to open
repl.co
webview preview links in the browser instead of a new Electron Chromium window since the experience is strictly worse due to the lack of dev tools, extensions, browser nav, etc and it is not worth trying to recreate it when the user will likely prefer their browser for web development anyways.Additionally, I realized that we don't want to allow
replit.com
links to be open in a window like this either. This is because almost all same origin links will be open via a client side transition or hard refresh anyways rather than atarget="_blank
link or programmatically usingwindow.open
. As such, it's an edge case to begin with and any page that is open like this is likely to be unsupported anyways. For example, you can type a link in a comment in the editor (e.g.https://replit.com/about
) and Cmd+Click it to reproduce this. On top of that, even if it is supported, we wouldn't want to open it in a limited window like this (e.g. lack of transparent header, not persisted dimensions, etc).What changed
Open repl.co and same origin links in user's external browser instead of in Electron window.
Test plan
replit.com
links in the editor