Commit 6b16bbd6 authored by Stephen Mustgrave's avatar Stephen Mustgrave
Browse files

Issue #3280692: Add Alert Button

parent bb2258aa
Loading
Loading
Loading
Loading

.gitattributes

0 → 100644
+62 −0
Original line number Diff line number Diff line
# Drupal git normalization
# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
# @see https://www.drupal.org/node/1542048

# Normally these settings would be done with macro attributes for improved
# readability and easier maintenance. However macros can only be defined at the
# repository root directory. Drupal avoids making any assumptions about where it
# is installed.

# Define text file attributes.
# - Treat them as text.
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
# - Detect whitespace errors.
#   - Exposed by default in `git diff --color` on the CLI.
#   - Validate with `git diff --check`.
#   - Deny applying with `git apply --whitespace=error-all`.
#   - Fix automatically with `git apply --whitespace=fix`.

*.config  text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.css     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.dist    text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.engine  text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.html    text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
*.inc     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.js      text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.json    text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.lock    text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.map     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.md      text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.module  text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.php     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.po      text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.script  text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.sh      text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.sql     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.svg     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.theme   text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.twig    text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.txt     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.xml     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.yml     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
.gitattributes     text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2

# Define binary file attributes.
# - Do not treat them as text.
# - Include binary diff in patches instead of "binary files differ."
*.eot     -text diff
*.exe     -text diff
*.gif     -text diff
*.gz      -text diff
*.ico     -text diff
*.jpeg    -text diff
*.jpg     -text diff
*.otf     -text diff
*.phar    -text diff
*.png     -text diff
*.svgz    -text diff
*.ttf     -text diff
*.woff    -text diff
*.woff2   -text diff
+41 −24
Original line number Diff line number Diff line
@@ -32,34 +32,38 @@ See https://www.drupal.org/project/issues/uswds_ckeditor_integration
FEATURES
--------

* Tables: The user can add tables just as they normally would but
in the properties tab there are options to add uswd table features.
Some classes are auto added.
See https://designsystem.digital.gov/components/table/

* Accordions: This module includes an accordion
  button that has to be placed into the editor first. Then clicking on
  it the user can add accordions with uswds classes auto added.
  See https://designsystem.digital.gov/components/accordion/

* Alerts: This module includes an Alert button that has to be placed within the ckeditor.
  See https://designsystem.digital.gov/components/alert/

* Grid Layout: This module includes a grid template button that has to be placed
  into the ckeditor. See https://designsystem.digital.gov/utilities/layout-grid/

* Process List: Using ckeditor templates inject the markup for USWDS Process List.
  See https://designsystem.digital.gov/components/process-list/

* Summary Box: Using ckeditor templates inject the markup for USWDS Summary Box into the ckeditor.
  See https://designsystem.digital.gov/components/summary-box/

* Tables: The user can add tables just as they normally would but
  in the properties tab there are options to add uswd table features.
  Some classes are auto added.
  See https://designsystem.digital.gov/components/table/


REQUIREMENTS
------------

This module requires:

