Last Comment Bug 705808 - TestPilot first-run tab shouldn't open for Thunderbird
: TestPilot first-run tab shouldn't open for Thunderbird
Product: Thunderbird
Classification: Client Software
Component: Testing Infrastructure (show other bugs)
: Trunk
: x86 All
-- normal (vote)
: Thunderbird 11.0
Assigned To: Mike Conley (:mconley)
Depends on:
Blocks: 700536
  Show dependency treegraph
Reported: 2011-11-28 11:23 PST by Mike Conley (:mconley)
Modified: 2011-12-14 16:42 PST (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch v1 (4.09 KB, patch)
2011-11-28 11:25 PST, Mike Conley (:mconley)
squibblyflabbetydoo: review-
Details | Diff | Splinter Review
Patch v2 (12.93 KB, patch)
2011-12-07 09:54 PST, Mike Conley (:mconley)
standard8: review+
bwinton: ui‑review+
standard8: approval‑comm‑aurora+
Details | Diff | Splinter Review

Description User image Mike Conley (:mconley) 2011-11-28 11:23:02 PST
We noticed this one in bug 700536 - the Account Provisioner modal dialog would block the 3pane, and if the user decided to order an account, the modal would close, the order form tab would open, and then the TestPilot tab would open and steal focus.

Our solution for now is to not open the TestPilot tab unless there are one or more accounts associated with the current profile. If not, we hold off on opening it until next time Thunderbird starts with 1 or more accounts.
Comment 1 User image Mike Conley (:mconley) 2011-11-28 11:25:23 PST
Created attachment 577316 [details] [diff] [review]
Patch v1

Here's my first go at it.  Am I duplicating too much code? (_appID, the THUNDERBIRD_APP_ID, etc...)
Comment 2 User image Jim Porter (:squib) 2011-12-01 18:02:38 PST
Comment on attachment 577316 [details] [diff] [review]
Patch v1

Review of attachment 577316 [details] [diff] [review]:

Hmm, you know, I'm sure I submitted this review yesterday. Maybe I dreamt it. Anyway, see my comments below, which were thankfully saved.

::: mail/app/profile/extensions/
@@ +187,5 @@
> +    delete this._appID;
> +    return this._appID = Components.classes[";1"]
> +        .getService(Components.interfaces.nsIXULAppInfo).ID;
> +  },
> +

Since we have this function in two other files already (content/window-utils.js and modules/interface.js), I think it's time we put it somewhere universally accessible to Test Pilot. setup.js might be the best place for this, so you could probably remove the other two instances of it and just call into this.

@@ +645,5 @@
>      }
>      return true;
>    },
> +  _canOpenTabs: function TPS__canOpenTabs() {

I think "_shouldOpenTabs" would be more accurate here.

@@ +652,5 @@
> +      // current profile does not have any accounts associated with it.
> +      Components.utils.import("resource:///modules/iteratorUtils.jsm");
> +      Components.utils.import("resource:///modules/mailServices.js");
> +      let numAccounts =  [x for each (x in fixIterator(MailServices.accounts.accounts))].length;
> +      return numAccounts > 0;

Can't we say "MailServices.accounts.accounts.Count()"? (Possibly a record for number of times "count" is used on one line!)
Comment 3 User image Mike Conley (:mconley) 2011-12-07 09:54:59 PST
Created attachment 579729 [details] [diff] [review]
Patch v2

Thanks for the review!  I've addressed the issues you brought up, and slightly changed the behaviour of this patch:  we now *never* open up the Test Pilot welcome tab, as opposed to waiting until we have 1 or more accounts.

Requesting some UI review to make sure this is the right course of action.
Comment 4 User image Mark Banner (:standard8) 2011-12-12 13:30:12 PST
Comment on attachment 579729 [details] [diff] [review]
Patch v2

Stealing review
Comment 5 User image Blake Winton (:bwinton) (:☕️) 2011-12-13 08:49:25 PST
Comment on attachment 579729 [details] [diff] [review]
Patch v2

Yeah, that page seems to contain nothing really useful, and we'll show something similar when the first study pops up, I believe.  ui-r=me.
Comment 6 User image Mark Banner (:standard8) 2011-12-14 16:11:13 PST
Comment on attachment 579729 [details] [diff] [review]
Patch v2

r=me, I'll land this with bitrot fixed when I land bug 709737.

Note You need to log in before you can comment on or make changes to this bug.