-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Use Bootstrap modal dialogue box instead of alert() and confirm() #798
Comments
@Jaifroid I don't know if this is okay, but I have an already assigned issue. But this is a quick fix and I do have a lot of prior experience using bootstrap. Am I allowed to work on this issue? 😅 |
@ankur12-1610 If you have Bootstrap experience, this helps a lot. Let's just wait to see if @mossroy agrees with this issue, and if so, I can assign it to you. |
Sure :) np! |
@Jaifroid @ankur12-1610 I too have a lot of experience in bootstrap and am relatively new to open source so it would be really helpful for me I can work on this. I have a solution in mind which I can share if this issue is approved. |
@Jaifroid since I'm already working on an issue and @gaurav7019 is new to oss I'll like @gaurav7019 to claim this issue :) |
Thanks! |
Anytime :) |
Good idea. |
@gaurav7019 I've assigned this to you now, as requested. Because I suggest this is implemented as a function in When you make the new function in uiUtil, you will need to add it to the |
Thanks @Jaifroid. Will do that and raise a PR for review. |
One more thing. Avoid using Bootsrap's jQuery way of closing a modal. It destroys the whole modal and you have to rebuild it in code from scratch each time you want to use it. Instead, simply hide the modal so you can re-use it, when the user clicks on one of the dismiss options. Just do something like Also, I suggest you make the new function and dialogue box and implement it only in one example first, and then submit that for review, before you then implement it everywhere that 'alert()' and 'confirm()' are used, because changing the synchronous code to asynchronous in all the examples could be a bit tricky and make a PR that looks larger than it actually is. If you wait for merge of #797 , there will be a very obvious example of a |
Thanks, @Jaifroid for the heads up. So, I'll be making the following changes.
|
Although using JS
alert()
andconfirm()
is simple to code for, they have some issues:We should instead have a re-usable Bootstrap alert modal and a function to call it easily in
uiUtil.js
. The simple, first example from https://getbootstrap.com/docs/4.0/components/modal/ would suffice (live demo here). This would be universally compatible and non-blocking. We could Promisify it for ease of use.Obviously this would entail some minor rewriting of functions where we use alert or confirm, to make them asynchronous.
The text was updated successfully, but these errors were encountered: