Unify Alert, Broadcast message and error-banner styles and structure

Problem

Today we have 3 unique designs for alerts, broadcast messages, and error-banners. We should unify these components in how they look and how they can be constructed. By doing this we can reduce the pattern and code management of these components and provide a consistent aesthetic and experience to our users when we need to notify them.

Note: Toasts have been left out for the time being. 
They could adopt this style but I wanted to focus the conversation on these components for now. 

Solution

Alerts-Before

Variants

Alerts-variants

Proposed structure

Screen_Shot_2019-09-23_at_10.08.21_AM

  • Icon: always present and representational of the type of notification being shown to user
  • Title: (Optional) may serve as a header to a formatted message in the container
  • Message: (Required)
  • Quick action- dismiss: Present when we want to allow the user to dismiss the notification
  • Quick action- remind me later: gitlab-org/gitlab-services/design.gitlab.com#406 (closed) (open discussion)
  • Primary & secondary action (optional): a way to provide a button to interact with if required.

Goals:

Open questions:

  1. Is this a desirable approach?
  2. Do we foresee any conflicts?
  3. Are the proposed designs the aesthetic direction we want to take?

Decisions:

Dismiss action:
  • Should remain as the x icon to account for internationalization. See comment
Ordering guidelines and definition
  • Needed. Will create an issue to discuss further once the conversation matures. See thread
Primary & secondary action styling:
  • Needed. [Issue]-(link) to discuss a default primary and secondary button style to use in alerts. See comment

/cc @gitlab-com/gitlab-ux

Edited by Andy Volpe