replit / desktop

Replit Desktop App
114 stars 3 forks source link

Open repl.co and same origin links in the browser #95

Closed sergeichestakov closed 1 year ago

sergeichestakov commented 1 year ago

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 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