Hi devtools!
In the process of thinking how we can integrate Firefox OS Simulator with
devtools and Firefox ecosystem, I've been seing the opportunity to start
with landing a remotable App management developer tool in Firefox.
For now, there is nothing to help debugging app installation, update and
removal:
- It is especially hard to play with app update mechanism and push apps to
a device.
- The Simulator has only limited support for FF OS devices.
- There is an about:apps page in Fennec, but that's for end user. And
debugging with UI on device isn't really handy.
I think we do want a developer tool here!
It is now not an option to build a non-remote, platform specific, devtool.
So here is what I'm suggesting:
1) Move /b2g/chrome/content/dbg-webapps-actors.js to /dom/apps/ or a place
reachable by all platforms.
http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/dbg-webapps-actors.js
2) This actor only support install for now. So we need to add various new
requests to list, install, uninstall, update, ... apps
The simulator already implement some in a custom actor only shipped in
simulator's xpi.
3) Land in desktop a UI to query this remote actor, so that we can play
with apps on all platforms!
This goal matches Milestone 4 "App manager" goal from the Firefox Simulator
Roadmap:
https://docs.google.com/document/d/1UpW31ypq-IpIbhRzREvrlujfLC7NQl4qzLtWyve7uXc/edit#
also respond to the request made by Panos during dbg-webapps-actors.js's
review:
https://bugzilla.mozilla.org/show_bug.cgi?id=828863#c2
and would streamline fabrice's effort directly into firefox:
https://github.com/fabricedesre/b2gremote
Steps 1 and 2 are obvious to me. Apps are already working on all platforms,
we shouldn't segregate Actor's code to b2g, nor the simulator addon.
We can collaborate and land our effort in a common place. Then put some
additional
work to make them work for Desktop and Fennec.
Step 3 is more at risk, as it will require more work and ask the question
about how we do integrate the Simulator in firefox.
We can stop at step 2 and just start sharing code.
The simulator has been made to mainly target b2g desktop. Some support has
been
added to also support b2g devices and eventually firefox desktop.
Many features of the simulator aren't b2g specific and are also usefull on
desktop and mobile:
managing apps, mocking device APIs, debugging new APIs (geoloc, alarms,
...)
I'm deeply convinced we should do generic tools that will work everywhere.
Otherwise it will defeat the new #devtools rule where any new devtool has
to be remotable.
Not doing that gives the feeling that the web is clustered and various
stuff only happens in b2g platform.
Having said that, it shouldn't be too hard to convert the simulator to a
generic
tool. I think that the main modification would be UX wise. For now, the
simulator UI
doesn't feel really integrated into firefox and devtools various UIs.
I have the feeling that the existing "Connect" menu action,
and the related connect page should be tweaked to better integrate the
simulator.
Also the app management interface displayed by the simulator
should be plugged into the remote connection, not the opposite.
We do want to "manage apps of a given remote" and not
"have a local/global app management that eventually connect to a remote".
My naive idea was to display the app management UI into the remote toolbox,
as a new regular devtool panel, but this particular tool isn't tab-specific
and it can be misleading.
Can we get some talented UX resources thinking about devtools connected to
a device and the simulator?
It feel like we are not there yet with the existing "Connect" menu.
There is interesting mockups here, made by Harald, but focusing on App
creation screen:
https://dl.dropboxusercontent.com/u/1864007/Mozilla/17-10-12%20-%20Simulator.pdf
My overall idea is that the simulator addon should be limited to setup'n
spawn
a FF OS instance, and then automatically connect tools to it.
With a nice UX that:
- does'nt require going to some menu for displaying tool,
- spawn FF OS with just a button,
- avoid having multiple windows (if technicaly possible).
Most of the other features should be in firefox and work for all platforms.
Last but not least, here is a tentative implementation of such tool as an
addon.
It gives a rough idea of what could go wrong with making the actor work on
all platforms.
Desktop addon:
https://github.com/ochameau/webapps-tool/blob/master/webapps.xpi
Necessary fennec addon to register the actor:
https://github.com/ochameau/webapps-tool/blob/master/apps-actor/webapp-actor%40mozilla.org.xpi
It worked without major issues on Desktop, but highlighted one on Mobile,
where the code registering the intent is executed in chrome browser UI code.
That ends up preventing the intent from being registered and prevent the
app from being launched correctly.
I'd be very existed to drive this cross team project, if we can get at
least some efficient review cycles, and eventually some developement
resources from Apps and devtools teams to help:
- writing the actor and making it work on all platforms,
- integrate an App management UI in firefox.
++
Alex