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

Don't use JS-based prompts #146

Open
atjn opened this issue Dec 1, 2023 · 0 comments
Open

Don't use JS-based prompts #146

atjn opened this issue Dec 1, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@atjn
Copy link
Collaborator

atjn commented Dec 1, 2023

JavaScript-based prompts like alert, prompt and confirm are quick and easy to use, but are generally not a recommended way to interact with the user.

We cannot control how the browser displays them, or if the browser displays them at all. For example, a common annoyance with them is that the user can't close the browser while a prompt is being shown. They are also known to have accessibility issues. Another factor for us is that Tauri doesn't have full support for all prompt types, and we would like to only use browser features that we know works correctly in Tauri as well.

We should therefore build a few Svelte components that work on top of the standard modal component we are currently working on. We can make whatever prompt types that are necessary, and can then replace all native JS prompts with calls to open these custom modals. The API to do so can be modelled after the native JS API's if that is what we find to be the best developer experience.

@atjn atjn added the enhancement New feature or request label Dec 1, 2023
@github-project-automation github-project-automation bot moved this to Product Backlog in Scrum Board Group 3 Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant