The module provides the ability to display a customizable emergency notification on all pages, exempt the pages that are being excluded in the configuration. Once the is dismissed the emergency notification is still accessible through a button that is fixed to the bottom of the page.

Usage instructions

  • Navigate to Configuration > System > Emergency Notification settings.
  • Configure settings, check "Emergency notification enabled" and save.
  • An emergency notification will now be visible on your site.

Project link

https://www.drupal.org/project/emergency_notification

Git instructions

git clone --branch 1.x https://git.drupalcode.org/project/emergency_notification.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-emergency_noti...

Comments

CbStuart created an issue. See original summary.

avpaderno’s picture

Assigned: cbstuart » Unassigned
Issue summary: View changes

Thank you for applying! I added the Git instructions for non-maintainer users and the PAReview checklist link. Reviewers will check the project and post comments to list what should be changed.

If you haven't done it, yet, please check the PAReview report and fix what needs to be fixed. There could be some false positives; verify that what reported is correct, before making any change.

shaktik’s picture

Thanks for your contribution. Kindly, fix the below items.
Review of the 1.x branch (commit f782df9):

  • Your README.md does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
    • The INTRODUCTION section is missing.
    • The REQUIREMENTS section is missing.
    • The INSTALLATION section is missing.
    • The CONFIGURATION section is missing.
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: ...sh/pareview_temp/src/Form/EmergencyNotificationConfigurationForm.php
    --------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------
     19 | ERROR | [x] Whitespace found at end of line
    --------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------
    
    Time: 991ms; Memory: 4Mb
    
  • ESLint has found some issues with your code (please check the JavaScript coding standards).
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 3, col 15, Error - Missing semicolon. (semi)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 6, col 5, Warning - Missing JSDoc parameter type for 'settings'. (valid-jsdoc)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 6, col 5, Error - Expected line before comment. (lines-around-comment)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 6, col 5, Warning - Missing JSDoc parameter type for 'context'. (valid-jsdoc)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 30, col 36, Error - Missing semicolon. (semi)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 35, col 5, Warning - Missing JSDoc for parameter 'en_settings'. (valid-jsdoc)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 35, col 5, Warning - Missing JSDoc for parameter 'context'. (valid-jsdoc)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 48, col 5, Warning - Missing JSDoc for parameter 'context'. (valid-jsdoc)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 48, col 5, Warning - Missing JSDoc for parameter 'en_settings'. (valid-jsdoc)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 63, col 5, Warning - Missing JSDoc for parameter 'context'. (valid-jsdoc)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 78, col 21, Error - Missing semicolon. (semi)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 82, col 5, Warning - Missing JSDoc for parameter 'context'. (valid-jsdoc)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 95, col 21, Error - Missing semicolon. (semi)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 99, col 4, Error - Missing semicolon. (semi)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/emergency_notification.js: line 100, col 19, Error - Missing semicolon. (semi)
    
    15 problems
    
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: ...sh/pareview_temp/src/Form/EmergencyNotificationConfigurationForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     121 | WARNING | \Drupal calls should be avoided in classes, use
         |         | dependency injection instead
    --------------------------------------------------------------------------
    
    Time: 375ms; Memory: 4Mb
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script.

avpaderno’s picture

Title: Emergency Notification » [D8] Emergency Notification
avpaderno’s picture

Status: Needs review » Needs work
cbstuart’s picture

Status: Needs work » Needs review

I have made the necessary updates. Can someone please review?

klausi’s picture

Status: Needs review » Fixed
  1. config schema looks incomplete, all the setting options are missing?
  2. class EmergencyNotificationManager: the class comment is useless, it just repeats the class name. What kind of manager is this? A plugin manager? An entity manager? What is the purposes and why does it exist, please write that out in one sentence.
  3. emergency_notification_page_attachments_alter(): why do you need this hook and cannot use #attached in emergency_notification_page_top()? Please add a code comment.

Otherwise looks good to me.

Thanks for your contribution, CbStuart!

I updated your account so you can opt into security advisory coverage now.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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