Motivation:
During installation, on "Site Configuration" step, in the fieldset section called "Site maintenance account", the user email is asked before the user's name and password wich seems rather unusual to me.
The proposition of this issue is simply to reorder the form from :
Email address
Username
Password
Password Confirm
to
Username
Password
Password Confirm
Email address
Before patch #41:
After patch #41:
Changes :
This is just a minor reordering change in the SiteConfigurationForm with no impact on any API or form validation.
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Embed (before and?) after screenshots in the issue summary | Novice | Instructions | |
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | Novice | Instructions |
Comment | File | Size | Author |
---|---|---|---|
#43 | after.png | 33.42 KB | marcus7777 |
#43 | before.png | 30.04 KB | marcus7777 |
#41 | email-is-ask-before-username-in-site-configuration-2294313-41.patch | 1.3 KB | er.pushpinderrana |
#32 | interdiff-2294313-19-32.txt | 3.37 KB | rachel_norfolk |
#32 | email-is-ask-before-username-in-site-configuration-2294313-32.patch | 1.3 KB | rachel_norfolk |
Comments
Comment #1
Dom. CreditAttribution: Dom. commentedHere is a proposition for a patch to be reviewed.
PS: this is my first time contributing to core. Hopefully I've done it right.
Comment #3
er.pushpinderrana CreditAttribution: er.pushpinderrana commented1: email-is-ask-before-username-in-site-configuration-2294313-1.patch queued for re-testing.
Comment #5
larowlanPretty sure there is JavaScript to auto set username based on email?
Comment #6
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedCorrected order of name and mail field order in test case.
Comment #8
Dom. CreditAttribution: Dom. commentedCorrection made on unit tests.
Comment #10
Dom. CreditAttribution: Dom. commentedOne more try.
PS : someone knows how to run tests in local WAMP env ? Because of #2239969 I'm not able to run unit tests in the Test module UI.
Comment #11
er.pushpinderrana CreditAttribution: er.pushpinderrana commented@Dominique, Good Job!
Enable "Testing" module and then you can run local test through
/admin/config/development/testing
.Comment #12
Dom. CreditAttribution: Dom. commented@er.pushpinderrana: Indeed, but using this UI I got the error described in this issue :
#2239969: Session of (UI) test runner leaks into web tests
Thus I'd like to know if there was another way to test meanwhile.
Comment #13
roderikTagging for sprint.
It seems http://simplytest.me is ideal for testing an issue like this.
Comment #14
xadag CreditAttribution: xadag commentedI'm working on this issue to test the patch.
Comment #15
xadag CreditAttribution: xadag commentedThe latest patch #10 applied fine on the files in core.
It works on the screen install, the two forms elements are in correct order now.
But there is an error of the coding standard https://www.drupal.org/coding-standards#indenting,
the indentation of 2 spaces is wrong with the new admin_account account mail form element :
Incorrect indentation (4 spaces instead of 2 spaces) coding standards
Comment #16
xadag CreditAttribution: xadag commentedI've created a new version of the patch with the correct indentation.
Please review.
Comment #18
Ieva Uzule CreditAttribution: Ieva Uzule commentedI manually tried to apply the patch with git apply and it wouldn't work for me. Applying it with patch -p1 worked.
Here are before and after screenshots.
Before:
After:
Comment #19
Ieva Uzule CreditAttribution: Ieva Uzule commentedI have re-rolled the patch to see if it applies this time.
Comment #20
Ieva Uzule CreditAttribution: Ieva Uzule commentedComment #21
nathanlawsn CreditAttribution: nathanlawsn commented#19 applies cleanly.
Comment #22
nathanlawsn CreditAttribution: nathanlawsn commentedComment #23
justinchev CreditAttribution: justinchev commentedI can confirm #19 is fine for me too.
Comment #24
webchickSo it looks like this was changed explicitly in #2191785: Password managers are identifying/storing wrong username field when creating a user account. So if we're going to do this, we either need an alternate fix for that issue, or we need to verify that it doesn't recur with the fields switched back to the way they were.
marcus7777 suggested possibly doing this via CSS ordering instead of source ordering, which may solve the problem!
Comment #25
webchickAlso DIVS. SO MANY DIVS. :P
Comment #26
yannickooOrdering via CSS? I don't think this is a good solution :/
Comment #27
Ieva Uzule CreditAttribution: Ieva Uzule commentedWhat about we rearrange the fiends like this:
Username:
Pasword:
Email:
That would still allow the autofill to work and would make more sense..?
Comment #28
rachel_norfolkHaving had a few moments to think about this; yes, we do need to make autocomplete work but also we need to help the user understand that the identifier for the Site Maintenance Account is the username, not the email address. It has to somehow come first.
I'll have an experiment now to see if Ieva's suggestion at #27 works on a few browsers.
Comment #29
rachel_norfolkOkay, In the order Username, Password, Email, we do get browsers to autocomplete the forms...
Site Configuration Form:
Logged out admin user logging back in with autocomplete:
All I need to do now is think about where is the most appropriate place to make the patch; here or in the original location? Webchick?
Comment #30
rachel_norfolkComment #31
rachel_norfolkComment #32
rachel_norfolkHere is a patch that goes for the Username, Password, Email ordering proposed at #27...
Comment #33
rachel_norfolkComment #38
rachel_norfolkAh that's better! Sorry about the multiple test runs - I eventually learned there was testbot issued last night.
Comment #39
rachel_norfolkComment #40
yannickooCould you please remove that whitespaces? :)
Comment #41
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedJust removed extra space and rerolled #32 patch.
Comment #42
mgiffordIt is a simple enough patch. I'm updating the summary, as the username/password are rightly (IMO) being kept together.
I think it would be good to get some formal UX input though as this is being done for improved UX.
Comment #43
marcus7777 CreditAttribution: marcus7777 commentedI like this solution
Comment #44
marcus7777 CreditAttribution: marcus7777 commentedI like this solution, it makes sense. Patch #41 works and is tidy
Comment #45
webchickAwesome! This totally fixes the problem, and does it without having to update tests, so we're good to go. Thanks for sticking with this, folks. So sorry it couldn't be committed live, but OTOH it was a good lesson for everyone in what core committers actually do. :)
Committed and pushed to 8.x. YEAH!