Open Bug 755898 Opened 12 years ago Updated 2 years ago

Rename Account manager files

Categories

(MailNews Core :: Account Manager, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: aceman, Assigned: aceman)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

The reasoning is this: It seems to be an anomaly as the other am-*.js files have a corresponding .xul file represent an Account Manager pane or a sub-dialog in the AM. am-prefs.js is just a library in the way e.g. amUtils.js is. The same can be done with am-help.js. So I propose to rename these 2 files to amUtils[Prefs,Help].js to keep the current naming system.
Original title: rename mailnews/base/prefs/am-prefs.js to amUtilsPrefs.js and am-help.js to amUtilsHelp.js I think that rename would add more confusion than it helps. Me, I expect related code to be right next to each other. If a dialog is comprised of 5 files, theses files should appear next to each other in an list of the directory (alphabetical, e.g. in Open dialog, in mxr etc.), so that I can quickly find it, and quickly open them all when re-starting work. It also allows me to know right away that SmtpServerEdit.js/xul and accountUtils.js are part of the AccountManager. A common prefix "am-" for all files of the dialog achieves this, but it would be even better to make a common directory prefs/accountmanager/ and put all files for AccountManager there. There are other files are even more scattered: AccountManager.js/xul and accountUtils.js and smtpEditOverlay.js/xul and SmtpServerEdit.js/xul and I think it's even more urgent to get these in line. So, please: * create base/content/prefs/accountmanager/ * files have no prefix * move all files for Account Manager (.js, .xul, .js util etc.) there
Summary: rename mailnews/base/prefs/am-prefs.js to amUtilsPrefs.js and am-help.js to amUtilsHelp.js → Rename Account manager files
But that would leave mailnews/base/prefs/ empty as all files would be moved to the new directory. All the files in /prefs are needed of the Account manager. What would be the point of that? Only Account wizard could be separated a bit, in only shares the *Util* files with Account manager.
Oh, that dir contains *only* the account manager? See, that wasn't clear to me. I assumed it contains the main prefs dialog!
Actually, that's not strictly true: the old account wizard is also in that dir. So the main prefs dialog is in mail/components/preferences/. :-(
For reference, my proposal is what IanN said: "files shared by AM and AW could be left where they are, with am-* and aw-* moved to relevant subdirectories". While you do that, rename the individual files to your heart's content, but without am-* prefix. That's my proposal, anyway.
Standard8, bienvenu, can I hear your preference?
Priority: -- → P5
(In reply to :aceman from comment #6) > Standard8, bienvenu, can I hear your preference? https://bugzilla.mozilla.org/show_bug.cgi?id=755898#c5 seems reasonable to me, but I don't have strong feelings about it. Ultimately, the account settings and options UI should merge somehow which would probably require a new structure/naming scheme.
(In reply to David :Bienvenu from comment #7) > https://bugzilla.mozilla.org/show_bug.cgi?id=755898#c5 seems reasonable to > me, but I don't have strong feelings about it. So you do not care either way, but will accept it if it is done?
(In reply to Ben Bucksch (:BenB) from comment #4) > Actually, that's not strictly true: the old account wizard is also in that dir. ...and SeaMonkey still uses the old e-mail account setup from there, unless that was moved into suite/mailnews, but I can't find anything aw-related there. Thus, please make sure not to break the suite in the process if this is implemented.
Yes, there is no intention to remove anything. And we have Ian to watch over it :)
Good, my comment was just a precaution that no "obsolete" files get lost. ;-) > (comment #1) * create base/content/prefs/accountmanager/ Sorting those out into subdirectories (i.e., am-* go there, aw-* into a parallel prefs/accountwizard directory) may be a way to more cleanly separate those, also given that prefs/accountcreation exists already for the TB mail-account setup.
Yes, that's how I understand it. The proposed tree would be like this: mailnews/base/prefs/content: accountUtils.js amUtils.js mailnews/base/prefs/content/accountmanager: AccountManager.* SmtpServerEdit.* addressing.* ... smtp.* smtpEditOverlay.* mailnews/base/prefs/content/accountwizard: AccountWizard.* accname.js ... outgoing.js ispUtils.js mailnews/base/prefs/content/accountcreation: * (as today) Just one question to BenB: Is base/content/prefs/ a typo instead of base/prefs/content/? Or do you really propose moving it under base/content/ ?
And any idea how to solve my original problem of prefs.js and help.js not sorting into the other files (for panes)? Removing the am- prefix will not help me. Can I use some other prefixes (like digits or letters) to force some nice ordering in the directory?
> accountwizard Can we name this something else, e.g. oldwizard/, specialaccountwizard/ or whatever? "accountwizard" sounds too much as if it was accountcreation/. > any idea how to solve my original problem of prefs.js and help.js not sorting Ideas: util/ lib-* > Is base/content/prefs/ a typo instead of base/prefs/content/? > Or do you really propose moving it under base/content/ ? It was a typo.
(In reply to Ben Bucksch (:BenB) from comment #14) > Can we name this something else, e.g. oldwizard/, specialaccountwizard/ or > whatever? "accountwizard" sounds too much as if it was accountcreation/. It was my understanding that parts of the old wizard other than e-mail accounts are still used (and will be in the future), e.g., for news and RSS accounts, both by Thunderbird and SeaMonkey, thus "old" or "special" aren't quite applicable.
(In reply to rsx11m from comment #15) > It was my understanding that parts of the old wizard other than e-mail > accounts are still used (and will be in the future), e.g., for news and RSS > accounts, both by Thunderbird and SeaMonkey, thus "old" or "special" aren't > quite applicable. It seems it is not wished to be used in the future, see bug 732109. So today it is not old (as there is no new one), but can become one. So I would be OK with "accountwizard-old" (to allow good sorting with the -new one).
Blocks: 732109
(In reply to Ben Bucksch (:BenB) from comment #14) > > any idea how to solve my original problem of prefs.js and help.js not sorting > Ideas: > util/ > lib-* > If this is .../accountmanager/util/ then I like it.
I'll make this depend on some bugs that shuffle code between files, that could influence which files are shared (utils).
Depends on: 536768, 755518
(In reply to :aceman from comment #16) > It seems it is not wished to be used in the future, see bug 732109. Thanks, I forgot about that one even though I've CC-ed myself to it... Thus, SeaMonkey eventually would need to move the code to suite/mailnews if it's still depended upon, once and whatever is going to happen in that other bug.
And what about files that are not under mailnews/base/prefs but under mailnews/extensions (like am-feeds.* and am-smime.*)?
(In reply to :aceman from comment #20) > And what about files that are not under mailnews/base/prefs but under > mailnews/extensions (like am-feeds.* and am-smime.*)? those are how extensions plug into the account manager ui, and they use the same naming convention to make it clear that's what they're doing. I suppose if you stop using that naming convention, that makes those file names a bit less useful.
No longer blocks: 728681, 732109
No longer depends on: 536768, 755454, 755518, 755885
Yes the AM has the convention and so also these files will need to be updated. Or we can make 'am-feeds' be the pane name instead of just 'feeds' and preserve the file name :) (What's up with bugzilla today...)
Blocks: 728681, 732109
Depends on: 536768, 755454, 755518, 755885
No longer blocks: 728681
Depends on: 728681
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.