Last Comment Bug 804008 - Convert mailnews/base/content/folderWidgets.xml to mailServices.js
: Convert mailnews/base/content/folderWidgets.xml to mailServices.js
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: All All
: -- minor (vote)
: Thunderbird 19.0
Assigned To: :aceman
Depends on:
Blocks: 720358
  Show dependency treegraph
Reported: 2012-10-21 12:36 PDT by :aceman
Modified: 2012-10-28 15:47 PDT (History)
3 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

patch (8.61 KB, patch)
2012-10-21 13:09 PDT, :aceman
neil: review-
iann_bugzilla: feedback-
Details | Diff | Splinter Review
New Folder Dialog (14.33 KB, image/png)
2012-10-23 13:59 PDT, Ian Neal
no flags Details
Screenshot on first click of dropdown (15.80 KB, image/png)
2012-10-23 13:59 PDT, Ian Neal
no flags Details
Screenshot on clicking arrow to expand into subfolders (52.51 KB, image/png)
2012-10-23 14:01 PDT, Ian Neal
no flags Details
patch v2 (8.55 KB, patch)
2012-10-23 14:22 PDT, :aceman
neil: review+
iann_bugzilla: feedback+
Details | Diff | Splinter Review

Description :aceman 2012-10-21 12:36:24 PDT
var session = Cc[";1"].
let acctMgr = Cc[";1"].
var session = Cc[";1"].
var servers = Cc[";1"].
var session = Cc[";1"]
Comment 1 :aceman 2012-10-21 13:09:53 PDT
Created attachment 673726 [details] [diff] [review]

I intentionally leave out the account-manager service in _ensureInitialized() because that is covered in bug 749200.
Comment 2 2012-10-21 14:00:11 PDT
Comment on attachment 673726 [details] [diff] [review]

I'm not sure where SeaMonkey uses this but I did track down one use in the New Folder dialog.

Unfortunately there were a number of JavaScript exceptions in the Error Console that may or may not have been responsible for the accounts being duplicated.
Comment 3 :aceman 2012-10-21 14:16:15 PDT
It is also used in the Account manager for the folder targets (junk/copies/archive).

But I didn't understand what the problem is you see. What is being duplicated and what are the exceptions?
Comment 4 :aceman 2012-10-22 11:58:02 PDT
Comment on attachment 673726 [details] [diff] [review]

Ian, can you please try in Seamonkey if you also see Neil's problems?
Comment 5 Ian Neal 2012-10-23 13:57:28 PDT
Comment on attachment 673726 [details] [diff] [review]

I see this too in the new folder dialog.
1/ Right click on account name / folder name
2/ Select New Folder/Subfolder
3/ New Folder dialog appears
4/ Account name / folder name appears in the "Create as a subfolder of:" picker
5/ Click on the picker

Actual result
1/ Two entries for account name

Expected result
1/ One entry for account name

If you click on one of the arrows to expand the subfolders under the account name, even more menu items appear in the main drop down.
Each time you click on the drop down you get more menu items appearing in the list.

I attach some screenshots to demonstrate.
Comment 6 Ian Neal 2012-10-23 13:59:14 PDT
Created attachment 674372 [details]
New Folder Dialog
Comment 7 Ian Neal 2012-10-23 13:59:49 PDT
Created attachment 674373 [details]
Screenshot on first click of dropdown
Comment 8 Ian Neal 2012-10-23 14:01:21 PDT
Created attachment 674374 [details]
Screenshot on clicking arrow to expand into subfolders
Comment 9 :aceman 2012-10-23 14:22:30 PDT
Created attachment 674382 [details] [diff] [review]
patch v2

I can see the problem in that dialog. I forgot some occurrences of 'this.' before MailServices. I wonder why it worked at all other places I tested. Probably those places were already importing mailServices globally.

This should be better.
Comment 10 :aceman 2012-10-23 15:19:02 PDT
Comment on attachment 674382 [details] [diff] [review]
patch v2

Thanks Ian.
Comment 11 Ryan VanderMeulen [:RyanVM] 2012-10-28 15:47:56 PDT

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