Prefill user name in account creation again
Categories
(Thunderbird :: Account Manager, defect)
Tracking
(thunderbird68 fixed, thunderbird69 fixed)
People
(Reporter: neil, Assigned: neil)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 7 obsolete files)
15.45 KB,
patch
|
neil
:
review+
jorgk-bmo
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•6 years ago
|
||
Comment 3•6 years ago
|
||
Because we should never ask the user to enter information that we already have. With this, user user only needs to fill out 2 fields instead of 3.
The reasoning for Firefox mentioned in bug 1433350 is not valid here in this case. That was about anonymous users in a browser. We are a mail client, and that doesn't apply. Still, if Tor wants to avoid that, they can remove the interface in their build. This is not a reason to make things deliberately difficult for the normal users.
Comment 4•6 years ago
|
||
This restores functionality we had in TB 60.
Comment 5•6 years ago
|
||
Note that the original Tor bug was: "At startup, browser gleans user full name from OS". With this patch, we don't do that. We only query the full name when the user sets up an account, when we need it. And we're a mail client, not a browser.
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Oh, I guess nsCommonModule.cpp
has some real changes in it too.
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
Checks for a space in the name to ensure it's a full name.
Assignee | ||
Comment 10•6 years ago
•
|
||
(In reply to Jorg K (GMT+2) from comment #8)
124:19 error Operator '==' must be spaced.
Bah, I missed one...
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Thanks, Neil!
Updated•6 years ago
|
Comment 14•6 years ago
|
||
Assignee | ||
Comment 15•6 years ago
|
||
(In reply to Magnus Melin from comment #14)
I'd really suggest not throwing if one of the properties isn't available... :/
So what would you do in that case?
Comment 17•6 years ago
|
||
should really check if ("@mozilla.org/userinfo;1"]" in Cc) instead of try/catch
Good idea with the |if|, please keep the try/catch, because the call might fail for other reasons, and we don't want to abort the dialog because of this.
Comment 18•6 years ago
|
||
Clarification:
Good idea with the |if|, please add that, but please keep the try/catch as well...
Assignee | ||
Comment 19•6 years ago
|
||
Changed IDL as requested. Works on Linux, spotted typo in Mac code after pushing to try, not tested on Windows.
Comment 20•6 years ago
|
||
Return NS_OK with an empty string.
My 2 cents: I think returning an error when an actual error happened is the correct API for the call. It's always up to the caller how to deal with it.
Comment 21•6 years ago
|
||
@Magnus: Ping
@Jörg: We need this merged to TB 68, please.
Comment 22•6 years ago
|
||
FWIW, Neil did remove the error handling in the C++ code. I think that's a mistake, but it does follow Magnus' review request, so this should be ready to land.
Assignee | ||
Comment 23•6 years ago
|
||
Comment 24•6 years ago
|
||
Ben, once you have your review, please request landing and beta uplift. I see that you and Neil are working on various AM bugs, for example bug 1553087, please don't forget to set checkin-needed when they are ready to go. In general, everything will be taken care of if you set the right flags ;-)
Comment 25•6 years ago
|
||
Re try: The 4 oranges seem to be unrelated intermittent failures.
@Jörg: Thanks :-). I've set the flags on the other bug, indeed I forgot them. Thanks for the reminder.
@Magnus: Neil addressed your review comments. Can we please have r+?
Comment 26•6 years ago
|
||
Comment 27•6 years ago
|
||
I don't see that happening. The only error we'd be catching is syntax errors inside the try-catch.
There could also be XPCOM errors. Removing the try/catch would be wrong. This is optional code, and if that breaks or fails - for whatever reason, that doesn't matter - , the dialog should not break. Wrapping helpful, but strictly optional code in a try/catch is the correct coding pattern. Removing the try/catch would be wrong.
The very nature of bugs and errors is that you cannot predict them.
BTW: Removing errors and just returning OK and an empty string in case of errors, as you suggested, is a bad API, but we accepted that. Removing the try/catch, however, is absolutely and clearly bad coding. The try/catch doesn't cost anything, and can help in case of unforseen errors, so removing that is not a reasonable course.
Comment 28•6 years ago
|
||
Given that I consider the try/catch to be important for safe coding in face of unforeseen problems, and that all the code was there before already, and we merely restore it, could you please approve this as-is?
Please note that this is already a compromise, because we already removed the error handling inside the component due to your request.
But in face of the drastic earth-shakeing changes that keep coming in from Mozilla, and the fact that Thunderbird developers often do not catch the bugs themselves, I'd rather code safely. Can you follow that reasoning, please?
Assignee | ||
Updated•6 years ago
|
Comment 29•6 years ago
|
||
(In reply to Ben Bucksch (:BenB) from comment #27)
There could also be XPCOM errors.
Such as? If creating the userInfo fails, clearly you'd have much bigger problems at hand - and the methods do not throw errors now.
The whole point of the try-catch earlier was to in case the interface isn't implemented for some platform.
Clearly hiding syntax errors in js is bad and does have a real cost.
Assignee | ||
Comment 30•6 years ago
|
||
(In reply to Magnus Melin from comment #26)
Please set a proper hg commit message.
Sorry about that, that was my Try push; my original patch did have a proper message.
Assignee | ||
Comment 31•6 years ago
|
||
Comment 32•6 years ago
|
||
Updated•6 years ago
|
Comment 33•6 years ago
|
||
Updated•6 years ago
|
Comment 34•6 years ago
|
||
Comment 35•6 years ago
|
||
someone who configured their machine with "full name" 'Froggy'
That's precisely what we do not want and explicitly want to prevent. It's fine to use a nick name on your personal computer. But it's not for the rest of the world.
This should be the real name of the person. If he is really determined to use that nick name, and use it in front of the world, he should write it himself. We do not want to prefill nick names like "Schnucki".
nsMimeBaseEmitter.cpp
Yes, that in fact is an unrelated change that slipped in and should be removed. Sorry about that.
Comment 36•6 years ago
|
||
Looking for a space won't work for Chinese names: https://en.wikipedia.org/wiki/Chinese_name since first name and surname are not separated by a space.
Comment 37•6 years ago
|
||
Yeah seems better to just set the name as configured on the machine and not check the space.
Comment 38•6 years ago
|
||
OK, that's a good point. But I'm not sure that we should pre-fill pure CJK names. There are cultural considerations, that it's impolite to speak the first name of Chinese, but it's normal in the USA. Also, CJK characters are unspeakable for everybody outside the country and not appropriate for international communication like email. So, even if your local name is 姓名, you probably want to add your transliterated name in addition to the CJK characters. It's not clear what the right solution here is. Just prefilling 姓名 without transliteration isn't a good idea.
And I really don't want to prefill "Schnucki" and "Froggy".
Assignee | ||
Comment 39•5 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #34)
Comment on attachment 9067275 [details] [diff] [review]
::: mailnews/mime/emitters/nsMimeBaseEmitter.cpp
@@ +422,5 @@uint64_t avail; rv = mInputStream->Available(&avail); if (NS_SUCCEEDED(rv) && avail) {
nsCOMPtr<nsIRequest> request(do_QueryInterface((nsISupports*)mChannel));
mOutListener->OnDataAvailable(request, mInputStream, 0,
What is this?
@@ +935,4 @@
mozilla::DebugOnly<nsresult> rv2 = mInputStream->Available(&bytesInStream); NS_ASSERTION(NS_SUCCEEDED(rv2), "Available failed"); if (bytesInStream) {
nsCOMPtr<nsIRequest> request(do_QueryInterface((nsISupports*)mChannel));
And this?
Sorry, this was some temporary code I'd written because my debug build was crashing because the HTML parser now checks that you pass the same request in each time, and because of the way XPCOM works this isn't true for a JS object that gets queried from nsIRequest to nsIChannel and then downcast back.
Assignee | ||
Comment 40•5 years ago
|
||
Comment 41•5 years ago
|
||
Assignee | ||
Comment 42•5 years ago
|
||
(In reply to Jorg K from comment #41)
That could be a
mozilla::MakeStringSpan()
, no?
Ah, sorry, I didn't know about bug 1402247. I'll fix it (and the indent) later today.
Assignee | ||
Comment 43•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 44•5 years ago
|
||
Updated•5 years ago
|
Comment 45•5 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/1fc57303ad6b
Restore prefilling user name in account creation after bug 1433350. r=mkmelin,jorgk
Updated•5 years ago
|
Comment 46•5 years ago
|
||
Comment 47•5 years ago
|
||
See Bug 1576393 for background info
Thunderbird 68 (build id 20190816191614) worked as expected when I used my fathers Windows 10 laptop. It has two accounts, and the new account wizard used the account name I was logged into. Its a local account. While his login name is Donald I believe the account information knows his full name. He probably has a Outlook account registered in "email & accounts". The machine originally used Windows 7 and temporarily used a Microsoft account to login until that was changed later on to use a local account.
When I got back home I used my own PC to install version 68. My windows 10 account name is Eric. I use a local account and AFAIK the windows account does not know my last name. I do not have anything registered in "email & accounts". I have a Outlook.com account but it is not registered. Winver says I'm using Windows 10 Home version 1903 (OS Build 18362.295). At the bottom it says:
This product is licensed under the Microsoft Software License Terms to :
user name
org name
The new account wizard displayed First Last as the name. I expected it to display Eric. Is their any requirement that there be a Microsoft account?
Comment 48•5 years ago
|
||
The name is only filled in of it consists of two strings with a space:
https://hg.mozilla.org/comm-central/rev/1fc57303ad6b#l9.14
Description
•