Skip to content

Banner Specification

Milko Venkov edited this page Nov 9, 2018 · 21 revisions

Overview

igx-banner supports banner component that is shown at the full width of the screen above the app content but below a Navigation Bar if available.

Objectives

Provide means for developers to implement a mechanism that is less transient than a Snackbar and less obtrusive than a Dialog to display context-specific information with minimal efforts.

Simpler Layout Simpler Layout

More Complex Layout More Complex Layout

User Stories

Developer

  1. As a developer, I want to be able to add a Banner to my application, so that I can inform or “ask” the end user.
  2. As a developer, I want to add a message to the Banner, so that I clarify my Banner better for the end user.
  3. As a developer, I want to have at least one button, so that I can enable the end user confirm that he had been notified.
  4. As a developer, I want to add second button, so that I can enable the end user make a choice.
  5. As a developer, I want to customize the Banner template using ng-content, so that I would provide the end user with a custom Banner that suits the functions of the app. (various height, add more content, add inputs, checkboxes, radio button and etc)

End user

  1. As an end user, I want to get informed about events that are not critical in a less obtrusive way.
  2. As an end user, I want to get message in the Banner, so that I read more details and have a better understanding of my current situation.
  3. As an end user, I want to get an Icon that help me understand better the message shown.
  4. As an end user, I want to be able to take actions that are relevant to the information that is displayed.

Acceptance criteria

  • As a developer I can add a Banner to the application.
  • As a developer I can add a message to the Banner.
  • As a developer I can add an optional Avatar with icon to the Banner.
  • As a developer I can add one button to the Banner.
  • As a developer I can add a second button to the Banner.
  • As a developer I can customize the Banner content as I see fit.
  • As a developer I can assign events to actions occurring on the Banner.
  • The end user sees the Banner inline with other app content and may ignore it or dismiss it.
  • The end user could interact with the Banner through the actions triggered by the provided action buttons.
  • The citizen developer has all ARIA tags that apply.

Test Scenarios

Automation

  • Banner can contain an informative text message and optionally supplement it using a supporting illustration (icon or image).
  • Banner contains at least one and up to two text buttons with the dismissive action placed on the left and the confirming action on the right.
  • Buttons are placed under the banner message or on the same line if there is enough room to fit both.
  • Banner template can be customized using ng-content
  • Banner spans the entire width of the parent element.
  • In case a banner appears after a screen loads it animates from the top of the parent element layout pushing the content downwards.
  • Banner persists until the user acts on it or dismisses it. Any other user interaction with the app content (button clicking, key navigation, scrolling, form submission, etc.) should not dismiss the banner.
  • Proper events are triggered on banner dismissal and confirmation
  • onOpen and onClose events are fired on banner opening/closing.
  • Open multiple banners and each banner pops up not affecting other banners.

Functionality

End User Experience

The Banner must follow the material design guidelines, i.e. less transient information container that the Snackbar and less obtrusive than a Dialog, which pushes the rest of the application interface as it appears from the bottom or the top. The Banner appears to be inlined with the rest of the content and lies on the same plain as the main app content (no elevation is ever applied).

Developer Experience

User Interface

The end user interface consists of:

  1. Content - the Banner content is typically a text paragraph and optionally an icon avatar may precede it. However, the content presents a template where custom layouts can be accomplished too.
  2. Actions - Banners present a focused and limited set of actions, which are generally affirmative or dismissive, but may also be specific to the content message

API

You should be able to configureigx-banner by using next properties:

  • message - Sets the message to show in the banner
  • confirmButtonText - Sets the description of confirming button
  • dismissButtonText - Set the description of the dismissive button
  • icon - Set name of the icon from material design icons
  • collapsed - Gets whether igx-banner is collapsed

You can also use next methods to interact with the igx-banner:

  • open - Opens the igx-banner
  • close - Closes the igx-banner
  • toggle - Toggles the igx-banner

While using igx-banner you can listen to next events:

  • onOpen - Fires after the igx-banner shows up
  • onClose - Fires after the igx-banner hides
  • onButtonClick - Fires when one clicks either confirming or dismissive button

ARIA support

Clone this wiki locally