These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Supporting IGB with modern tooling

Author
SJ Astralana
Syncore
#1 - 2015-05-20 08:33:39 UTC
I'm not completely there, but I'm reasonably close to having a responsive web app running under the IGB.

AngularJs:

What doesn't work:

app.js
angular.module('app', ['ui.date', 'submit', 'validated.input', 'ui.bootstrap']);

controller.js

angular.module('app').controller(...
For some reason, subsequent calls to angular.module('app') always return null. Even introducing a global app variable goes null and can't be referenced in the controllers.

What does work:

In each controller:
var app = angular.module('app', ['ui.date', 'submit', 'validated.input', 'ui.bootstrap']);
app.controller(...

If you load one controller at a time you can make this work.

Jquery: ">=1.6 <2". 2.0.0 and above doesn't work at all.

Bootstrap 3: Works fine. Almost makes me want to open a twitter account.

SignalR: Surprisingly, works. Even before now I thought this was the most amazing javascript invention ever.

Unsolved problems: Bootstrap/Angular typeahead dropdown. Angular/Jquery calendar popup.

If enough responses add to what works and doesn't work, who knows, maybe this little post may grow up to be a sticky.


Hyperdrive your production business: Eve Production Manager

Jack Tronic
borkedLabs
#2 - 2015-05-20 17:01:26 UTC  |  Edited by: Jack Tronic
CCP is phasing out the IGB long term.

You can use this ECMAScript 5 shim to fix those libraries potentially (you'll also want the sham!)

https://github.com/es-shims/es5-shim
SJ Astralana
Syncore
#3 - 2015-05-21 08:31:42 UTC
Yeah yeah long term is basically never. Some of us choose to support a browser while surfing logs that say something like "I have no ******* idea what this is."


The shims didn't help but it was a solid suggestion. What does work is the angular workaround listed above, and restricting dependencies to what work with angular 1.2.x and jquery 1.9.x. I have my calendars and typeaheads working IGB so I'm happy for now.

Hyperdrive your production business: Eve Production Manager

Jack Tronic
borkedLabs
#4 - 2015-05-21 18:33:09 UTC
For debugging in IGB, it's useful to just wrap your JS in try {} catch(e) { alert(e); } blocks to catch any javascript errors thrown in a popup. I can't imagine angular returning null without throwing an actual error.
Alternatively you can look at the EVE logserver output which also happens to grab errors.
SJ Astralana
Syncore
#5 - 2015-05-22 22:31:42 UTC
lol mystery solved. CCPEVE.requestTrust('http://' + document.location.hostname + '/')(); doesn't return so nothing after it in a file will get called.

Hyperdrive your production business: Eve Production Manager