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.

Contributor tasks needed
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
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dom.’s picture

Status: Active » Needs review
FileSize
1.23 KB

Here is a proposition for a patch to be reviewed.

PS: this is my first time contributing to core. Hopefully I've done it right.

Status: Needs review » Needs work
er.pushpinderrana’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
larowlan’s picture

Pretty sure there is JavaScript to auto set username based on email?

er.pushpinderrana’s picture

Status: Needs work » Needs review
FileSize
1.94 KB
732 bytes

Corrected order of name and mail field order in test case.

Status: Needs review » Needs work
Dom.’s picture

Status: Needs work » Needs review
FileSize
2.79 KB

Correction made on unit tests.

Status: Needs review » Needs work
Dom.’s picture

Status: Needs work » Needs review
FileSize
3.29 KB

One 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.

er.pushpinderrana’s picture

@Dominique, Good Job!

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.

Enable "Testing" module and then you can run local test through /admin/config/development/testing.

Dom.’s picture

@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.

roderik’s picture

Issue summary: View changes
Issue tags: +Amsterdam2014

Tagging for sprint.

It seems http://simplytest.me is ideal for testing an issue like this.

xadag’s picture

I'm working on this issue to test the patch.

xadag’s picture

Status: Needs review » Needs work

The 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 :

+++ b/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php
@@ -160,6 +155,11 @@ public function buildForm(array $form, array &$form_state) {
+    $form['admin_account']['account']['mail'] = array(
+        '#type' => 'email',
+        '#title' => $this->t('Email address'),
+        '#required' => TRUE,
+    );

Incorrect indentation (4 spaces instead of 2 spaces) coding standards

xadag’s picture

Status: Needs work » Needs review
FileSize
817 bytes
3.31 KB

I've created a new version of the patch with the correct indentation.
Please review.

Status: Needs review » Needs work
Ieva Uzule’s picture

FileSize
649.3 KB
628.59 KB

I 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:
Before Screenshot

After:
After Screenshot

Ieva Uzule’s picture

I have re-rolled the patch to see if it applies this time.

Ieva Uzule’s picture

Assigned: Dom. » Unassigned
Status: Needs work » Needs review
nathanlawsn’s picture

#19 applies cleanly.

Username field above email address field

nathanlawsn’s picture

Status: Needs review » Reviewed & tested by the community
justinchev’s picture

FileSize
52.4 KB

I can confirm #19 is fine for me too.

webchick’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Favourite of webchick

So 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!

webchick’s picture

Also DIVS. SO MANY DIVS. :P

yannickoo’s picture

Ordering via CSS? I don't think this is a good solution :/

Ieva Uzule’s picture

What about we rearrange the fiends like this:

Username:
Pasword:
Email:

That would still allow the autofill to work and would make more sense..?

rachel_norfolk’s picture

Having 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.

rachel_norfolk’s picture

Okay, In the order Username, Password, Email, we do get browsers to autocomplete the forms...

Site Configuration Form:
screenshot in order username password email

Logged out admin user logging back in with autocomplete:
admin logging back into a site using details

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?

rachel_norfolk’s picture

rachel_norfolk’s picture

rachel_norfolk’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

rachel_norfolk’s picture

Ah that's better! Sorry about the multiple test runs - I eventually learned there was testbot issued last night.

rachel_norfolk’s picture

Status: Needs work » Needs review
yannickoo’s picture

Status: Needs review » Needs work
+++ b/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php
@@ -166,7 +160,13 @@ public function buildForm(array $form, FormStateInterface $form_state) {
+    ¶

Could you please remove that whitespaces? :)

er.pushpinderrana’s picture

Status: Needs work » Needs review
FileSize
1.3 KB

Just removed extra space and rerolled #32 patch.

mgifford’s picture

Issue summary: View changes
Issue tags: +Needs usability review

It 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.

marcus7777’s picture

Issue summary: View changes
FileSize
30.04 KB
33.42 KB

I like this solution

marcus7777’s picture

Status: Needs review » Reviewed & tested by the community

I like this solution, it makes sense. Patch #41 works and is tidy

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Awesome! 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!

  • webchick committed 1b21ebf on 8.0.x
    Issue #2294313 by Ieva Uzule, rachel_norfolk, nathanlawson91, xadag, er....

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.