Closed Bug 999417 Opened 6 years ago Closed 5 years ago

Land the new App Manager UI

Categories

(DevTools :: WebIDE, defect)

x86
All
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 32

People

(Reporter: paul, Assigned: paul)

References

Details

Attachments

(2 files, 5 obsolete files)

The current App Manager UI is too confusing, and the fact it's built inside a tab is a cause of many bugs.
Blocks: 999420
Assignee: nobody → paul
Attached file github PR (obsolete) —
Alright, I think it's time to get some initial landing. We need this code to land asap to unblock the work on itchpad.

To enable the code, you need to enable it at compile time: --enable-fxide. I don't want us to ship this code until we get something reasonably solid. It's self contained (we don't pollute /browser/locales and /browser/themes).

(a build peer review will be required)

The strategy to release the new app manager is:
- First, land this code
- Then, enable at build time but disabled in about:config
- Then enable it (it will replace the app manager) (released)
- Then remove the old app manager code

It's a lot of code, but I tried to keep it compatible with the initial version of the app manager (both tool can run at the same time). It could be better with some better project management code, and a more generic notion of "runtimes", but it's a lot of work.

There's not test yet.

Most of the code is split between fxide.js (UI code), and app-manager.js (logic code).

I have a huge todo list on the side. I will start filing bugs once this lands.

Ryan, don't be too severe with this review. We want this to land soon, and the code is not even compiled (won't get shipped to the user). Please split your comments in 3 categories:
- can't land until comment addressed
- can't be enabled at build time until comment addressed
- can't replace initial app manager until comment addressed

We will file follow-up bugs.
Attachment #8418074 - Flags: review?(jryans)
Comment on attachment 8418074 [details] [review]
github PR

Coming together nicely! :D There's not much that needs to be resolved before landing.

See the PR for various comments, as well as a review summary at the end.  I'll repeat that here for completeness.

I'll attempt to use this version for now on, so I can file bugs and such.

**Review Summary**

* Before landing
    * Explain meaning of FXIDE
        * Will this `fxide` name and directories live on after release, or merge with existing dirs, etc.?
    * Explain why I can't start projects
        * Only seems to work with the runtime apps list?
    * Get build peer review

* Before enabling at build time
    * Need to see how Itchpad interaction works once it lands with this
    * Pick one type of `Promise` / `promise`

* Before replacing current App Manager
    * Real URL hosting for templates URL
    * Need to keep some way to connect to manual host/port
    * Ensure existing projects from current version are ready to use immediately on first load
    * Break up `app-manager.js` into different modules
    * Move logic out of view JS files and down into `app-manager.js` / other logic modules
    * Break out inline styles and HTML into separate files
    * Pick a new name other than `lense`
    * Increase Logs font size when expanded
    * Why use sprites in the browser?
    * Maybe add some tooltips? :)
    * Various nits (check the full diff)
