Closed sergeichestakov closed 1 year ago
would be useful to allow web to show native dialogs to the user. for example, in the before unload event if fs status is not clean (see [WS-302](https://linear.app/replit/issue/WS-302/figure-out-a-better-approach-to-before-unload))
yeah good point. I think the original thinking was because we only wanted to support a subset of the available options but I think we can do such gating on the web side and have the native client support them all in theory. fixed in latest commit
Why
A message box / dialog API would be generally useful any time we want to show or surface a native dialog to prompt the user from the web side. A concrete example of where this would be useful is if we want to replicate the behavior on web where we confirm if the user wants to leave the Repl (in the
beforeunload
handler) if the fs is still dirty. See this PR for context: https://github.com/replit/desktop/pull/58Fixes WS-677
What changed
Add showMessageBox API
Test plan
Tested on web in a local branch