* PHP > 7.2
* USWDS Library (Recommend following steps for
see https://www.drupal.org/project/uswds_base)
* For Ckeditor Templates to work you will need to include the templates
plugin. See Drupal page for how to install.
& For USWDS Paragraphs profile to work you will need https://www.drupal.org/project/uswds_paragraph_components.
* PHP > 7.4 (for now with hopes to be only PHP8 sooner then later)
* USWDS Library (Recommend following steps for see https://www.drupal.org/project/uswds_base)
* For Ckeditor Templates to work you will need to include the templates' plugin. See Drupal page for how to install.
* For USWDS Paragraphs profile to work you will need https://www.drupal.org/project/uswds_paragraph_components.


INSTALLATION
@@ -75,25 +79,38 @@ CONFIGURATION

Each component requires specific configuration

* Table
  1. Go to the text profile you wish to include USWDS table.
  2. Under "CKEditor plugin settings" make sure "Override table plugin with USWDS"
  is checked. By default, it will be.
  3. If you want to use USWDS table stacked click "USWDS Stacked Table Attributes"
  filter

If filtering HTML be sure to include the following
```
<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type class> <ol start type class> <li> <dl> <dt>
<dd> <h2 id class> <h3 id class> <h4 id class> <h5 id class> <h6 id class>
<img src alt data-entity-type data-entity-uuid data-align data-caption>
<table class style width height> <caption> <tbody> <thead> <tfoot> <th data-sortable scope id headers colspanv data-label>
<td id headers colspan data-label> <tr scope id> <u> <s> <sup> <sub>
<drupal-media data-entity-type data-entity-uuid> <div id class data-*> <button class aria-expanded aria-controls> <p class>
```
* Accordion
  1. Go to the text profile you wish to include USWDS accordions.
  2. Move the Accordion button into the toolbar.

* Alerts
  1. Go to the text profile you wish to include USWDS alerts.
  2. Move the Alert button into the toolbar

* Grid
  1. Go to the text profile you wish to include USWDS grid templates.
  2. Move the grid button into the toolbar.

* Summary Box
* Summary Box / Process List
  1. Go to the text profile you wish to include ckeditor templates
  2. Move the templates button into the toolbar.

* Table
  1. Go to the text profile you wish to include USWDS table.
  2. Under "CKEditor plugin settings" make sure "Override table plugin with USWDS"
     is checked. By default, it will be.
  3. If you want to use USWDS table stacked click "USWDS Stacked Table Attributes"
     filter

MAINTAINERS
-----------

+5 −2
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ dependencies:
  module:
    - ckeditor
_core:
  default_config_hash: 8gzZgCFByIn8twBphBFt4_99TQ4_1Y2XGYX_QomGwHw
  default_config_hash: cDaa8WouuLWn_b0_18ytOaw8_9u8Y5QyUWOvnjdcROI
format: uswds
editor: ckeditor
settings:
@@ -16,6 +16,7 @@ settings:
        -
          name: Formatting
          items:
            - Format
            - Bold
            - Italic
            - Underline
@@ -40,6 +41,7 @@ settings:
            - Paste
            - PasteFromWord
            - PasteText
            - Maximize
        -
          name: Media
          items:
@@ -52,9 +54,10 @@ settings:
        -
          name: Components
          items:
            - Maximize
            - Styles
            - Table
            - uswds_grid
            - Alerts
            - Accordion
            - Templates
  plugins:
+4 −3
Original line number Diff line number Diff line
uuid: 79c5b402-48fa-4106-90eb-595e0602c6de
langcode: en
status: true
dependencies:
@@ -6,7 +7,7 @@ dependencies:
    - media
    - uswds_ckeditor_integration
_core:
  default_config_hash: FsAHiQVMa42VKGffcpjrH1--aNB_qTqPkjmUiPSDcRg
  default_config_hash: 05t4sDVkoIIr93awow19xLg0zeanMekWf7kwUh6Kroo
name: USWDS
format: uswds
weight: 0
@@ -23,7 +24,7 @@ filters:
    status: true
    weight: -10
    settings:
      allowed_html: '<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type class> <li class> <dl> <dt> <dd> <h2 id class> <h3 id class> <h4 id class> <h5 id class> <h6 id class> <img src alt data-entity-type data-entity-uuid data-align data-caption> <table class style width height> <caption> <tbody> <thead> <tfoot> <th data-sortable scope id headers colspanv data-label> <td id headers colspan data-label> <tr scope id> <u> <s> <sup> <sub> <drupal-media data-entity-type data-entity-uuid> <div id class data-*> <button class aria-expanded aria-controls>'
      allowed_html: '<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type class> <ol start type class> <li> <dl> <dt> <dd> <h2 id class> <h3 id class> <h4 id class> <h5 id class> <h6 id class> <img src alt data-entity-type data-entity-uuid data-align data-caption> <table class style width height> <caption> <tbody> <thead> <tfoot> <th data-sortable scope id headers colspanv data-label> <td id headers colspan data-label> <tr scope id> <u> <s> <sup> <sub> <drupal-media data-entity-type data-entity-uuid> <div id class data-*> <button class aria-expanded aria-controls> <p class>'
      filter_html_help: true
      filter_html_nofollow: false
  filter_url:
@@ -40,8 +41,8 @@ filters:
    weight: 100
    settings:
      default_view_mode: default
      allowed_media_types: {  }
      allowed_view_modes: {  }
      allowed_media_types: {  }
  filter_align:
    id: filter_align
    provider: filter
+3 −0
Original line number Diff line number Diff line
.usa-alert {
  margin: 1rem 0;
}
Loading