Closed (fixed)
Project:
Password Policy
Version:
8.x-3.x-dev
Component:
Documentation
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Feb 2018 at 16:05 UTC
Updated:
4 Jul 2019 at 09:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
emartoni commentedWorking on it!
Comment #3
emartoni commentedPatch attached!
Best,
Eduardo
Comment #4
emartoni commentedAttached new patch with some fixes.
Best,
Eduardo
Comment #5
chrisdarke commentedHi again Eduardo!
So I see you added my comments as per the readme bug fix
1. modules/password_policy/password_policy.module:430 - maybe rephrase as 'Enable the module via drush or the Extend page'?
2. modules/password_policy/password_policy.module:438 - rename link to 'Zxcvbn Plugin'
Looks good!
Comment #6
aohrvetpv commentedThanks for writing up some help documentation! I wonder though if it might be better to just refine/expand the existing README.md and use it for the help documentation too? (This is an approach suggested by the "Module documentation guidelines" page: https://www.drupal.org/docs/develop/documenting-your-project/module-docu...) That way we'd be avoiding duplication.
Anyway, reviewing this patch:
"This is a Drupal 8 module for the Password Policy module. This is comprised of constraints and policies."
The first sentence doesn't make sense to me, and seems like obvious information. It is probably more useful to say what the module does?
Minor grammar: "is comprised of" should be "is composed of" or "comprises".
Perhaps:
"This module allows administrators to define and enforce password policies for user passwords. A password policy comprises constraints and other settings that govern passwords."
This would mirror the README.txt introduction I wrote for 7.x-2.x (though without review):
https://cgit.drupalcode.org/password_policy/tree/README.txt?h=7.x-2.x
Thanks again for the contributions, documentation is really important!
Comment #7
msankhala commentedThanks @emartoni for first version of patch. I agree with @AohRveTPV i think using README.md file content for help section is good idea. This way we do not need to maintain same documentation in two places. Here is updated patch.
To test the markdown output at admin/help/password_policy make sure you have installed and enabled markdown module and installed commonmark library via
composer require league/commonmarkComment #8
aohrvetpv commentedmsankhala, thanks for the improved patch. I think the
return NULL;inpassword_policy_help()help may be unneeded. Or is there some precedent for returning NULL?The example in the documentation doesn't return anything when none of the switch cases match:
https://api.drupal.org/api/drupal/core!modules!help!help.api.php/functio...
Comment #9
msankhala commented@AohRveTPV I also thought about removing this
return NULL;then I kept it because it is mentioned in the example mentioned at https://www.drupal.org/docs/develop/documenting-your-project/module-docu...I think it is added there so that IDE like PHPstrom do not show a warning like: Missing return statement.
Comment #10
akshay kashyap commented@msankhala:
I have review the patch, apply successfully and working fine. I have attached After_patch image.
I test this patch in Chrome browser. It's Working fine.
Comment #11
akshay kashyap commentedComment #12
zahor commented+1 on this being good to go. Tested/installed fine.
Comment #13
aohrvetpv commentedThanks for the patches and review/testing. I think #7 is doing several different things:
1. Adding help using
hook_help()and the README.md.2. Changing README.md to use markdown interpretable by the markdown module.
3. Making miscellaneous improvements to the README.md.
I would like to split (3) into a separate issue from (1) and (2), because I think there is more work to do on the changes made as part of (3).
Here is a patch with just (1) and (2).
Versus #7, I added a
use Drupal\Core\Routing\RouteMatchInterface;statement. This was needed to remove the following Coder Drupal PHPCS standard warning:FILE: /var/www/html/drupal8/web/modules/password_policy/password_policy.module -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 429 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced | | with use statements -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------Comment #14
aohrvetpv commented#13 still contained an improvement to the README.md that can be separated into a different issue. Removed it.
Comment #15
Waldoswndrwrld commentedTested with & without markdown module. Works as intended.
Comment #17
aohrvetpv commentedThanks to all who contributed code, review, and testing.
Comment #18
rosinegrean commented