Page MenuHomePhabricator

[EPIC] ProgressIndicator: Add ProgressIndicator component to Codex
Closed, ResolvedPublic

Assigned To
Authored By
Sarai-WMDE
Sep 8 2023, 2:30 PM
Referenced Files
F58592603: image.png
Mar 4 2025, 9:15 AM
F42210237: image.png
Feb 28 2024, 12:18 PM
F42209927: image.png
Feb 28 2024, 12:03 PM
F42209916: image.png
Feb 28 2024, 12:03 PM
F42209967: image.png
Feb 28 2024, 12:03 PM
F42209959: image.png
Feb 28 2024, 12:03 PM
F42209896: image.png
Feb 28 2024, 12:03 PM
F42209886: image.png
Feb 28 2024, 12:03 PM

Description

Background

A loader-type animation displaying three dots that progressively change in size is currently used within some components and areas in Wikimedia products to indicate that something is loading or a process is in progress.

We should collect and analyze existing use cases in order to define the recommendations and styles (sizes, colors, animation) of this potential Codex component.

Description

The ProgressIndicator is aimed at communicating to users that the system is actively working to retrieve information or complete a task, thus managing their expectations by indicating that waiting is required.

This loading element is usually displayed in page areas of different sizes, as well as within components.

Find a code prototype of the former/now outdated bouncing dot animation in this Codepen.

User stories

  • As a designer and developer, I want to be able to reuse a loading animation component to indicate that the system is actively working on a task requested by a user

History

  • This component has been identified/documented in different tasks:

T266028: Add “Progress indicators” to DSG
T289989: Add loading spinner component.

Known use cases

image.png (622×1 px, 38 KB)
Special:RecentChanges/RCFilters
Watchlist/RC filter loading panel
image.png (981×1 px, 166 KB)
Upload Wizard
Screenshot 2023-09-08 at 16.22.57.png (230×456 px, 23 KB)
Wikibase Date input component: the loader indicates that the input is being processed. As documented in this component's Guidelines, we will not use a ProgressIndicator for Menu loads; instead, we will use an Inline ProgressBar.

Existing implementations

These artifacts are listed for historical context. The Figma spec, linked below, is the source of truth for the new component.

Wikimedia community:

External libraries:

  • Add links to any examples from external libraries

Codex implementation

Component task owners

Open questions

  • One overarching architectural question for both, Vue and CSS-only version, but also as possible expansion to ProgressBar is using <progress> HTML5 element over a <div> and ARIA roles and attributes mix.

@Volker_E's proposal is to use <progress> here to follow ARIA principle of always prefer using semantic elements over roles and attributes.
In DST engineering sync 2025-02-18 we agreed on going that route. With special quality assurance attention is given to older or niche browser rendering engines at low risk as in this case the widely browser supported .screen-reader-text() mixin is applied.

Design spec

A spinner indicator that animates to show loading status. This component maintains consistency across desktop (Vector 22) and mobile (Minerva) layouts.

Core Properties
  • One single size: size-icon-medium (20px)
  • Color: border-color-progressive
  • Border: border-width-thick
  • Spacing between spinner and text: spacing-50 (8px)
Animation Specifications
  • Type: Continuous clockwise rotation
  • Duration: 1000ms per full rotation (was originally 1200ms in design, but agreed to sped it up)
  • Timing: animation-timing-function-linear
  • Iteration: animation-iteration-count-base

Guidelines


Acceptance criteria

Minimum viable product

This task covers the minimum viable product (MVP) version of this component. MVP includes basic layout, default states, and most important functionality.

MVP scope

Design

  • Design the Figma spec sheet and add a link to it in this task
  • Update the component in the Figma library. This step will be done by a DST member.

Code

  • Implement the component in Codex

Future work

Details

Other Assignee
bmartinezcalvo

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Known use cases

image.png (622×1 px, 38 KB)
Special:RecentChanges/RCFilters
Watchlist/RC filter loading panel
Screenshot 2023-09-08 at 16.22.57.png (230×456 px, 23 KB)
Wikibase Date input component: the loader indicates that the input is being processed

The Indeterminate Progress Bar implemented in Codex communicates that a process is happening. The elevated bar communicates an ongoing process on a page, while the inline bar communicates it within other components.

Captura de pantalla 2024-02-28 a las 11.41.42.png (1×1 px, 106 KB)

The use cases described in this task for BouncingDots could potentially be addressed using elevated and inline progress bars. Unless there are additional use cases that necessitate BouncingDots, we may consider not implementing this component.

Known use cases

image.png (622×1 px, 38 KB)
Special:RecentChanges/RCFilters
Watchlist/RC filter loading panel
Screenshot 2023-09-08 at 16.22.57.png (230×456 px, 23 KB)
Wikibase Date input component: the loader indicates that the input is being processed

The Indeterminate Progress Bar implemented in Codex communicates that a process is happening. The elevated bar communicates an ongoing process on a page, while the inline bar communicates it within other components.

Captura de pantalla 2024-02-28 a las 11.41.42.png (1×1 px, 106 KB)

The use cases described in this task for BouncingDots could potentially be addressed using elevated and inline progress bars. Unless there are additional use cases that necessitate BouncingDots, we may consider not implementing this component.

cc @Pginer-WMF and @JFernandez-WMF if they have additional use cases where bouncing dots are located in the centre of a block of loading content - Content Translation and Welcome survey > Language selector respectively, where the progress bars are likely not fit for purpose in their current state. The places from above:

