Closed tip2tail closed 5 years ago
@tip2tail,
Can you also include an updated min.js
, I've been using: https://closure-compiler.appspot.com/home
Also, I'm wondering if we should make the default delay to -1 so toasts by default don't disappear unless you specify. Makes it easier to keep them permanent and if we do go down this route, it might make more sense just to change it so if the delay
parameter is passed then we hide after X amount of time and if the delay parameter is not passed we keep it showing until manually dismissed.
Thoughts?
Hi @Script47. I did update the .min.js file but used a different compress tool. I will use the one you mention in order to keep this constant. What settings did you select for this?
As for your proposal of default to stay open, I think that is a very good idea. I can refine this pull request to fix that just now and resubmit shortly.
Thanks (y)
@Script47 I would also suggest we provide the timeout in seconds rather than miliseconds (and convert to miliseconds in the script).
My bad, I must have missed the min.js
changes!
Regarding the settings for the tool, I left them as is.
Regarding timeout in seconds, my only contention would that would be that JavaScript seems to handle things in milliseconds and for the sake of consistency I'd leave it.
OK happy to leave that as milliseconds. Will have an updated PR shortly.
@Script47 PR has been updated with changes as discussed.
As per the issue I raised, this PR will introduce the ability to disable the autohide functionality on Toast.
Setting delay to -1 will result in a Toast that will stay open until closed using the "x" close button.