NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar moeinio
moeinio
28 Sep 2019

Summary of Changes

Migrated passwordstrength.js to es6

Testing Instructions

run npm install
test Joomla core functionality like

  • javascript translations
  • check error messages creation in forms / ajax forms
  • check webcomponents loaded correctly
  • when registering a new user or adding new user in backend, check if the password strength criteria matches Password options set in Users: Password Options.

Expected result

Passwordstrength should work same as before

Actual result

Passwordstrength works same as before

avatar moeinio moeinio - open - 28 Sep 2019
avatar moeinio moeinio - change - 28 Sep 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Sep 2019
Category JavaScript Repository NPM Change
avatar moeinio moeinio - change - 28 Sep 2019
The description was changed
avatar moeinio moeinio - edited - 28 Sep 2019
avatar moeinio moeinio - change - 28 Sep 2019
The description was changed
avatar moeinio moeinio - edited - 28 Sep 2019
avatar moeinio moeinio - change - 28 Sep 2019
The description was changed
avatar moeinio moeinio - edited - 28 Sep 2019
avatar moeinio moeinio - change - 28 Sep 2019
Labels Added: NPM Resource Changed ?
avatar moeinio moeinio - change - 29 Sep 2019
Title
4.0 dev
[4.0] [passwordstrength.js] Migrate es5 code to es6
avatar moeinio moeinio - edited - 29 Sep 2019
avatar moeinio moeinio - change - 29 Sep 2019
The description was changed
avatar moeinio moeinio - edited - 29 Sep 2019
avatar HLeithner
HLeithner - comment - 29 Sep 2019

@C-Lodder or @dgrammatiko can you have a look at this?

avatar mbabker
mbabker - comment - 29 Sep 2019

Isn't this a third party script? Or is the doc block at the top of the source file just a lie?

avatar HLeithner
HLeithner - comment - 29 Sep 2019

Only the first strength calculation of the file, https://github.com/joomla/joomla-cms/blob/5a95313e9d6cb0d0028c8f69ad2dc1f0ade7ce55/build/media_source/system/js/fields/passwordstrength.es5.js

The rest seams to be Joomla related.

@moeinio please add the correct header and add a note that the class has been converted to es6 by the joomla project.
Similar to this Commit: ddc7ea0#diff-4dcabad787cfa22ffb12e6dcede3da2aR40-R41

avatar dgrammatiko
dgrammatiko - comment - 29 Sep 2019

@HLeithner since you’ve asked, here is my answer: NO. This field, as the rest ones (that depend on js) need to be custom elements. Actually the code already exists here:
#23215

avatar brianteeman
brianteeman - comment - 29 Sep 2019

And since it's being looked at this should not exist at all as it is not a test of password strength by any measure.

avatar dgrammatiko
dgrammatiko - comment - 29 Sep 2019

Actually it does what it was supposed to do: connect the front end validation to the defined values in the php world

avatar brianteeman
brianteeman - comment - 29 Sep 2019

but nothing to do with password strength

avatar dgrammatiko
dgrammatiko - comment - 29 Sep 2019

Maybe you should blame me for naming this script passwordstrength when in j3 it was named progressbar: https://github.com/joomla/joomla-cms/blob/staging/media/system/js/progressbar-uncompressed.js

In fact if you really want to do this differently you’re gonna need to break quite a lot APIs

avatar mbabker
mbabker - comment - 29 Sep 2019

add a note that the class has been converted to es6 by the joomla project

I wouldn't even do that because at that point you've forked the script for the novelty of converting ES5 source to ES6. Put it in a separate file that doesn't get touched by the project, third party scripts should not be getting altered by Joomla without damn good reason.

avatar HLeithner
HLeithner - comment - 30 Sep 2019

If you look at upstream you can see that this is already a work because upstream is coffee script.
Splitting the code in 2 files make sense see my pr ddc7ea0

avatar Quy
Quy - comment - 4 Jun 2020

Replaced by PR #29041

avatar Quy Quy - change - 4 Jun 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-06-04 05:34:07
Closed_By Quy
avatar Quy Quy - close - 4 Jun 2020

Add a Comment

Login with GitHub to post a comment