Add AccountManager to the prefs in tab
Categories
(Thunderbird :: Account Manager, defect)
Tracking
(thunderbird68+)
Tracking | Status | |
---|---|---|
thunderbird68 | + | --- |
People
(Reporter: Paenglab, Assigned: Paenglab)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 32 obsolete files)
2.22 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
96.55 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
87.02 KB,
patch
|
darktrojan
:
review+
|
Details | Diff | Splinter Review |
88.60 KB,
image/png
|
Details |
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Comment 8•11 years ago
|
||
Assignee | ||
Comment 9•11 years ago
|
||
![]() |
||
Comment 10•11 years ago
|
||
Assignee | ||
Comment 11•11 years ago
|
||
Comment 12•11 years ago
|
||
Assignee | ||
Comment 13•11 years ago
|
||
Updated•11 years ago
|
Comment 14•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 15•11 years ago
|
||
Updated•11 years ago
|
Updated•11 years ago
|
![]() |
||
Comment 17•11 years ago
|
||
Comment 18•10 years ago
|
||
![]() |
||
Comment 19•10 years ago
|
||
Assignee | ||
Comment 20•10 years ago
|
||
Assignee | ||
Comment 21•10 years ago
|
||
Assignee | ||
Comment 22•10 years ago
|
||
![]() |
||
Comment 23•10 years ago
|
||
Assignee | ||
Comment 24•10 years ago
|
||
![]() |
||
Comment 25•10 years ago
|
||
![]() |
||
Comment 26•10 years ago
|
||
Assignee | ||
Comment 27•10 years ago
|
||
Assignee | ||
Comment 28•10 years ago
|
||
Comment 29•10 years ago
|
||
Updated•10 years ago
|
Updated•10 years ago
|
Assignee | ||
Comment 30•10 years ago
|
||
Assignee | ||
Comment 31•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 32•10 years ago
|
||
Assignee | ||
Comment 33•10 years ago
|
||
![]() |
||
Comment 34•10 years ago
|
||
Assignee | ||
Comment 35•10 years ago
|
||
Assignee | ||
Comment 36•10 years ago
|
||
Assignee | ||
Comment 37•10 years ago
|
||
Comment 38•9 years ago
|
||
Assignee | ||
Comment 39•9 years ago
|
||
![]() |
||
Comment 40•9 years ago
|
||
![]() |
||
Comment 41•9 years ago
|
||
![]() |
||
Comment 42•9 years ago
|
||
![]() |
||
Comment 43•9 years ago
|
||
Assignee | ||
Comment 44•9 years ago
|
||
![]() |
||
Comment 45•9 years ago
|
||
Comment 46•8 years ago
|
||
![]() |
||
Comment 47•8 years ago
|
||
Comment 48•8 years ago
|
||
![]() |
||
Comment 49•7 years ago
|
||
Assignee | ||
Comment 50•7 years ago
|
||
Assignee | ||
Comment 51•7 years ago
|
||
![]() |
||
Comment 52•7 years ago
|
||
![]() |
||
Comment 53•7 years ago
|
||
Assignee | ||
Comment 54•7 years ago
|
||
![]() |
||
Comment 55•6 years ago
|
||
I got this from Richard, shuffled some code in preferences.js to fix some linting errors. With the patch, the preferences panes are turned into radio buttons, so certainly some CSS isn't right here any more.
The "Accounts" tab is almost empty, and there are also a bunch of (minor) linting errors I didn't fix.
I hope Aceman can take over here.
![]() |
||
Comment 56•6 years ago
|
||
OK, this at least loads the AM content (the list of accounts and the right panel for the selected account pane).
Still needs some work like:
-totally ugly styling that affects all prefs
-OK button probably needs removing, but we have a lot of code hooked on it so that needs some thought when to invoke it
-closing prefs tab throws an error
But hopefully you can continue from here :)
Assignee | ||
Comment 57•6 years ago
|
||
Hmm, I still see nothing except the empty listbox and a OK button.
Assignee | ||
Comment 59•6 years ago
|
||
(In reply to :aceman from comment #56)
Created attachment 9062008 [details] [diff] [review]
AMtabcurrent.patchOK, this at least loads the AM content (the list of accounts and the right panel for the selected account pane).
Still needs some work like:
-totally ugly styling that affects all prefs
Fixed
-OK button probably needs removing, but we have a lot of code hooked on it so that needs some thought when to invoke it
The button is now needed to set the changes. Like the other parts of the prefs changes should immediately apply.
-closing prefs tab throws an error
You mean the aTab.browser.contentDocument.getElementById(...).currentPane is undefined ?
-
The pref tab is not restored when reopening TB.
-
When opening the pref tab I see: TypeError: prefPane.parentNode._fireEvent is not a functionAccountManager.js:177:27
But hopefully you can continue from here :)
This needs someone with more experience than me.
![]() |
||
Comment 60•6 years ago
|
||
I think this looks good in general. When Lightning is installed, I can see this problem already mentioned in comment #40.
STR: Open Options to the Display pane (or any other pane apart from Accounts). Close options. Tools > Account Settings. This opens the last opened pane, so Display, not the account settings.
I'd like to push this over the finishing line, even if we have to fix some issued during the beta cycle. Aceman, can you please keep looking at it. Mayby Geoff can also spent a bit of time here, I guess lately he's the guy who understands preferences in conjunction with Lightning best.
Comment 61•6 years ago
|
||
I've fixed the load-time and unload-time issues.
![]() |
||
Comment 62•6 years ago
•
|
||
Thanks Geoff, much appreciated. So now two tasks are left: Adjust tests for the new UI, try run here:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=fe90a2c95c01254e441d8fc0196b06f9ca7e6bc6
and getting rid of the "OK" button.
Any ideas on that?
EDIT: The try run also shows the remaining linting issues nicely.
![]() |
||
Comment 63•6 years ago
|
||
A few account related tests failing.
![]() |
||
Comment 64•6 years ago
|
||
Fixed linting errors. I'm not sure what to do in function MsgAccountManager(aSelectPage, aServer)
. I added XXX TODO.
![]() |
||
Comment 65•6 years ago
|
||
Changes:
- when closing the prefs tab having SMTP servers pane selected,
aTab.browser.contentWindow.getCurrentAccount() was null and then .incomingServer couldn't be retrieved. - I reordered some css to load messenger.css before accountManage.css so that the new styles override in some more AM dialogs.
Geoff:
1.After closing the Manage identities->Edit identity dialog with Cancel, I get
ReferenceError: reference to undefined property "contentFrame" in AccountManager.js:324:7
It's because the line document.addEventListener("dialogcancel", onNotAccept); in AccountManager.js adds this listener to all subdialogs that import AccountManager.js (just to get its functions, not the listeners).
- It seems persisting the tabID (server key) and then restoring it on TB restart does not work anyway, the prefs tab restores on the default account, not the last one.
![]() |
||
Comment 66•6 years ago
|
||
![]() |
||
Comment 67•6 years ago
|
||
(In reply to :aceman from comment #65)
Geoff:
1.After closing the Manage identities->Edit identity dialog with Cancel, I get
ReferenceError: reference to undefined property "contentFrame" in AccountManager.js:324:7
It's because the line document.addEventListener("dialogcancel", onNotAccept); in AccountManager.js adds this listener to all subdialogs that import AccountManager.js (just to get its functions, not the listeners).
For this, we probably can get rid of the ondialogaccept and ondialogcancel in AccountManager.js if we want to achieve all changes apply instantly (which isn't yet true for AM).
We could possibly remove that single user of onCancel in am-offline.js (and the 'rollback' code), but for saving the other changes, do you know how to hook on the tab close event and selecting a different pref pane? We could hook the onAccept code on that.
![]() |
||
Comment 68•6 years ago
|
||
(In reply to :aceman from comment #66)
+function selectAMServer(pane, aServerID, aPanelID) {
Why is this taking a 'pane' argument?
Hard to tell where code comes from in this multi-author bug, but wasn't this originally your code?
![]() |
||
Comment 69•6 years ago
|
||
(In reply to :aceman from comment #65)
Geoff:
1.After closing the Manage identities->Edit identity dialog with Cancel, I get
ReferenceError: reference to undefined property "contentFrame" in AccountManager.js:324:7
I split this out into bug 1552851 as it is not specific to AM being in a tab.
Comment 70•6 years ago
|
||
(In reply to :aceman from comment #65)
- It seems persisting the tabID (server key) and then restoring it on TB restart does not work anyway, the prefs tab restores on the default account, not the last one.
That doesn't work for any of the other panes either. They persist the selected tab in prefs, see: mail.preferences.advanced.selectedTabIndex and friends.
(In reply to :aceman from comment #67)
For this, we probably can get rid of the ondialogaccept and ondialogcancel in AccountManager.js if we want to achieve all changes apply instantly (which isn't yet true for AM).
We could possibly remove that single user of onCancel in am-offline.js (and the 'rollback' code), but for saving the other changes, do you know how to hook on the tab close event and selecting a different pref pane? We could hook the onAccept code on that.
It's not that simple. Changes don't have to apply instantly, but they need to have happened if the user switches to another tab, or another window, or if they click on something in the menus. I've been looking for a nice way to handle that, but I've found no better way than to change the 7 pages to save values as they change.
![]() |
||
Updated•6 years ago
|
![]() |
||
Comment 72•6 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #70)
It's not that simple. Changes don't have to apply instantly, but they need to have happened if the user switches to another tab, or another window, or if they click on something in the menus. I've been looking for a nice way to handle that, but I've found no better way than to change the 7 pages to save values as they change.
If somebody knows the events to listen to, we can save the changes on any of them.
So until then, I can save on change to other pref pane (e.g. from Accounts to Advanced) and on close of the whole prefs tab.
For the record, I am working on the patch right now.
Richard, could you find out why the Account actions button has no down arrow (it is a menu) and why the <textbox type="number"> elements are looking so ugly (multiple internal borders) ? These 2 things could be fixed in parallel, even in a separate bug as this affects also other pref panes.
Assignee | ||
Comment 73•6 years ago
|
||
Fixed the dropdown-arrow on Linux. Mac and Windows aren't affected.
![]() |
||
Comment 74•6 years ago
|
||
Assignee | ||
Comment 75•6 years ago
|
||
Because <button type="menu"> was never used in the FX/TB prefs until now?
Comment 76•6 years ago
|
||
Though perhaps it would have been better to key it on button[type="menu"] and not the id?
Assignee | ||
Comment 77•6 years ago
|
||
Made the dropmarker for all button[type="menu"].
![]() |
||
Comment 78•6 years ago
|
||
Assignee | ||
Comment 79•6 years ago
|
||
(In reply to :aceman from comment #78)
Comment on attachment 9069426 [details] [diff] [review]
1096006-AM-in-prefsTab-3.diff.patchReview of attachment 9069426 [details] [diff] [review]:
::: mail/themes/linux/mail/preferences/aboutPreferences.css
@@ +28,5 @@margin-top: 11px;
margin-bottom: 11px;
}+button[type="menu"] > .button-box > .button-menu-dropmarker {
So this needs to be moved for the other platforms too.
No, Mac and Windows have the needed rules in toolkit. Linux not.
@@ +32,5 @@
+button[type="menu"] > .button-box > .button-menu-dropmarker {
- margin-inline-end: 4px;
- list-style-image: url("chrome://global/skin/icons/arrow-dropdown-12.svg");
- -moz-context-properties: fill;
- fill: currentColor;
It seems a similar arrow is already applied at
https://searchfox.org/comm-central/source/mozilla/toolkit/themes/windows/
global/button.css#71, why doesn't our button pick it up and then we do not
need this block in our css files?
You reference a rule from Windows which doesn't exist on Linux.
![]() |
||
Comment 80•6 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #79)
+button[type="menu"] > .button-box > .button-menu-dropmarker {
So this needs to be moved for the other platforms too.
No, Mac and Windows have the needed rules in toolkit. Linux not.
It seems to me you add those platforms in this same patch, just with the id, not button[type="menu"]...
@@ +32,5 @@
It seems a similar arrow is already applied at
https://searchfox.org/comm-central/source/mozilla/toolkit/themes/windows/
global/button.css#71, why doesn't our button pick it up and then we do not
need this block in our css files?You reference a rule from Windows which doesn't exist on Linux.
So a toolkit bug?
Assignee | ||
Comment 81•6 years ago
|
||
(In reply to :aceman from comment #80)
(In reply to Richard Marti (:Paenglab) from comment #79)
+button[type="menu"] > .button-box > .button-menu-dropmarker {
So this needs to be moved for the other platforms too.
No, Mac and Windows have the needed rules in toolkit. Linux not.It seems to me you add those platforms in this same patch, just with the id, not button[type="menu"]...
Okay, Mac had this rule too, fixed. This bug is too old that I have everything in mind what I've done.
@@ +32,5 @@
It seems a similar arrow is already applied at
https://searchfox.org/comm-central/source/mozilla/toolkit/themes/windows/
global/button.css#71, why doesn't our button pick it up and then we do not
need this block in our css files?You reference a rule from Windows which doesn't exist on Linux.
So a toolkit bug?
They don't use it.
![]() |
||
Comment 82•6 years ago
|
||
It looks quite good now.
I removed the OK button and now we save the AM settings when:
- a different prefs pane is selected.
- the prefs tab is closed.
In the dialog, there were some checks run on the AM data, when the OK button was clicked.
Now those checks run immediately when a different pane inside AM is selected. If there is a big problem an error dialog is shown and the pane switch is prevented.
Those same checks run also on save of the data (at the events described above) but then the error is shown, but the user has no way to fix the data (a different pane is already shown, or the prefs tab closed), so in that case the bad input is reverted to previous value to fix that bad data.
This already happened in some cases in the old AM, I just made this consistent for all fields that are checked.
Before anybody asks, the checks intentionally do not run just on blur of the particular input field, but later to also check/fix fields that the user didn't change in this session. There were some bugs where we needed this.
I included the global/skin and messenger/skin/preferences/preferences.css into the account manager .xul files to get the right padding in the textbox[type="number"] elements that you fixed in the other bug.
So if you can guys, please play with this and check if it looks sane.
This does not update the tests yet, but will be done next.
I also made some cleanups and optimizations, e.g. the AccountManager.xul file does not even need to ship in TB now.
The AccountManager.js file is used in both SM and TB but slightly differently. Also the movement of the checks has the potential to break Seamonkey. Ian, it would be great if you could check that.
![]() |
||
Comment 83•6 years ago
|
||
Assignee | ||
Comment 84•6 years ago
|
||
Assignee | ||
Comment 85•6 years ago
|
||
This is the same patch as from aceman. The only change that the header (the fat titles in AM) have the margin-bottom removed to reduce unneeded white space.
I'm not obsoleting aceman's patch to let the open f? active.
Comment 86•6 years ago
|
||
![]() |
||
Comment 87•6 years ago
•
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #86)
I'd really want to see the prefs saved when switching tabs, otherwise users
will expect change that doesn't happen.
Isn't that what it's doing already? What am I missing?
EDIT: Ah, not saving when switching tabs, does save when switching panes.
Comment 88•6 years ago
|
||
![]() |
||
Comment 89•6 years ago
|
||
OK, let's get some traction here.
This seems to more or less work now, so I suggest we get it to more users on trunk to get some testing before beta of 68.
It does not incorporate the suggestion of switching tabs from Geoff, we can do that in an additional patch collecting issues if any crop up.
![]() |
||
Comment 90•6 years ago
|
||
![]() |
||
Comment 91•6 years ago
|
||
The needed changes to tests so that they find the AM in the tab, not in a dialog.
Try run:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=09c8eaaeff1bb367cb5ba68f515f557a22f2f8c1
Sadly, I had to disable 3 tests that do not pass yet:
1.function disabled_test_invalid_hostname()
This writes an invalid value into hostname of an account and then switches the settings pane. There are checks that prevent this and revert the click back to the Server settings pane of the tree. We tested manually that this works, but somehow in the test is isn't working right. May just be some timing or event ordering issue.
2.function disabled_test_archive_enabled()
3.function disabled_test_disable_archive()
These fail with similar symptoms to bug 1558955. The test uses a rather rare scenario where it sets one account to archive messages into another one and then the latter one is removed. The former one should recover, but it somehow fails to populate the Archive folder picker, similar to bug 1558955.
So I think we can live with these disabled for a few days, to allow the main patch some baking and user testing on trunk.
Assignee | ||
Comment 92•6 years ago
|
||
Comment 93•6 years ago
|
||
![]() |
||
Comment 94•6 years ago
|
||
Comment 95•6 years ago
|
||
Do you plan to merge this to Thunderbird 68? If so, we need to adapt Owl and ExQuilla.
![]() |
||
Comment 96•6 years ago
|
||
Yes, I do, see comment #0. Since the stand-alone options windows has gone, the stand-alone AM should go, too. So your add-ons mess in the AM, yes, I vaguely remember seeing this in ExQuilla.
Comment 97•6 years ago
|
||
your add-ons mess in the AM, yes, I vaguely remember seeing this in ExQuilla.
Yes, we have to, because we add account types, and the account manager (AM) currently hardcodes "imap" and "pop3" etc.
We'll take care of that.
![]() |
||
Comment 98•6 years ago
|
||
Good. We should get it landed soon so you have time to try it on Daily and later on beta.
![]() |
||
Comment 99•6 years ago
|
||
(In reply to Ben Bucksch (:BenB) from comment #97)
Yes, we have to, because we add account types, and the account manager (AM) currently hardcodes "imap" and "pop3" etc.
Hi, if you have some suggestions on how to remove some server type hardcoding, I would be interested in that (please file a bug), like we have in bug 1238271.
![]() |
||
Comment 101•6 years ago
|
||
Thanks for the great finds :)
(In reply to Geoff Lankow (:darktrojan) from comment #93)
::: mail/components/preferences/AccountManager.inc.xul
Apparently the linter doesn't check inline script tags in XUL files, as
there's multiple linting problems.
Good, I'll split it into a separate file with the proper structure as other pref pane files.
@@ +7,5 @@
window.addEventListener("paneSelected", function firstBuild() {
Why does this function have a name? Also event is undefined.
Remnant from times when we wanted to remove the listener/function.
::: mail/components/preferences/preferences.js
+function selectAMServer(serverID, panelID) {
- window.selectServerByKey(serverID, panelID);
+}Why have a separate function for this?
Some remnant, maybe it was longer in the past.
::: mailnews/base/prefs/content/AccountManager.js
@@ +154,5 @@
prefPane.dispatchEvent(new CustomEvent("scriptload"));
prefPane.setAttribute("scriptLoaded", true);
}
- };
- setTimeout(finishLoading, 0, selectedServer, selectPage);
Why'd you define a variable with this function?
You can't define a function not on top-level of a function without a variable (you get JS warning).
Anyway, this all seems to be duplicate of the event account-tree-built I added later so it can all go.
Also, we do not have selectedServer and selectPage when in a tab (as no window argument) so this was bogus.
@@ +659,4 @@
if (!currentAccount)
return true;
- var accountValues = getValueArrayFor(currentAccount);
let
Why? We use 'var' in top level of function. But I would be happy with 'let' everywhere.
![]() |
||
Comment 102•6 years ago
|
||
Thanks, addressed the review comments.
![]() |
||
Comment 103•6 years ago
|
||
Some tweaks to the tests too.
Comment 104•6 years ago
|
||
(In reply to :aceman from comment #101)
Why'd you define a variable with this function?
You can't define a function not on top-level of a function without a variable (you get JS warning).
Anyway, this all seems to be duplicate of the event account-tree-built I added later so it can all go.
Also, we do not have selectedServer and selectPage when in a tab (as no window argument) so this was bogus.
What I meant was, why not just do setTimeout(function() …)
?
Why? We use 'var' in top level of function. But I would be happy with 'let' everywhere.
The rest of that function is using let
. Not major, it just seemed inconsistent.
Comment 105•6 years ago
|
||
why not just do
setTimeout(function() …)
?
You mean setTimeout(() => ...)
:-)
Comment 106•6 years ago
|
||
One of the biggest pain points we have is that each pane currently (without this patch) does not re-load and re-initialize when you switch to another server. We e.g. disable UI widgets for features that we cannot support. But we need to make sure to put them back into original state after the user switches to an IMAP account. It would be much easier, if each pane would re-load for each pane change. (I haven't looked at your patch, whether it does that.)
Comment 107•6 years ago
|
||
![]() |
||
Comment 108•6 years ago
|
||
![]() |
||
Comment 109•6 years ago
|
||
Comment 110•6 years ago
|
||
![]() |
||
Comment 111•6 years ago
|
||
Thanks.
I'll file the bugs for the remaining tasks (re-enabling the tests and saving on tab switch).
![]() |
||
Updated•6 years ago
|
![]() |
||
Comment 112•6 years ago
|
||
Comment 113•6 years ago
|
||
I just tested trunk, and I'm a bit surprised.
I don't remember where I saw it, but I saw a screenshot (IIRC of actual running code in TB) where each account was listed on the left, on the same level as the "Display", "Privacy" etc. preference panes. Below, there was "Account", followed by an entry for each account directly below.
What I see now is that the account list is another list to the right of the preferences sections. That
a) creates another level of hierarchy, which is difficult for users
b) reduces the horizontal space dramatically.
Comment 114•6 years ago
|
||
Notice that the way to add an account is hard to find.
On the screenshot I saw, there was a [+] on the left pane, below the list of accounts. With no accounts, it would be directly below "Accounts"
Comment 115•6 years ago
|
||
(I didn't make it deliberately tall. That's the default for a new profile on my system.)
Comment 116•6 years ago
|
||
I filed bug 1560344 about this.
We can't release Thunderbird 68 like this. This is hideous.
![]() |
||
Comment 117•6 years ago
|
||
There are some mockups in bug 286664, but with the old Preferences dialog.
Maybe you find something else.
But if we had to have something for TB68 we couldn't do more, just stuck the whole AM into a preferences pane as is.
Any further improvements can now be done freely on trunk.
Thanks for filing the improvement bugs.
![]() |
||
Comment 118•6 years ago
|
||
(In reply to Ben Bucksch (:BenB) from comment #114)
Notice that the way to add an account is hard to find.
On the screenshot I saw, there was a [+] on the left pane, below the list of accounts. With no accounts, it would be directly below "Accounts"
Isn't this on your 4K screen? Don't all apps look like this, if you do not scale 2x? :)
Comment 119•6 years ago
|
||
But if we had to have something for TB68 we couldn't do more
Sorry to be so harsh, but this can't ship as-is. Either bug 1560344 can be fixed for TB 68, or this patch here should not land for TB 68.
I really appreciate the work, but the work should continue on trunk only until it's ready.
Comment 120•6 years ago
|
||
Agreed that we should backport only when and if it's polished enough.
Comment 121•6 years ago
|
||
Comment 122•6 years ago
|
||
![]() |
||
Comment 123•6 years ago
|
||
Comment 124•6 years ago
|
||
![]() |
||
Comment 125•6 years ago
|
||
According to the discussion in bug 1560344 we don't want "AM in prefs tab" but rather "AM in its own tab". Let's file a bug for that and aim for TB 76.
Comment 126•6 years ago
|
||
(In reply to Jorg K (GMT+1) (PTO to 26th Jan 2020, sporadically reading bugmail) from comment #125)
According to the discussion in bug 1560344 we don't want "AM in prefs tab" but rather "AM in its own tab". Let's file a bug for that and aim for TB 76.
Did anybody file a bug? Is anybody working on this?
Comment 127•6 years ago
|
||
Filed bug 1610445.
Description
•