Comments

emartoni created an issue. See original summary.

emartoni’s picture

Assigned: Unassigned » emartoni

Working on it!

emartoni’s picture

Assigned: emartoni » Unassigned
Status: Active » Needs review
StatusFileSize
new3.44 KB

Patch attached!

Best,
Eduardo

emartoni’s picture

StatusFileSize
new3.62 KB

Attached new patch with some fixes.

Best,
Eduardo

chrisdarke’s picture

Status: Needs review » Reviewed & tested by the community

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

aohrvetpv’s picture

Status: Reviewed & tested by the community » Needs work

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

msankhala’s picture

Status: Needs work » Needs review
StatusFileSize
new2.86 KB

Thanks @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/commonmark

aohrvetpv’s picture

msankhala, thanks for the improved patch. I think the return NULL; in password_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...

msankhala’s picture

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

akshay kashyap’s picture

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

akshay kashyap’s picture

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

+1 on this being good to go. Tested/installed fine.

aohrvetpv’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.22 KB
new1.83 KB

Thanks 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
--------------------------------------------------------------------------------
aohrvetpv’s picture

StatusFileSize
new2.22 KB
new163 bytes

#13 still contained an improvement to the README.md that can be separated into a different issue. Removed it.

Waldoswndrwrld’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +DevDaysCluj

Tested with & without markdown module. Works as intended.

  • AohRveTPV committed 6117915 on 8.x-3.x authored by msankhala
    Issue #2948028 by AohRveTPV, emartoni, msankhala: Help is missing on...
aohrvetpv’s picture

Status: Reviewed & tested by the community » Fixed

Thanks to all who contributed code, review, and testing.

rosinegrean’s picture

Issue tags: -DevDaysCluj +DevDaysTransylvania

Status: Fixed » Closed (fixed)

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