compono / idibu-v3-api

4 stars 3 forks source link

iframe polluting console log #4

Open anakreon opened 6 years ago

anakreon commented 6 years ago

Hi, we are trying to integrate your iframe into our app. I have noticed that there's a lot of unnecessary stuff printed out to the console. Can it be removed?

We are using https://v3.idibu.com/c/integration/idibu, is this the production version of your app or just testing?

TimParkr commented 6 years ago

Hi Martin, This iframe is designed to be integrated with recruitment CRM systems and primarily inside SaaS based platforms used on laptop/PC/Mac. It is the production version but I thought I'd just mention the context in terms of you referring to an app. I don't know if that helps clarify why you may be having some issues? Kind regards, Tim

anakreon commented 6 years ago

Hi Tim,

yes, we are integrating with a CRM system on SaaS platform. I don't see how the type of target platform is related to my technical question? I could as well be deploying to my personal website on my home server and get the same issue. Iframes work the same regardless of the platform.

When I said an 'app', what I mean is an 'application', which can refer to any type of application. In our case it's a 'web application'.

Can a technical person reply to my technical question, please?

Best regards, Martin Hula

mjasikowski commented 6 years ago

Hi @anakreon

could you please give me an example of the console stuff you're talking about? All I can see are a few occurrences of "dialog" and "chrome-plugin-fix" lines being printed out for debug purposes (because our devs often have to diagnose issues on production using that) - not really something I would call "polluting", but this will be removed at some point nevertheless.

anakreon commented 6 years ago

Hi @yasikovsky

well, I guess we have a different definitions for 'polluting'. That's alright. They are not really just a few occurences, though. It's these:

'chrome-plugin-fix' ProjectDetailsManager.js:15:13 'init completed' WidgetContactlist.js:1290:5 '------------ cancel ---------------------' CustomSearchMap.js:36:9 'false' CustomSearchMap.js:37:9 'run initializeGmap' CustomSearchMap.js:364:5 'run init' CustomSearchMap.js:318:9 '[run] wait' CustomSearchMap.js:330:13 '[run] closing' ContactSearch.js:114:9 'call setLocationData' LocationManager.js:46:1 and probably some more...

They get printed with every action within the iframe. Just clicking through the top menu will give me about 15-20 lines in the console. If you need this sort of diagnostics, it's not hard to add a custom boolean flag that you can toggle from the console, when this sort of debugging is actually needed.

Also. you really shouldn't leave dead code in your codebase - CustomSearch.js - show_boxes_overlay(), hide_boxes_overlay(). They give me 'unreachable code after return statement' error in the console.

Thanks for investigating!

KeithHenry commented 5 years ago

I second @anakreon - production code should not be calling console.log for information messages.

In our CRM we have to find and fix issues too, and the amount of noise generated by the <iframe> makes it harder to find which errors are ours to fix and which are red herrings from Idibu.

For instance, in this log from my initial testing all of these messages are from the Idibu <iframe>, and all of them are useless for our own debugging (though no doubt very useful during Idibu's development):

image

In production we should only be seeing error messages.