Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[electron][dialog] As a Theia consumer, I want to see native dialogs only when running in electron env #8239

Open
kittaakos opened this issue Jul 27, 2020 · 0 comments
Labels
dialogs issues related to dialogs enhancement issues that are enhancements to current functionality - nice to haves ui/ux issues related to user interface / user experience

Comments

@kittaakos
Copy link
Contributor

Currently, we inject and open Theia dialogs all over the application ignoring the fact that the app might be running in electron env. As a Theia consumer, I want to see native dialogs only when my app is based on electron. Mixing and using native dialogs with the browsers ones is alien. Since we have to remove the remote namespace from the browser code, it would be great to have one generalized dialog service API in Theia that does all the magic for both the electron and browser.

We already have a common API for file-based dialogs:

export const FileDialogService = Symbol('FileDialogService');
export interface FileDialogService {
showOpenDialog(props: OpenFileDialogProps & { canSelectMany: true }, folder?: FileStat): Promise<MaybeArray<URI> | undefined>;
showOpenDialog(props: OpenFileDialogProps, folder?: FileStat): Promise<URI | undefined>;
showOpenDialog(props: OpenFileDialogProps, folder?: FileStat): Promise<MaybeArray<URI> | undefined>;
showSaveDialog(props: SaveFileDialogProps, folder?: FileStat): Promise<URI | undefined>
}

electron's dialog API seems to be a good starting point to create a standard dialog API for Theia.

Feature Description:

@kittaakos kittaakos added enhancement issues that are enhancements to current functionality - nice to haves dialogs issues related to dialogs ui/ux issues related to user interface / user experience labels Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialogs issues related to dialogs enhancement issues that are enhancements to current functionality - nice to haves ui/ux issues related to user interface / user experience
Projects
None yet
Development

No branches or pull requests

1 participant