NCIOCPL / cgov-digital-platform

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

Story: Create Production Prototype of Imageless Card for MLP #4383

Open andyvanavery31 opened 4 months ago

andyvanavery31 commented 4 months ago

As a content editor, I want to be able to add a featured item or items on a Mini Landing Page without a distracting or expendable image, so that site visitors can identify important information without skipping it due to perceived ad-blindness.

Requirements

Functional Requirements

Measurement Plan

Analytics Requirements

DoR Tasks

DoD Tasks

Technical Notes

Scenarios/Figma

Acceptance Criteria

Front-End Experience

Scenario: A user views the imageless card(s)
  Given the imageless card(s) are created on a storybook or other test platform
    And they are organized using the scenarios defined above
  When a user views the imageless card(s)
  Then they will exactly match the comp
  When a user hovers their mouse over an imageless card
  Then it will display the hover state
  When a user clicks on an imageless card
  Then they will be redirected to the link of that card
  When the breakpoint is smaller than tablet large (less than 880px)
  Then the cards will stack vertically

Analytics

Scenario: Analytics click event for the Prototype Imageless Cards on Mini Landing Pages (Specific pages to be added later)
  Given a user is on the specific Mini Landing Page
  When the user clicks on one of the Imageless Feature Cards within the Raw HTML component
  Then there will be an NCIDataLayer Other event
    And the event has the name "MLP:RawHTML:LinkClick"
    And the event has the linkname "MLP:RawHTML:LinkClick"
    And this event will have the following data
    | key | value |
    | location | body |
    | pageType | This will return the value of the page type and should match the dcterms.type meta data tag on the page. |
    | pageTemplate | This will return the value of the page template and should match the cgdp.template meta data tag on the page.   |   
    | pageRows | This will return the number of rows on the page overall |
    | pageRowIndex | This will return the index of the row number on the page that was clicked |
    | pageRowCols | This will return the number of columns in the row where the link click occurred |
    | pageRowColIndex | This will return the index of the imageless card that was clicked by column in the row clicked |
    | containerItems | This will return the number of imageless cards in the paragraph of imageless cards |
    | containerItemIndex | This will return the value of the imageless card clicked in the total number of imageless cards in the paragraph. Counting will start at index 1 in the upper left corner, and count sequentially from left to right through each row before proceeding to the next row |
    | componentType | Defaults to 'Raw HTML' |
    | componentTheme | Default is 'Not Defined' |
    | linkText | Defaults to the title of the imageless card clicked
    | componentVariant | This will pass the value 'ImagelessCard' |
    | title | This will pass the title of the imageless card clicked |
    | linkType | This will be added as a data attribute to each card in the Raw HTML block and defined as 'Internal', 'External', or 'Multimedia' based on the type of link in the code |
    | linkArea | This will be set to 'Card" for all the imageless cards |
    | totalLinks | Default is 1 |
    | linkPosition | Default is 1 |

Notes


Solution

Prerequisites

adrianacastaneda commented 4 months ago

Scenarios and ACs look good to me, thank you! @andyvanavery31 @sarinapadilla

welshja commented 4 months ago

Added new analytics values for pageTemplate and pageType to the requirements. These values were added in https://github.com/NCIOCPL/cgov-digital-platform/issues/4386