Closed Bug 922707 Opened 11 years ago Closed 10 years ago

[app manager] Figure out how to have a Ctrl-R like experience for apps

Categories

(DevTools Graveyard :: WebIDE, defect, P1)

x86
All
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: paul, Unassigned)

References

Details

      No description provided.
cc'ing Julien who asked for this today so that he can describe his requirements
We want to be able to reload an app from whichever devtools tab we are, without switching tab. Using a keyboard shortcut would be better, F5 comes to my mind in addition to CTRL-R.
Priority: -- → P1
We need this for certified apps (Gaia apps). Is that tracked by this bug or should I file a separate bug?
Bug 920481 (not landed yet) make it possible to fast-reload any app. From the app manager, clicking "update" push the new source code, and then reload (not relaunch) the app.

Is that good enough?

I see a couple of possible improvements:
- from the toolbox, pressing F5 or Ctrl-R would trigger the update
- call a script before pushing the code (if you need to preprocess)
(In reply to Ben Francis [:benfrancis] from comment #4)
> We need this for certified apps (Gaia apps). Is that tracked by this bug or
> should I file a separate bug?

I think it should work (it has landed today): bug 927108
(In reply to Paul Rouget [:paul] from comment #5)
> Bug 920481 (not landed yet) make it possible to fast-reload any app. From
> the app manager, clicking "update" push the new source code, and then reload
> (not relaunch) the app.
> 
> Is that good enough?

No, I don't think so.

We had that feature in the classic simulator dashboard, and it enabled developers to refresh their apps, but it didn't provide the experience they're used to in the browser, in which a developer can go back and forth between their editor and the browser without having to go to a third application to trigger the refresh.

So we built a refresh feature directly into the simulator, and it was a significant improvement, because it did provide that optimized experience: make a change in your editor, switch directly to the simulator, and press Ctrl-R to repackage/reinstall/reload the app.

Many features for app development make sense in the app manager.  And some features need to be in the app manager (or also in the app manager) to be usable with real devices.  But others are better off inside the simulator (or also inside the simulator), because it gives developers more direct access to the feature in the context within which the developer is testing their app.  This is one of those features.

And its technically feasible the same way we implemented it in the classic simulator: via an unsolicited notification over the debugger connection from the simulator to the app manager that triggers the refresh.


> - call a script before pushing the code (if you need to preprocess)

Orthogonal to the question of where to expose a Ctrl-R experience, but a good idea nonetheless!  For the classic simulator, we discussed letting developers specify a build command or script to run each time they refresh an app (whether from within the simulator or in the dashboard).  I think I recall tofumatt requesting it, so he'd be a good person to ask about the use case.
Myk I think you're right that the shortcuts might make more sense on the Simulator itself, but that won't work when you're developing on a device and it won't let you differentiate between refreshing the system app and refreshing the app which is currently being displayed inside the system app. The Update button works better in both these cases.

I think both are valuable.
(In reply to Ben Francis [:benfrancis] from comment #8)
> Myk I think you're right that the shortcuts might make more sense on the
> Simulator itself, but that won't work when you're developing on a device and
> it won't let you differentiate between refreshing the system app and
> refreshing the app which is currently being displayed inside the system app.
> The Update button works better in both these cases.
> 
> I think both are valuable.

I agree!

This is one of those cases where it makes sense to have a feature in *both* the app manager and the simulator: in the app manager, because that's the only way to provide it to devices; and in the simulator, because that's a better way to provide it, and users want and expect it, and we can do it.

But that is very much a product/UX perspective, so cc: canuckistani for confirmation that it's the correct one in this case.
(In reply to Myk Melez [:myk] [@mykmelez] from comment #9)
> (In reply to Ben Francis [:benfrancis] from comment #8)
... 
> > I think both are valuable.
> 
> I agree!
> 
> This is one of those cases where it makes sense to have a feature in *both*
> the app manager and the simulator: in the app manager, because that's the
> only way to provide it to devices; and in the simulator, because that's a
> better way to provide it, and users want and expect it, and we can do it.

I agree as well.

> But that is very much a product/UX perspective, so cc: canuckistani for
> confirmation that it's the correct one in this case.

The one thing I would add is that developers *tend* to prefer a keyboard-centric workflow, therefore wherever we add functionality it should be both mouse & keyboard accessible, and documented as such.
CTRL-R is one of those simulator feature we disabled by lack of time/resources that is meant to be reworked and enabled again.

It proved to be a successfull ux in the simulator add on. But I'm pretty confident it won't be enough for Gaia development. We will also need some pre-push hook and also some stage Dir in Gaia build system...

I think Paul originally opened this bug to offer f5 feature for all targets, so we should also take some time to think about on-device development. One additional tweak after the update button on the apps panel is to also have a similar button in the toolbox.
(In reply to Jeff Griffiths (:canuckistani) from comment #10)

> The one thing I would add is that developers *tend* to prefer a
> keyboard-centric workflow, therefore wherever we add functionality it should
> be both mouse & keyboard accessible, and documented as such.

Indeed, and we can do this in the simulator.  For example, in the classic simulator, we had an App menu with a Refresh menuitem for keyboard access to the action.
Another alternative to re-packaging a Gaia app every time you hit Ctrl-R is to support hosted privileged/certified apps like we do in Gaia development in Firefox right now, then Ctrl-R literally just reloads a URL. See bug 932754 for more information.
Summary: [app manager] Figure out how to have a Ctrl-R'like experience for apps → [app manager] Figure out how to have a Ctrl-R like experience for apps
Depends on: AppManager-Kanban
(In reply to Jeff Griffiths (:canuckistani) from comment #10)
> The one thing I would add is that developers *tend* to prefer a
> keyboard-centric workflow, therefore wherever we add functionality it should
> be both mouse & keyboard accessible, and documented as such.

+1

When I debug an app in Nightly I try to avoid hitting Cmd+R since it will refresh the page (reload the system app) which is much slower then reloading only the app I am debugging.

The edit-code>>switch-to-browser>>refresh loop is hard coded into my brain, I keep refreshing by mistake :)
Filter on 86b7095e-2bd0-499e-a704-d00f2524aeef / PAUL STOP SETTING QA CONTACT TO THE DEVTOOLS COMPONENT'S WATCHERS EMAIL FOR BUGS YOU FILE :)
QA Contact: developer.tools
Ctrl-R works in the new App Manager. I believe this is enough to considered this bug fixed. If anything else is needed, we should file a new bug.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.