User tests: Successful: Unsuccessful:
Migrated passwordstrength.js to es6
run npm install
test Joomla core functionality like
Passwordstrength should work same as before
Passwordstrength works same as before
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
Labels |
Added:
NPM Resource Changed
?
|
Title |
|
Isn't this a third party script? Or is the doc block at the top of the source file just a lie?
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
@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
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.
Actually it does what it was supposed to do: connect the front end validation to the defined values in the php world
but nothing to do with password strength
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
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.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-06-04 05:34:07 |
Closed_By | ⇒ | Quy |
@C-Lodder or @dgrammatiko can you have a look at this?