Attachment #8418074 - Flags: review?(jryans) → feedback+
What bug do I block for things to be done before replacing the current one?
Blocks: build-am2
Blocks: 987089
(In reply to J. Ryan Stinnett [:jryans] from comment #2)
> **Review Summary**
> 
> * Before landing
>     * Explain meaning of FXIDE
>         * Will this `fxide` name and directories live on after release, or
> merge with existing dirs, etc.?

fxide is a generic name. The same way "browser" is the name of "firefox".

>     * Explain why I can't start projects
>         * Only seems to work with the runtime apps list?

It should work with the simulator. It works here.

>     * Get build peer review

Yes


>     * Pick one type of `Promise` / `promise`


I'll do that in this bug.
Attachment #8418074 - Attachment is obsolete: true
Attachment #8418701 - Flags: review?(jryans)
Attached patch v1 (obsolete) — Splinter Review
Switching to bugzilla (let's forget about the github PR)
Attachment #8418701 - Attachment is obsolete: true
Attachment #8418701 - Flags: review?(jryans)
Attachment #8418703 - Flags: review?(jryans)
Comment on attachment 8418703 [details] [diff] [review]
v1

(build peer review)

Michael,

we introduce a new project in the devtools. Its codename is fxide. This is an initial landing, and we don't want to build it by default (yet). We also try to keep the code as self contained as possible as we might want to be able to ship it outside of Firefox one day.

Can you look at:

/configure.in
/browser/app/profile/firefox.js
/browser/devtools/fxide/Makefile.in
and all the build-related files in /browser/devtools/fxide/

Thank you.
Attachment #8418703 - Flags: review?(mshal)
(In reply to J. Ryan Stinnett [:jryans] from comment #3)
> What bug do I block for things to be done before replacing the current one?

See https://bugzilla.mozilla.org/showdependencytree.cgi?id=999417&hide_resolved=1
Attached patch v1.1 (obsolete) — Splinter Review
Attachment #8418703 - Attachment is obsolete: true
Attachment #8418703 - Flags: review?(mshal)
Attachment #8418703 - Flags: review?(jryans)
Attachment #8418744 - Flags: review?(jryans)
Attachment #8418744 - Flags: review?(mshal)
Comment on attachment 8418744 [details] [diff] [review]
v1.1

Everything looks good from a build perspective.
Attachment #8418744 - Flags: review?(mshal) → review+
Comment on attachment 8418744 [details] [diff] [review]
v1.1

Review of attachment 8418744 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/fxide/content/fxide.js
@@ +6,5 @@
> +const Cu = Components.utils;
> +const Ci = Components.interfaces;
> +
> +Cu.import("resource:///modules/devtools/gDevTools.jsm");
> +Cu.import("resource://gre/modules/Promise.jsm");

It doesn't seem like you use this currently...?  Seems other people return all the promise you are using in this file.

::: browser/devtools/fxide/modules/app-manager.js
@@ +3,5 @@
> + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> +
> +const {Cu} = require("chrome");
> +
> +Cu.import("resource://gre/modules/Promise.jsm");

Other DevTools code loads this as:

let { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});

so it is used as the lowercase version.  Are we not doing that anymore in new files?
(In reply to J. Ryan Stinnett [:jryans] from comment #11)
> Comment on attachment 8418744 [details] [diff] [review]
> v1.1
> 
> Review of attachment 8418744 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: browser/devtools/fxide/content/fxide.js
> @@ +6,5 @@
> > +const Cu = Components.utils;
> > +const Ci = Components.interfaces;
> > +
> > +Cu.import("resource:///modules/devtools/gDevTools.jsm");
> > +Cu.import("resource://gre/modules/Promise.jsm");
> 
> It doesn't seem like you use this currently...?  Seems other people return
> all the promise you are using in this file.

Promise is used in the current integration patch in Bug 987089, but it will not be needed anymore after I upload an updated patch that changes the itchpad API slightly (which I will do shortly)
(In reply to Brian Grinstead [:bgrins] from comment #12)
> (In reply to J. Ryan Stinnett [:jryans] from comment #11)
> > Comment on attachment 8418744 [details] [diff] [review]
> > v1.1
> > 
> > Review of attachment 8418744 [details] [diff] [review]:
> > -----------------------------------------------------------------
> > 
> > ::: browser/devtools/fxide/content/fxide.js
> > @@ +6,5 @@
> > > +const Cu = Components.utils;
> > > +const Ci = Components.interfaces;
> > > +
> > > +Cu.import("resource:///modules/devtools/gDevTools.jsm");
> > > +Cu.import("resource://gre/modules/Promise.jsm");
> > 
> > It doesn't seem like you use this currently...?  Seems other people return
> > all the promise you are using in this file.
> 
> Promise is used in the current integration patch in Bug 987089, but it will
> not be needed anymore after I upload an updated patch that changes the
> itchpad API slightly (which I will do shortly)

As of https://bugzilla.mozilla.org/show_bug.cgi?id=987089#c38, Promise is no longer needed for the itchpad integration if you have the latest two patches from Bug 987089 applied.
(In reply to Paul Rouget [:paul] (slow to respond. Ping me on IRC) from comment #4)
> (In reply to J. Ryan Stinnett [:jryans] from comment #2)
> > **Review Summary**
> > 
> > * Before landing
> >     * Explain meaning of FXIDE
> >         * Will this `fxide` name and directories live on after release, or
> > merge with existing dirs, etc.?
> 
> fxide is a generic name. The same way "browser" is the name of "firefox".

Okay, I'd still like to understand the thinking here in more detail.

Do you imagine we'll call the end result "Firefox IDE"?  Will we point at the end result and say "this is our IDE for Firefox OS / apps"?  I haven't really heard these words said much yet so far.  The only thing I've heard is App Manager v2 / v3.  Obviously, I understand that it now contains an editor and resembles other tools that people call IDEs.

I think part of it is the "fx" portion of "fxide":  Your analogy about it being a generic name seems flawed since it includes the branded browser's name of Firefox / "fx".  All the files are already under the "browser" directory, so "fx" is redundant.

I think it's important to get even code names "right" / close to the name of the end product early on because that's what everyone will say, at least internally, and it gets really confusing when they don't match the external / marketing name.  Also, people tend to avoid changing internal names to match external names after the fact, since tons of files are changed and moved to do it, it bitrots all patches, etc.

This seems simpler to hash out over IRC or Vidyo, rather than having me post many hypothetical questions to understand your thinking. :) I know you want to land now / yesterday, so let's work through this one last thing, and you should be ready to land.
(In reply to Paul Rouget [:paul] (slow to respond. Ping me on IRC) from comment #4)
> (In reply to J. Ryan Stinnett [:jryans] from comment #2)
> >     * Explain why I can't start projects
> >         * Only seems to work with the runtime apps list?
> 
> It should work with the simulator. It works here.

Haha, it actually works here too...  Most of my projects just have errors so it refuses to install them. ;)
(In reply to J. Ryan Stinnett [:jryans] from comment #14)
> (In reply to Paul Rouget [:paul] (slow to respond. Ping me on IRC) from
> comment #4)
> > (In reply to J. Ryan Stinnett [:jryans] from comment #2)
> > > **Review Summary**
> > > 
> > > * Before landing
> > >     * Explain meaning of FXIDE
> > >         * Will this `fxide` name and directories live on after release, or
> > > merge with existing dirs, etc.?
> > 
> > fxide is a generic name. The same way "browser" is the name of "firefox".
> 
> Okay, I'd still like to understand the thinking here in more detail.
> 
> Do you imagine we'll call the end result "Firefox IDE"?  Will we point at
> the end result and say "this is our IDE for Firefox OS / apps"?  I haven't
> really heard these words said much yet so far.  The only thing I've heard is
> App Manager v2 / v3.  Obviously, I understand that it now contains an editor
> and resembles other tools that people call IDEs.

It's totally an IDE :)

> I think part of it is the "fx" portion of "fxide":  Your analogy about it
> being a generic name seems flawed since it includes the branded browser's
> name of Firefox / "fx".  All the files are already under the "browser"
> directory, so "fx" is redundant.

Right. But I think it sounds better than just "ide".

> I think it's important to get even code names "right" / close to the name of
> the end product early on because that's what everyone will say, at least
> internally, and it gets really confusing when they don't match the external
> / marketing name.  Also, people tend to avoid changing internal names to
> match external names after the fact, since tons of files are changed and
> moved to do it, it bitrots all patches, etc.

I'm not strongly attached to fxide. I don't even like it. It was first fxcode,
but it's too close to xcode. I really don't want to keep the name app-manager
because:
- it won't only be about app in the future
- it's not only a "manager", it's an editor too
- it needs to live next to the previous app-manager (we can't have 2 directories with the same name)

> This seems simpler to hash out over IRC or Vidyo, rather than having me post
> many hypothetical questions to understand your thinking. :) I know you want
> to land now / yesterday, so let's work through this one last thing, and you
> should be ready to land.

Alright!
(In reply to J. Ryan Stinnett [:jryans] from comment #2)
>     * Maybe add some tooltips? :)

There are tooltips. But they don't work when buttons are disabled. Added to my todolist.
Just for the record (and this is only valid at the time I'm typing this), here is my todolist:

Before enable:
* "no simulator" experience
* "no device" experience
* "no adb addon" install experience
* if no USB devices, or fail to connect, link to troubleshouting section
* first run experience
* if no app, suggest creating new app
* -chrome chrome://fxide/content doesn’t work well
* unlistenToApps
* Send commands to AppManager (from vim, I want to be able to build): bug 1007218
* missing icon in "remove project"
* support cordova
* Make sure we cover all the features of the V1
* pre-hook  
* update MDN
* blue icons for debug and device
* Need to keep some way to connect to manual host/port
* Ensure existing projects from current version are ready to use immediately on first load
* Break up `app-manager.js` into different modules
* Move logic out of view JS files and down into `app-manager.js` / other logic modules
* Increase Logs font size when expanded
* Why use sprites in the browser? (PAUL: ?)
* Maybe add some tooltips? (PAUL: we have tooltips)

Before build:
* rtl
* Can't copy logs, or even select just a line
* newapp.js logic in app-manager.js
* disable black theme in toolbox and itchpad 
* toolbox can stay open if device disconnected
* windows & linux support  
* remove animation from panels  
* If icon updated on hard drive, only the cached version appears (in 3 locations)
* inline HTML and CSS for permission table and device info: UGLY!!!
* Real URL hosting for templates URL
* icons are cut in linux
  
Itchpad:
* add gear to itchpad header
* add validation dots to itchpad header
* Update logo & name
* add “edit manifest” button
* menu “Edit” and “File"  
* The manifest file should be very visible and have a special syntax highlighting

Misc:
* resource:/// … /fxide/…  
* Ctrl-w Ctrl-q is confusing
* add real URL for app templates
* Sheet Apps are considered “closed” after one of their window is closed. bug 999414
* command line options
* Show all the simulators (from JSON online), and add an “install” button
* uninstall  
* running adb logcat disconnect the device  
* cache template JSON (and download asap)
In term of OS integration, the main issue is the panel overflow on Linux and Windows. I'll look at that later.
(In reply to J. Ryan Stinnett [:jryans] from comment #2)
>     * Why use sprites in the browser?

I don't understand that.
We agreed over Vidyo to rename to just "ide" since that's a generic word for what we have here.
(In reply to Paul Rouget [:paul] (slow to respond. Ping me on IRC) from comment #20)
> (In reply to J. Ryan Stinnett [:jryans] from comment #2)
> >     * Why use sprites in the browser?
> 
> I don't understand that.

Paul explained we already use them in many places in the browser.  Sort of blows my mind that this is necessary... :( But anyway, seems fine then.
(In reply to J. Ryan Stinnett [:jryans] from comment #21)
> We agreed over Vidyo to rename to just "ide" since that's a generic word for
> what we have here.

My other suggestion would be "webide", which gives it a bit more specificity (and heft) while remaining generic enough.  I would also consider "webappide", although y'all noted that it won't be app-specific in the future, so that seems too constraining.
Right, "ide" feels light. And I like webide. So I'll go for webide.
Fixed the promises. Rename fxide to webide.
Attachment #8418744 - Attachment is obsolete: true
Attachment #8418744 - Flags: review?(jryans)
Attachment #8420549 - Flags: review?(jryans)
Blocks: 999399
No longer blocks: 999399
Blocks: 981482
Duplicate of this bug: build-am2
Comment on attachment 8420549 [details] [diff] [review]
v1.2: Land the new App Manager UI. r=jryans r=mshal

Cancelling the review. I want to clean up the /themes/ code.
Attachment #8420549 - Flags: review?(jryans)
Michael, sorry to ask you to re-review this. 2 things changed: we changed the name (fxide -> webide), we changed the way /themes/ is build (no platform specific directories, just preprocessor).
Attachment #8420549 - Attachment is obsolete: true
Attachment #8420937 - Flags: review?(mshal)
Comment on attachment 8420937 [details] [diff] [review]
v1.2: Land the new App Manager UI. r=jryans r=mshal

Notable changes (beside renaming): no platform-specific css files anymore (see previous comment), and fixed a bunch of issues for Linux and Windows.
Attachment #8420937 - Flags: review?(jryans)
Blocks: 1008951
Blocks: 1007218
No longer blocks: 999420
Comment on attachment 8420937 [details] [diff] [review]
v1.2: Land the new App Manager UI. r=jryans r=mshal

Review of attachment 8420937 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good! :D "webide" seems fine to me.

::: browser/devtools/webide/locales/en-US/webide.properties
@@ +8,5 @@
> +runtimeButton_label=Select Runtime
> +projectButton_label=Open App
> +
> +importPackagedApp_title=Select directory
> +importHostedApp_title=Open Hosted Ap

Ap -> App
Attachment #8420937 - Flags: review?(jryans) → review+
Attachment #8421055 - Flags: review+
Comment on attachment 8420937 [details] [diff] [review]
v1.2: Land the new App Manager UI. r=jryans r=mshal

Build side still looks good!
Attachment #8420937 - Flags: review?(mshal) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/85c60372f2bf
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 32
Duplicate of this bug: 912888
Duplicate of this bug: 919502
Duplicate of this bug: 912917
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.