NCIOCPL / cgov-digital-platform

The Cancer.gov Digital Communications Platform
GNU General Public License v2.0
11 stars 33 forks source link

Story: Create Summary Box Paragraph for MLP #4379

Open andyvanavery31 opened 1 month ago

andyvanavery31 commented 1 month ago

As a content editor, I want to be able to add a Summary Box paragraph to a Mini Landing Page, so that I can feature prose or additional calls-to-action with grouped information in a way that intentionally breaks up content on a page to improve the content hierarchy and give the site visitors the ability to scan information.

Requirements

Functional Requirements

Specifications

Analytics Requirements On click of a link within a summary box, an EDDL event shall be raised with the linkName and event name of: MLP:SummaryBox:LinkClick.

This click event shall send the following information as data elements to EDDL:

Information about the page that was clicked:

Location within the page of the component clicked:

Information about the component clicked:

DoR Tasks

DoD Tasks

Technical Notes

Content Model

Scenarios/Figma

Summary Box 1 Heading: This is an example of a very long heading using the optional heading field in the Content Management System that will wrap with the usa-measure if implemented correctly

<p><strong>More than 30 percent</strong> of all human cancers - <em>including 95 percent of pancreatic cancers and 45 percent of colorectal cancers</em> - are driven by <sup>mutations of the RAS</sup> family of genes. <sub>NCI established the RAS initiative in 2013 to explore</sub> innovative approaches for attacking the <s>proteins encoded by mutant forms of RAS genes</s> and to <strong><em>ultimately create effective, new therapies for RAS-related cancers.</em></strong></p>

Internal Link Testing
<!-- Make this a managed link in the WYSIWYG -->
<p>See <a href="/about-cancer">About Cancer</a> managed internal link.</p>
<p>See <a href="/about-cancer">About Cancer</a> internal link.</p>

Media Link Testing
<!-- Make this a managed link to the following cgov_file in the WYSIWYG -->
<p>See <a href="/research/progress/discovery/test-file-url">Test File Download</a> managed media link.</p>

External Link Testing
<p>See <a href="https://www.google.com/">Google</a> for external link.</p>

List Testing

<ul>
  <li>This is</li>
  <li>an unordered</li>
  <li>list of stuff</li>
</ul>
<ol>
  <li>This is</li>
  <li>>an ordered</li>
  <li>list of stuff</li>
</ul>

Summary Box 2 No Heading

This is a summary box has no heading!!
Email Link Testing
<p><a href="mailto:jenny@example.org">Email Jenny</a></p>
Other link testing
            <p><a href="tel:1-555-867-5309">Call Jenny</a></p>

Acceptance Criteria

CMS User Experience

Scenario: NCIDS Summary Box paragraph can be added to Mini Landing Page content type
  Given the user is logged into the CMS as an editor
    And the user is editing a "Mini Landing Page" content item
    And the Mini Landing Page is using the NCIDS style
  When the user expands the dropdown to add a paragraph to Contents
  Then the dropdown displays "Add NCIDS Summary Box"
  When the user selects "Add NCIDS Summary Box"
  Then the fields for an "NCIDS Summary Box" paragraph appear
    And the first field is the "Heading" field
    And the field is optional
    And it is a WYSIWYG that allows bold and italics
    And the next field is the "Body" field
    And the field is required
    And it is a WYSIWYG
    And theWYSIWYG will have inline styles (bold, italics, strikethrough, superscript, subscript), remove format, ordered and unordered list, link, link removal)
    And the WYSIWYG will NOT have headings, `<cite>` `<blockquote cite>`, pull quotes, `<dl><dt><dd>`, or `<drupal-entity data-entity-type data-entity-uuid data-entity-embed-display data-entity-embed-display-settings data-align data-caption ddata-embed-button>`
    And usa-measure will be applied to the text in the Summary Box
  When a content editor adds anything that is not allowed in the streamlined WYSIWYG
  Then the added content that is not allowed will not be rendered
  When the content editor has added a link
    And the content editor uses the Remove Link function
  Then the link will be removed
  When the content editor has added formatting to text (e.g., bold, italics, strikethrough, superscript, or subscript)
    And the content editor uses the remove format function
  Then the formatting will be removed from the text

Front-End User Experience

Scenario: A site visitor goes to a Mini Landing Page that uses the NCIDS style and has an NCIDS Summary Box on it
  Given the Mini Landing Page uses the NCIDS style
    And the Mini Landing Page has an NCIDS Summary Box on it
    And the NCIDS Summary Box has the text from the Scenarios section above
  When the visitor views the Mini Landing Page with the NCIDS style and the NCIDS Summary Box
  Then the visitor will see the NCIDS Summary Box on the page
    And it will exactly match the comps
    And the heading in the Summary Box will be an h2 in the page hierarchy
    And the heading in the Summary Box will appear with the token size MD (font size 20px/Line-Height-2)
  When the user clicks on a link in the NCIDS Summary Box
  Then they will be redirected to the linked page
  When the content editor did not add a heading to the Summary Box Paragraph
  Then no heading will appear in the Summary Box

