Skip to content

Please comment out or convert to console.log all alert message boxes #55

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

Closed
dhiraj opened this issue Oct 14, 2015 · 7 comments
Closed

Comments

@dhiraj
Copy link

dhiraj commented Oct 14, 2015

I've got a massive form that I'm developing which has a ton of ASFDS drop downs. The server side is also in development and is therefore many times offline during regular testing.

Every time the server is down, and somehow browser refresh gets triggered, I get a whole lot of alert message boxes saying 'Loading select items failed' repeatedly.

Please eliminate entirely, or convert these into console.log as they are severely irritating. I found alerts with the same message in angular-schema-form-dynamic-select.js at the following line numbers 312,326 and 338.

@nicklasb
Copy link
Member

Hi,
I see your point. However, converting that into console.log() basically hides the problem in runtime, and there are likely other users, like myself, that relies on those messages.
However, I see how it could be a problem if the client is very standalone.

Instead, I propose a populationErrorCallback option that if assigned, is called when an error occurrs.
I think the parameters could be the form of the field, not the form.options as in the current error message(which could be better as well).

 {
   "key": "multiselectDynamicAsync",
   "type": "strapselect",
   "options": {
       "multiple": "true",
       "asyncCallback": "callBackMSDAsync",
       "populationErrorCallback": "onPopulationErrorCallback"
       }
   }
 },

That should provide solution for all, I'd think.

@nicklasb
Copy link
Member

Change of mind: It will be called onPopulationError, as ASF uses the onEvent-semantic.

@nicklasb
Copy link
Member

This is now added to the develop branch, please see so that it works for you:
20cdbbf

@nicklasb
Copy link
Member

Closing.

@albertjose
Copy link

@nicklasb this is in develop or master? onPopulationError don't work for me.

@nicklasb
Copy link
Member

I have not idea whatsoever what have happened, actually.
I can't find the commit where it is removed, either. Hm.
Well it should certainly be in there, so it should be re-added.

@nicklasb
Copy link
Member

Ah, now I see, that part have been rewritten to work with both generic and http-promises.
It was probably lost then. But sure, it should certainly be re-added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants