Add support for page banner status messages

Description

Acceptance Criteria

  • have the ability to show a status message on a page banner

  • have the message styled for Pattern Library pages only

  • don't break any existing page-level banner messages

  • implement a test message on the Pattern Library course skeleton

  • document the helper method thoroughly

    • mention that it only works for Pattern Library for now

Technical Details

  • determine what the Business team already built (on dashboard)

  • update main.html to show messages

    • only show messages of type edx-message

    • need a v1 style version (for dashboard)

    • need a Pattern Library version

    • need a Bootstrap version

  • style the new alerts as needed

  • add a higher level API for recording messages

    • helper method

    • does safe template processing on the inputs

    • aria-label support

    • title and message copy

    • icon class (turn into a message tag)

    • add a special tag indicating edx-message

      • only these messages are shown

      • they are known to have safe HTML

  • support messages for the current page

    • don't record them in Django messages?

    • iterate both page and Django messages in main.html

    • can we just add them to Django messages and clear them before the next page

    • it looks like the act of querying them marks them as used, so won't show on the next page

  • need a way to indicate the message type to show the right icon

    • define extra_tags for general use: info, warning, error

  • add a comment next to remaining loops over messages

    • mention that this should be transitioned to the new API

  • document the new API story

    • clear docstrings on the new API

    • add an edx-platform best practice for handling messags

    • email edx-code and eng-all with pointer to the best practice

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Status

Assignee

Andy Armstrong

Reporter

Andy Armstrong

Labels

None

Reach

None

Impact

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Stakeholders

None

Story Points

2

Components

Sprint

None

Priority

Unset
Configure