-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/modal global loading indicator #229
base: master
Are you sure you want to change the base?
Conversation
itemsAlreadyLoaded = 0; | ||
}; | ||
|
||
var executeCallbacks = function (cbs, args, scope) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know that the letters a,l,l,a,c,k are expensive. Please fix param names for better reading. Also args should be arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arguments
can not be used because it is a reserved JavaScript word
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valid reason for not using arguments
* @description | ||
* This service manages loading processes. It can be used e.g. by a httpInterceptor to register a loading process | ||
*/ | ||
.service('Loading', function ($timeout) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a service called 'Loading' (see relution/common). How are name collisions handled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will use the one the is registered first, the other one is just ignored. Next step is to remove the Loading service from the portal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in fact you moved the loading service into the UI-Kit...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes with some small modifications, a merge request for the portal will come as soon as this mr is released in a new uikit version
service.start(); | ||
|
||
service.done(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add $timeout.flush()... i expect that the test will crash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it will fail because there are no $timeouts to flush but this is the expected behaviour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a check in afterEach to verify that there is no outstanding $timeout task
Fix #229