Linear Progress Indicator Specification - IgniteUI/igniteui-webcomponents GitHub Wiki

Linear Progress Indicator Specification

Contents

  1. Overview
  2. User Stories
  3. Functionality
  4. Test Scenarios
  5. Accessibility
  6. Assumptions and Limitations
  7. References

Owned by

Team Name: Astrea

Developer Name: Martin Evtimov

Designer Name:

Requires approval from

  • Peer Developer Name | Date:
  • Design Manager Stefan Ivanov| Date:

Signed off by

  • Radoslav Mirchev| Date:
  • Radoslav Karaivanov | Date: 2022-03-07

Revision History

Version Users Date Notes
1

The Linear Progress Indicator provides the ability to display a single-line progress indicator with its state changes. The value property determines the load state. The size of the filled-in part is calculated as a percentage based on the current value vs the max value. The default max value is 100. The progress indicator does not interact with the end-user and is read-only, i.e. the user could not change its state.

Objectives

The Linear Progress Indicator component is providing minimal API for the most common use cases, leaving maximum flexibility in the developer's hands. It follows the mobile-first approach and should be suitable for hybrid applications. It shows the status of an ongoing operation in a visual way and can represent determinate or indeterminate progress.

Acceptance criteria

  • Have a determinate linear progress indicator that shows increasing and decreasing action.
  • The progress indicator must have a variant (Primary, Warning, Danger, Info, Success) changing its background color.
  • The progress indicator must indicate the current state as a percentage and display it as such or any other way.
  • The linear progress indicator should support different styling – striped and solid color.
  • The indicator's value and max value must be configurable through the API.
  • The indicator's text which shows its progress should be templatable.
  • The text of the linear progress must have the ability to change its alignment(start, center, end) and position(top, bottom).
  • The linear progress indicator should provide an indeterminate mode to indicate an operation that is not clear how long will be needed until completion.

Elaborate more on the multi-facetted use cases

Developer stories:

  • Story 1: As a developer, I want to be able to display an infinitely looping loading progress for an action whose completion is unknown. This mode is achievable by a property on the Linear Progress Indicator and visually matches the Material Guidelines' indeterminate state.
  • Story 2: As a developer, I want to be able to display linearly certain progress for a concrete action so that the end-users know how much a task has been completed.
  • Story 3: As a developer, I want to be able to implement determined linear progress indicator visual styles so that I can integrate it better with the overall look and feel of the application.
  • Story 4: As a developer, I would like to hide, show, change the position and override the text which linear progress indicator shows.
  • Story 5: As a developer, I would like to be able to change the duration of the progress animation.
<igc-linear-progress indeterminate striped> </igc-linear-progress>

End-user stories:

  • Story 1: As an end-user, I want to be given an indication for any process that is taking place behind the scenes and prevents me from making further actions until complete e.g. a remote data that is being loaded to populate the UI.
  • Story 2: As an end-user, I want to be given a visual representation of how much a task or an action has been completed, so that I can be better informed about its state.
  • Story 3: As an end-user, I want to have a linear progress indicator, so that it matches the overall look and feel of the application.

Describe behavior, design, look and feel of the implemented feature. Always include a visual mock-up

3.1. End-User Experience

The linear progress indicator should fill from 0% to 100% and never decrease in value or loop for an unknown period of time to show an ongoing operation that is unclear how long will take.

3.2. Developer Experience

  • Developers are able to specify the value and max value of the linear progress indicator via the exposed value and max properties.
  • Developers are able to specify the displayed text position, visibility and format via the exposed labelAlign, hideLabel and labelFormat properties.
  • Developers are able to specify the progress type and style via the exposed variant and striped properties.
  • Developers are able to specify the duration of the progress animation via the exposed animationDuration property.
  • Developers are able to specify the progress as determinate or indeterminate via the exposed indeterminate property.
  • Developers could re-template the text area of the indicator via the default slot.

3.3. Globalization/Localization

N/A

3.4. Keyboard Navigation

N/A

3.5. API

igc-linear-progress

A linear progress indicator used to express unspecified wait time or display the length of a process.

Properties

Property Attribute Type Default Description
animationDuration animation-duration number 500 Animation duration in milliseconds.
hideLabel hide-label boolean false Shows/hides the label of the control.
indeterminate indeterminate boolean false The indeterminate state of the control.
labelAlign label-align "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" "top-start" The position for the default label of the control.
labelFormat label-format string Format string for the default label of the control.
Placeholders:
{0} - current value of the control.
{1} - max value of the control.
max max number 100 Maximum value of the control.
striped striped boolean false Sets the striped look of the control.
value value number 0 The value of the control.
variant variant "primary" | "info" | "success" | "warning" | "danger" "primary" The variant of the control.

Slots

Name Description
(default) The text area container.

CSS Parts

Name Description
track The progress ring's track area.
fill The progress indicator area.
striped The progress striped indicator
label The progress label
value The progress label value
indeterminate The progress indeterminate state
primary The progress indicator primary state.
danger The progress indicator error state.
warning The progress indicator warning state.
info The progress indicator info state.
success The progress indicator success state.

Automated

  • The Linear Progress Indicator should be initialized correctly with default values.
  • Should respond to passed values correctly.
  • Should set the value to 0 for negative numbers.
  • Should set the value to the maximum (default or custom max) if we try passing a value higher than the max.
  • Should change the value to max if the max value is updated to a lower (or equal) value.
  • Should not change the value if the max value is increased.
  • Should update the value when we try to increase/decrease it.
  • If the progress indicator mode is indeterminate and the value is updated, it should be displayed correctly when the mode is switched to determinate.
  • Should handle animations correctly when toggling indeterminate mode.
  • Should hide the default label when in indeterminate mode.
  • Should update the progress indicator part (striped) based on the striped property.
  • Should show/hide the default label depending on the hideLabel property.
  • The slotted label should not be affected by indeterminate and hideLabel properties.
  • Should display the value properly depending on the label-format. If it is not set, the value should be displayed in percent.
  • Should position the text correctly based on the label-align value. By default, it is 'top-start'.
  • Animations should respect RTL mode.
  • Should render proper aria attributes.

Manual

  • The update step should be 1% of the maximum value.
  • Should correctly display the progress fill background based on the variant property.
  • Should correctly display the progress fill style (striped or solid) based on the striped property.
  • Should position the text correctly based on the label-align value in RTL mode.

ARIA Support

The linear indicator has the progress bar role - https://www.w3.org/TR/wai-aria-1.1/#progressbar

RTL Support The component should support and respond to RTL layout.

⚠️ **GitHub.com Fallback** ⚠️