-
Notifications
You must be signed in to change notification settings - Fork 143
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
Do not use native prompts #980
Comments
I wonder if something like jQuery UI's dialog would be helpful. |
Isn't this something to be fixed in the browsers?
I don't think so, as jqueryUI doesn't blcok the event loop. OOUI has prompts that uses promises (resolved when the user submits), but then doing something like that would be a pretty big change on the codebase. |
Ahh, I thought some of the |
The issue with replacing prompt() and alert() is that they both functions that suspend until user interaction, so they may be implemented with if statements and other inline things. Here, I would think OOUI is ideal, then partially restructuring every instance of alert, prompt, ext. using a callback instead, which could be fed into the same if statements - so instead of:
It should be:
This shouldn't require too much work past some copy-pasting and a rough restructuring. I'm very happy to aid slowly transitioning to OOUI rather than jQueryUI and outdated Javascript functions such as prompt ext. |
I believe there is a strong desire against using OOUI in Twinkle for two reasons; one is that OOUI doesn't allow its modal dialogs to be moved; the other is that OOUI uses lots of white space in its elements and with something like twinkle's speedy module that has tens of options, that may result in lots of scrolling. |
This is more for #414, but basically what @Huji said: windows won't move, poor use of space. The longer is answer is that it'd be a spectacularly massive undertaking. The even longer answer is that I'm not sure, and I think recent events have made clear, that while OOUI may be around for a while, it's not a long-term solution. |
Twinkle uses
prompt()
in a few places. The problem with this is prompt is not RTL-friendly. That is, the textbox it provides to the user to enter a response in is always left-to-right.Instead of relying on native functions, Twinkle should create a dialog that is internationalizeable.
The text was updated successfully, but these errors were encountered: