Determined by scanning elements for $controller/$au (do we show without au being started) stopping tree search after one find (may add something to global to have earlier detection)
If true icon is lit up and maybe check for debugconfiguration to determine if in debug mode vs prod (also print to console some information information and possibly a link and additional information)
If debug popup window on icon click will allow open inspector panel for aurelia directly
else display message
2 panels should show up in debug tools one for performance and one for layout
Adding onto this, the ability to enable a production mode to prevent the extension from being used on some sites would be great. Other frameworks/library extensions offer this functionality.
Came here from a post in discourse (https://discourse.aurelia.io/t/aurelia-chrome-extension-and-vnext/3004). I like the idea of using web-ext to give Firefox some love.
Does anyone know what is required to make the inspector more dynamic like some of the other framework inspectors are? It'd be nice to see real-time updates on the model, as well as make changes to the model in the inspector.
Yeah we got a scheduler that can deal with that.
+1 for Firefox
One thing I had pondered was just building an Aurelia app that you could drop in like a plugin to your own app, that will enable an inspector overlay. This wouldn't use the dev tools of any particular browser at all. Just tossing this out there as an option. No need to deal with browser-specific APIs or passing/consuming data across process boundaries.
@EisenbergEffect - I'm down with this approach. I've used other integrated stuff like weinre and vorlon.js for remote debugging with some success. I think more importantly than how it is built we need to think about how it provides value that the existing browser tools don't. @brandonseydel's post is a good start.
Down the road, once the extension is operational, it would be a great idea to weave its use into the official docs/tutorials. The first time I ever used it to inspect a binding context years ago when I was first learning Aurelia, that instantly made so many things "click" that I just hadn't quite gotten over the course of reading the docs (and being brand new to the whole concept of SPAs/data binding in general).
It seems like implementing your own inspector would be difficult. Like, on the surface it might be easy, but once you get into you find that Google probably has a million lines of code involved. Not trying to scare anyone, and I don't know for certain... Just thinking out loud.
It shouldn't be more than a few thousand lines. The bulk of the work will be the UI aspect - how to represent the app's scope structure, binding contexts, controllers, etc, and how the user can interact with the visual artifacts.
For getting the necessary data to feed to the UI (and keeping it up-to-date live) we already have some easy-to-use API surface in the framework itself. Integrating that with a chrome extension involves a bit of boilerplate but nothing complicated. We've done that before :)
Most helpful comment
General Thoughts
Detection
Determined by scanning elements for $controller/$au (do we show without au being started) stopping tree search after one find (may add something to global to have earlier detection)
If true icon is lit up and maybe check for debugconfiguration to determine if in debug mode vs prod (also print to console some information information and possibly a link and additional information)
If debug popup window on icon click will allow open inspector panel for aurelia directly
else display message
Design
2 panels should show up in debug tools one for performance and one for layout