Analytics Requirements Summary Box MLP – Internal link click event - managed

Scenario: Summary Box MLP – Internal link click event - managed
  Given user is navigating to "/test/ncids-mini-landing-summary-box"
    And browser waits
When user clicks on the “About Cancer” link in the sentence “See About Cancer managed internal link.” in the summary box in the first position.
        Then page click request is sent
        And browser waits
        And the following parameters should be captured
    And the Mini Landing Page has an NCIDS Summary Box
  When the user clicks on a link in the NCIDS Summary Box
            | parameter | value                                                          |
            | prop4     | D=pev1                                                         |
            | prop8     | english                                                        |
            | prop57    | D=v64                                                          |
            | prop58    | D=v65                                                          |
            | prop59    | D=v66                                                          |
            | prop60    | D=c67                                                          |
            | prop67    | D=pageName                                                     |
            | prop68    | D=v68                                                          |
            | evar2     | D=c8                                                           |
            | evar61    | cgvMiniLanding\|ncids_default                                  |
            | evar64    | Internal\|This is an example of a very long heading using th
\|About Cancer\                                 |
            | evar65    | Summary Box\|Not Defined\| Not Defined                      |
            | evar66    | 2\|1\|0\|0\|1\|1                                               |
            | evar67    | Text\|4\|1                                                    |
            | evar68    | Body                                                           |
            | pageName  | {CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | pageURL   | {PROTOCOL}://{CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | event112  |                                                                |
            | pev2      | MLP:SummaryBox:LinkClick                                      |
            | linkType  | lnk_o                                                          | 

Summary Box MLP – Internal link click event - unmanaged

Scenario: Summary Box MLP – Internal link click event - unmanaged
  Given user is navigating to "/test/ncids-mini-landing-summary-box"
    And browser waits
When user clicks on the “About Cancer” link in the sentence “See About Cancer internal link.” in the summary box in the first position.
        Then page click request is sent
        And browser waits
        And the following parameters should be captured
    And the Mini Landing Page has an NCIDS Summary Box
  When the user clicks on a link in the NCIDS Summary Box
            | parameter | value                                                          |
            | prop4     | D=pev1                                                         |
            | prop8     | english                                                        |
            | prop57    | D=v64                                                          |
            | prop58    | D=v65                                                          |
            | prop59    | D=v66                                                          |
            | prop60    | D=c67                                                          |
            | prop67    | D=pageName                                                     |
            | prop68    | D=v68                                                          |
            | evar2     | D=c8                                                           |
            | evar61    | cgvMiniLanding\|ncids_default                                  |
            | evar64    | Internal\|This is an example of a very long heading using th
\|About Cancer\                                 |
            | evar65    | Summary Box\|Not Defined\| Not Defined                      |
            | evar66    | 2\|1\|0\|0\|1\|1                                               |
            | evar67    | Text\|4\|2                                                    |
            | evar68    | Body                                                           |
            | pageName  | {CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | pageURL   | {PROTOCOL}://{CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | event112  |                                                                |
            | pev2      | MLP:SummaryBox:LinkClick                                      |
            | linkType  | lnk_o                                                          |

Summary Box MLP – External link click event

Scenario: Summary Box MLP – External link click event
  Given user is navigating to "/test/ncids-mini-landing-summary-box"
    And browser waits
When user clicks on the “Google” link in the sentence “See Google for external link.” in the summary box in the first position.
        Then page click request is sent
        And browser waits
        And the following parameters should be captured
    And the Mini Landing Page has an NCIDS Summary Box
  When the user clicks on a link in the NCIDS Summary Box
            | parameter | value                                                          |
            | prop4     | D=pev1                                                         |
            | prop8     | english                                                        |
            | prop57    | D=v64                                                          |
            | prop58    | D=v65                                                          |
            | prop59    | D=v66                                                          |
            | prop60    | D=c67                                                          |
            | prop67    | D=pageName                                                     |
            | prop68    | D=v68                                                          |
            | evar2     | D=c8                                                           |
            | evar61    | cgvMiniLanding\|ncids_default                                  |
            | evar64    | External\|This is an example of a very long heading using th
\|Google\                                 |
            | evar65    | Summary Box\|Not Defined\| Not Defined                      |
            | evar66    | 2\|1\|0\|0\|1\|1                                               |
            | evar67    | Text\|4\|4                                                    |
            | evar68    | Body                                                           |
            | pageName  | {CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | pageURL   | {PROTOCOL}://{CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | event112  |                                                                |
            | pev2      | MLP:SummaryBox:LinkClick                                      |
            | linkType  | lnk_o                                                          |

Summary Box MLP – Media link click event

Scenario: Summary Box MLP – Media link click event
  Given user is navigating to "/test/ncids-mini-landing-summary-box"
    And browser waits
When user clicks on the “Test File Download” link in the sentence “See Test File Download managed media link” in the summary box in the first position..
        Then page click request is sent
        And browser waits
        And the following parameters should be captured
    And the Mini Landing Page has an NCIDS Summary Box
  When the user clicks on a link in the NCIDS Summary Box
            | parameter | value                                                          |
            | prop4     | D=pev1                                                         |
            | prop8     | english                                                        |
            | prop57    | D=v64                                                          |
            | prop58    | D=v65                                                          |
            | prop59    | D=v66                                                          |
            | prop60    | D=c67                                                          |
            | prop67    | D=pageName                                                     |
            | prop68    | D=v68                                                          |
            | evar2     | D=c8                                                           |
            | evar61    | cgvMiniLanding\|ncids_default                                  |
            | evar64    | Media\|This is an example of a very long heading using th
\|Test File Download\                                 |
            | evar65    | Summary Box\|Not Defined\| Not Defined                      |
            | evar66    | 2\|1\|0\|0\|1\|1                                               |
            | evar67    | Text\|4\|3                                                   |
            | evar68    | Body                                                           |
            | pageName  | {CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | pageURL   | {PROTOCOL}://{CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | event112  |                                                                |
            | pev2      | MLP:SummaryBox:LinkClick                                      |
            | linkType  | lnk_o                                                          |

Summary Box MLP – No Heading Email link click event

Scenario: Summary Box MLP – No Heading Email link click event
  Given user is navigating to "/test/ncids-mini-landing-summary-box"
    And browser waits
When user clicks on the “Email Jenny” link in the sentence “Email Jenny” in the summary box in the second position with no heading.
        Then page click request is sent
        And browser waits
        And the following parameters should be captured
    And the Mini Landing Page has an NCIDS Summary Box
  When the user clicks on a link in the NCIDS Summary Box
            | parameter | value                                                          |
            | prop4     | D=pev1                                                         |
            | prop8     | english                                                        |
            | prop57    | D=v64                                                          |
            | prop58    | D=v65                                                          |
            | prop59    | D=v66                                                          |
            | prop60    | D=c67                                                          |
            | prop67    | D=pageName                                                     |
            | prop68    | D=v68                                                          |
            | evar2     | D=c8                                                           |
            | evar61    | cgvMiniLanding\|ncids_default                                  |
            | evar64    | Email\|Not Defined\|EmailJenny\                                 |
            | evar65    | Summary Box\|Not Defined\| Not Defined                      |
            | evar66    | 2\|2\|0\|0\|1\|1                                               |
            | evar67    | Text\|2\|1                                                   |
            | evar68    | Body                                                           |
            | pageName  | {CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | pageURL   | {PROTOCOL}://{CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | event112  |                                                                |
            | pev2      | MLP:SummaryBox:LinkClick                                      |
            | linkType  | lnk_o                                                          |

Summary Box MLP – No Heading Other link click event

Scenario: Summary Box MLP – No Heading Other link click event
  Given user is navigating to "/test/ncids-mini-landing-summary-box"
    And browser waits
When user clicks on the “Call Jenny” link in the sentence “Call Jenny” in the summary box in the second position with no heading.
        Then page click request is sent
        And browser waits
        And the following parameters should be captured
    And the Mini Landing Page has an NCIDS Summary Box
  When the user clicks on a link in the NCIDS Summary Box
            | parameter | value                                                          |
            | prop4     | D=pev1                                                         |
            | prop8     | english                                                        |
            | prop57    | D=v64                                                          |
            | prop58    | D=v65                                                          |
            | prop59    | D=v66                                                          |
            | prop60    | D=c67                                                          |
            | prop67    | D=pageName                                                     |
            | prop68    | D=v68                                                          |
            | evar2     | D=c8                                                           |
            | evar61    | cgvMiniLanding\|ncids_default                                  |
            | evar64    | Other\|Not Defined\|Call Jenny\                                 |
            | evar65    | Summary Box\|Not Defined\| Not Defined                      |
            | evar66    | 2\|2\|0\|0\|1\|1                                               |
            | evar67    | Text\|2\|2                                                   |
            | evar68    | Body                                                           |
            | pageName  | {CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | pageURL   | {PROTOCOL}://{CANONICAL_HOST}/test/ncids-mini-landing-summary-box |
            | event112  |                                                                |
            | pev2      | MLP:SummaryBox:LinkClick                                      |
            | linkType  | lnk_o                                                          |

Figma Comps Component Library List Summary Box on all breakpoints

Resources:


Solution

Prerequisites

adrianacastaneda commented 1 month ago

Is the heading automatically an H2? Or can the user select the type of heading (H2 and below)? Other than this question, everything else looks good to me @andyvanavery31 @sarinapadilla

welshja commented 1 month ago

Added new analytics values for pageTemplate and pageType to the requirements. These values were added in #4386