"cxspinner" on CX dashboard
image.png (682×1 px, 64 KB)
loading
loaded
image.png (1×2 px, 306 KB)
Translating an article loading
image.png (1×1 px, 118 KB)
loaded
image.png (1×1 px, 820 KB)
Welcome survey languages question loading
image.png (352×1 px, 50 KB)
loaded
image.png (244×1 px, 36 KB)
RHo attached a referenced file: F42209916: image.png. (Show Details)
RHo attached a referenced file: F42209967: image.png. (Show Details)
RHo attached a referenced file: F42209959: image.png. (Show Details)
RHo attached a referenced file: F42209896: image.png. (Show Details)
RHo attached a referenced file: F42209886: image.png. (Show Details)

Additional usage on Commons MediaSearch:

image.png (1×2 px, 306 KB)

I would in general advise to check on https://codesearch.wmcloud.org/search/ and with design teams for additional use-case collection

CCiufo-WMF moved this task from Later to Supporting on the Design-System-Team (Roadmap) board.
CCiufo-WMF changed the task status from Open to In Progress.Jul 4 2024, 5:27 PM

Hello team, after exploring both spinner and bouncing dots options, we're thinking of proceeding with bouncing dots to maintain consistency with our current product usage.
I've started initial designs in Figma file. Some of the open questions I am thinking

  • I'm thinking of proceeding with two versions: 12x12 for larger screens and 8x8 for smaller screens. Do we think one size could suffice for all use cases?
  • We're planning to use progressing color (#3366cc). This can work for both light and dark modes.
  • In its existing usage in different places (recent changes, CX, etc.), do we define a maximum display time for bouncing dots before showing any other message?
  • For naming purpose, do we have a preference that describe its function? some examples are - Bouncing dots, Progress dots, Activity indicator, Status indicator.

Let me know if we have any other questions or suggestions for the loading indicator design.

Hello team, after exploring both spinner and bouncing dots options, we're thinking of proceeding with bouncing dots to maintain consistency with our current product usage.
I've started initial designs in Figma file. Some of the open questions I am thinking

  • I'm thinking of proceeding with two versions: 12x12 for larger screens and 8x8 for smaller screens. Do we think one size could suffice for all use cases?

Since we are planning to introduce the different size modes, it makes sense to me to define 2 different sizes and use it according to each mode/screen size. @DTorsani-WMF wdyt?

  • We're planning to use progressing color (#3366cc). This can work for both light and dark modes.

I agree. As we discussed during our last catch up, it makes sense to use this @background-color-progressive Since it's the color we use to indicate progress in other indicators, such as the ProgressBar.

  • In its existing usage in different places (recent changes, CX, etc.), do we define a maximum display time for bouncing dots before showing any other message?

I'm not sure if a message is combined with these bouncing dots. Maybe the engineers can give you more context on this @Catrope @egardner @AnneT @lwatson @Volker_E

  • For naming purpose, do we have a preference that describe its function? some examples are - Bouncing dots, Progress dots, Activity indicator, Status indicator.

I would avoid using so generic names such as "LoadingIndicator" since this could apply to any other loading indicators such as spinners, and I would also avoid using concrete names like "Dots" that can affect future iterations. So, what about "BouncingLoader"?

At the moment, we aren't implementing the different font modes for components, and we also don't respond component sizing for different screen sizes, even though in Figma some components are designed this way. My suggestion for now, for the sake of consistency would be to design the version that feels best for all screen sizes until we can spend time on considering responsiveness and font modes more.

As discussed internally, we plan to rename this component to "ProgressIndicator" to align it with the ProgressBar component. I'm updating the title in the various tasks.

bmartinezcalvo renamed this task from LoadingIndicator: Add LoadingIndicator component to Codex to ProgressIndicator: Add ProgressIndicator component to Codex.Jul 30 2024, 8:49 AM
bmartinezcalvo updated the task description. (Show Details)
bmartinezcalvo updated the task description. (Show Details)

@CCiufo-WMF this component is ready for implementation.

CCiufo-WMF renamed this task from ProgressIndicator: Add ProgressIndicator component to Codex to [EPIC] ProgressIndicator: Add ProgressIndicator component to Codex.Aug 23 2024, 7:04 PM
CCiufo-WMF updated the task description. (Show Details)
CCiufo-WMF removed a subscriber: Sarai-WMDE.

We've built a version of this in Vue previously: see the Vue component and separate Less file. The Less probably needs to be updated to match the spec exactly, but hopefully this can be used as a starting point.

CCiufo-WMF changed the task status from In Progress to Stalled.Oct 21 2024, 2:42 PM
CCiufo-WMF changed the task status from Stalled to In Progress.EditedJan 20 2025, 10:18 PM
CCiufo-WMF moved this task from Next to Supporting on the Design-System-Team (Roadmap) board.
Volker_E updated the task description. (Show Details)
Volker_E updated the task description. (Show Details)
Volker_E updated the task description. (Show Details)

The ProgressIndicator, guidelines, and CSS-only version have been implemented in Codex. So solving this EPIC.

Technically the component is not available yet, so keeping open for now.

CCiufo-WMF changed the task status from Open to In Progress.Mar 4 2025, 4:12 PM
This comment was removed by bmartinezcalvo.

ProgressIndicator was included in Codex v1.21.1.

Thank you @SGautam_WMF for your contribution!