ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Suggestion: Add a hideDelay property for $ionicLoading & ionic.views.Loading

Open JonathanHindi opened this issue 12 years ago • 12 comments

Motivation

Most cases we use the Loading indicator while loading content from a webservice and want to block the the user from doing any action while the data is still loading and the view isn't rendered yet. So as angular take some time to render the view after receiving the data (the promise has been resolved) most of the time we hide the loading view inside the promise callback which hide the loading and the view is being rendered, so I suggest of adding a hideDelay property to give us the option to delay the hiding of the loading view until the view has completely rendered.

Like the showDelay property, it could be added to the config object of the $ionicLoading.show({}) method and it would be nice if you provide an option to override the value when using the hide method as $ionicLoading.hide(300).

I am implementing it by wrapping the loading.hide() method with a $timeout but i thought it would be nice to have it in core.

JonathanHindi avatar Feb 21 '14 13:02 JonathanHindi

Perhaps we should add something like https://github.com/ajoslin/angular-promise-tracker under the hood. @adamdbradley thoughts?

ajoslin avatar Feb 21 '14 18:02 ajoslin

Added duration option via cb1a5f62285fe5939274bdda9db169af69eddf35, see nightly docs for $ionicLoading. http://ionicframework.com/docs/nightly/api/service/$ionicLoading

ajoslin avatar Apr 08 '14 19:04 ajoslin

Would be nice to have a hideDelay or minShow option such that once the show has been called, it shows for a minimum amount of time. The goal is to reduce flicker. For example, if I show before calling http and hide when it returns, if the http only takes < 1s, it's a bad ux to show ionicLoading for < 1s too.

techntrails avatar Jan 28 '15 03:01 techntrails

+1 For @techntrails suggestion

jamhall avatar Feb 27 '15 16:02 jamhall

+1 For @techntrails suggestion

chillyprig avatar Mar 24 '15 12:03 chillyprig

+1 For @techntrails suggestion

beebun avatar Mar 24 '15 12:03 beebun

Bun

http://ongoo.cz/forex-dollar

24.03.2015, 15:38, "Bun suwanparsert" [email protected]:+1 For suggestion

—Reply to this email directly or .

Fayozjon avatar Mar 24 '15 16:03 Fayozjon

chillyprig

http://thefitfactory.net/android

24.03.2015, 15:37, "chillyprig" [email protected]:+1 For suggestion

—Reply to this email directly or .

Fayozjon avatar Mar 24 '15 16:03 Fayozjon

+1 For @techntrails suggestion

mikesol avatar Apr 28 '15 11:04 mikesol

+1 For @techntrails suggestion

Delay is a nice option but once I do display it, after a few hundred milliseconds or so, I don't want it to get hidden 50-100 milliseconds after that.

rrharvey avatar Aug 20 '15 18:08 rrharvey

+1

tbro028 avatar Oct 29 '15 22:10 tbro028

+1

jrbistuer avatar Nov 18 '16 11:11 jrbistuer