NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar Quy
Quy
19 Aug 2020

Pull Request for Issue #30406 .

Summary of Changes

Add meter to the installation admin password.
Update minimum length value that was missed in PR #29859.
Fix meter's complete message displaying prematurely.

Database password data-min-length attribute is also updated to 12 but no validation is done as before.

It is still possible to go to the next page if password doesn't meet the minimum length criteria of 12 characters to be fixed in a separate PR unless someone can propose a solution.

Testing Instructions

Download the package installer at the bottom of the page and install.
or
Apply PR.
Run npm run build:js
Reinstall.

Use browser's inspector to check password fields for data-min-length="12" and not data-min-length="4".
See password meter under admin password field and ensure the meter's complete message displays on the 12th character and not before.

avatar Quy Quy - open - 19 Aug 2020
avatar Quy Quy - change - 19 Aug 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Aug 2020
Category JavaScript Repository NPM Change Installation Libraries
avatar brianteeman
brianteeman - comment - 19 Aug 2020

Am I missing something here. If the site owner sets password criteria then surely they will no longer be part of the strength meter

avatar Quy
Quy - comment - 19 Aug 2020

This is for the installation setup only.

avatar Quy Quy - change - 19 Aug 2020
The description was changed
avatar Quy Quy - edited - 19 Aug 2020
avatar Quy
Quy - comment - 19 Aug 2020

Updated test instructions to clarify.

avatar brianteeman
brianteeman - comment - 19 Aug 2020

Yes but the javascript is the same javascript used for all password fields

avatar Quy
Quy - comment - 19 Aug 2020

Updating the minimum length value that was missed in PR #29859. The javascript will work fine as before.

avatar Quy Quy - change - 19 Aug 2020
The description was changed
avatar Quy Quy - edited - 19 Aug 2020
avatar Quy Quy - change - 19 Aug 2020
The description was changed
avatar Quy Quy - edited - 19 Aug 2020
avatar Quy Quy - change - 19 Aug 2020
The description was changed
avatar Quy Quy - edited - 19 Aug 2020
avatar infograf768
infograf768 - comment - 20 Aug 2020

This implements nicely the meter in installation.
We can't expect preventing going to the next page as, alas, this is a unique page, contrary to 3.x...

One small drawback is that the meter does not show a result when the field is automatically filled by the browser.

Screen Shot 2020-08-20 at 07 42 22

If that can be solved in the js, would be great, otherwise I will mark my test OK.

Note:

Independent from this PR
Frontend registration needs a lot of care as the meter is not present (if added needs also the meter class) and strings are not even translated.

Screen Shot 2020-08-20 at 07 45 32

If meter added
Screen Shot 2020-08-20 at 08 11 53

Can be done after this is merged.

avatar Magnytu2
Magnytu2 - comment - 20 Aug 2020

Hello everyone, I am testing # 30424. The graph is displayed correctly, but it is in green from 9 characters. While one has an instruction of 12?
Capture d’écran 2020-08-20 à 10 15 18

avatar infograf768
infograf768 - comment - 20 Aug 2020

Confirmed. I starts getting green at 8 characters

avatar infograf768
infograf768 - comment - 20 Aug 2020

I think this comes from

const meter = document.createElement('meter');
      meter.setAttribute('id', `progress-${index}`);
      meter.setAttribute('min', 0);
      meter.setAttribute('max', 100);
      meter.setAttribute('low', 40);
      meter.setAttribute('high', 60);
      meter.setAttribute('optimum', 80);
      meter.value = initialVal;

I tried to add attributes to the setup.xml password field as it would work if we had
optimum="100" low="100" high="0"

but it looks like the js does not include fetching such attributes from the field.

avatar brianteeman
brianteeman - comment - 20 Aug 2020

This is why I commented about the removal of certain lines in the javascript

avatar infograf768
infograf768 - comment - 20 Aug 2020

Not sure the lines deleted deal with the bar itself. They deal with the message below.

avatar Quy
Quy - comment - 20 Aug 2020

One small drawback is that the meter does not show a result when the field is automatically filled by the browser.

The password field has autocomplete="new-password" attribute which should prevent auto filling by the browser. If it is fixable in the js, then let's do it in a separate PR.

avatar infograf768
infograf768 - comment - 20 Aug 2020

The password field has autocomplete="new-password" attribute which should prevent auto filling by the browser. If it is fixable in the js, then let's do it in a separate PR.

Sure. To describe better: Firefox stores passwords and when clicking in the field, it displays a dropdown with possible passwords, letting the user choose among them. if one is clicked then it is entered in the field and we have the result above. To really use the meter, one has to enter character per character in the field.
Not a very big deal imho.

avatar Quy
Quy - comment - 20 Aug 2020

@C-Lodder Can you please confirm that the meter is a strength meter and not a progress meter so it is ok to be green 3/4 of the way? Thanks.

avatar dgrammatiko
dgrammatiko - comment - 20 Aug 2020

@Quy can you test this:
change

   meter.setAttribute('optimum', 80);

to

   meter.setAttribute('optimum', 100);

Does it solve the green appearing before 100? (it should)

avatar Quy
Quy - comment - 20 Aug 2020

@dgrammatiko Same result.

avatar C-Lodder
C-Lodder - comment - 20 Aug 2020

@Quy The colour of the meter will is determined by the low, high and optimum attribute values.

If:

  • min is 0
  • max is 100
  • optimum is 15

Then the meter will become green at 15

avatar Quy Quy - change - 20 Aug 2020
Labels Added: NPM Resource Changed ?
avatar Quy
Quy - comment - 20 Aug 2020

Changing high and optimum values yield the desired result. Thank you both.

avatar infograf768 infograf768 - test_item - 21 Aug 2020 - Tested successfully
avatar infograf768
infograf768 - comment - 21 Aug 2020

I have tested this item successfully on d2b1f3a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30424.

avatar infograf768
infograf768 - comment - 21 Aug 2020

Also tested backend and it looks like working fine.

avatar Magnytu2
Magnytu2 - comment - 21 Aug 2020

Everything is working fine. During the installation as during the creation of a user in the backend. But shouldn't this also be the case when registering in the frontend?
Créer_un_compte

avatar infograf768
infograf768 - comment - 21 Aug 2020

@Magnytu2
see
#30424 (comment)

We will make patch as soon as this is merged

If this PR works for you (it is limited to installation and solves the js generally speaking), please test it OK here:
https://issues.joomla.org/tracker/joomla-cms/30424

avatar Magnytu2 Magnytu2 - test_item - 21 Aug 2020 - Tested successfully
avatar Magnytu2
Magnytu2 - comment - 21 Aug 2020

I have tested this item successfully on d2b1f3a

Everything is working fine. During the installation as during the creation of a user in the backend.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30424.

avatar infograf768 infograf768 - change - 21 Aug 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 21 Aug 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30424.

avatar rdeutz rdeutz - change - 21 Aug 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-08-21 10:00:32
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 21 Aug 2020
avatar rdeutz rdeutz - merge - 21 Aug 2020
avatar infograf768
infograf768 - comment - 21 Aug 2020

Cassiopea implementation is here to test
#30437

Add a Comment

Login with GitHub to post a comment