May 23, 2014, 11:05 AM
[OPEN] [#495] Feature request - delayed event mask showing for unexpectedly longer running tasks
Hi,
As per your notes on this page, you already support an eventMask minDelay:
https://examples2.ext.net/#/Events/D...hods/Overview/
As described: "The minimum amount of time to display the mask (defaults to 0). Setting the minDelay provides and minimum amount of time to display a message to the user before removing mask and executing success, failure and/or callback functions."
In other words, this actually delays when the request will start.
My feature request is slightly different. I often have situations where I want to start my AJAX request immediately and normally expect a quick response. But at times of course the server may take a bit longer to respond. So, in those cases, would prefer to have no event mask message by default, because I expect a quick response, but to perhaps configure what message to show the user if it is taking longer than a configured amount of time. And possibly an array/object hash of messages. For example, something like this:
I would assume the other properties, such as msgClass, customTarget etc all apply to these too, without needing their own config. The only conflict possibly is that if you set this then having showMask: true and minDelay may not make sense? (The durationMessages implies showMask will be true after that period of time, and minDelay would just delay it even further which kind of defeats the point!)
I sometimes do this myself with timeouts etc, but it could be useful to encapsulate and centralize with simple configuration like this perhaps?
If you agree this is useful, I don't mind whether it is better for you to configure this as an object or as an array of simple objects. Or even another way altogether...
Would also be nice to see it in 1.x as well to make upgrading a bit more seamless, but I do not think it is absolutely necessary (as my existing timeouts approach would still work, I guess, anyway).
Priority wise, I would not say it is urgent (for me) but just something I've been thinking about for a while and keep forgetting to raise it!
As per your notes on this page, you already support an eventMask minDelay:
https://examples2.ext.net/#/Events/D...hods/Overview/
As described: "The minimum amount of time to display the mask (defaults to 0). Setting the minDelay provides and minimum amount of time to display a message to the user before removing mask and executing success, failure and/or callback functions."
In other words, this actually delays when the request will start.
My feature request is slightly different. I often have situations where I want to start my AJAX request immediately and normally expect a quick response. But at times of course the server may take a bit longer to respond. So, in those cases, would prefer to have no event mask message by default, because I expect a quick response, but to perhaps configure what message to show the user if it is taking longer than a configured amount of time. And possibly an array/object hash of messages. For example, something like this:
eventMask: {
durationMessages: {
500: 'Hm... taking a bit longer than expected...',
1000: 'Well, this is a bit unexpected... almost there now...',
2000: 'Woah, this is embarrassing. The server is taking really long. Sorry about this... still waiting...'
}
}
In the above, each item in the object is a different amount of milliseconds to wait.I would assume the other properties, such as msgClass, customTarget etc all apply to these too, without needing their own config. The only conflict possibly is that if you set this then having showMask: true and minDelay may not make sense? (The durationMessages implies showMask will be true after that period of time, and minDelay would just delay it even further which kind of defeats the point!)
I sometimes do this myself with timeouts etc, but it could be useful to encapsulate and centralize with simple configuration like this perhaps?
If you agree this is useful, I don't mind whether it is better for you to configure this as an object or as an array of simple objects. Or even another way altogether...
Would also be nice to see it in 1.x as well to make upgrading a bit more seamless, but I do not think it is absolutely necessary (as my existing timeouts approach would still work, I guess, anyway).
Priority wise, I would not say it is urgent (for me) but just something I've been thinking about for a while and keep forgetting to raise it!
Last edited by Daniil; Dec 24, 2014 at 2:19 PM.
Reason: [OPEN]