Background
- Description: Skeletons are loading indicators that take the approximate shape of the UI elements they are acting as a placeholder for.
- History: There are two main tasks and threads that should be taken into consideration when tackling the definition of this pattern: T280842: Define and add guidelines for adding skeleton/placeholder UI to the DSG and T266028: Add “Progress indicators” to DSG.
- Known use case(s): Skeleton loaders are currently used in production in the following scenarios: Within Growth's Newcomer homepage suggested edits modules (or cards), as loading indicators for images in Wikipedia articles (only in Minerva), as loading indicators for the main search's menu item thumbnails in Minerva.
- Considerations: This pattern should be approved by the design team before being introduced in our design system. Its place among other progress/loading indicators (T266028) and usage recommendations should also be properly defined.
Further details are available in the following product document.
User stories
- As a designer and developer, I want to be able to reuse a skeleton animation to visually indicate to users that UI content is loading.
Previous implementations
These artifacts are listed for historical context. The figma spec, linked below, is the source of truth for the new component.
- Design style guide: Pending. See T280842
- OOUI: -
- Vue: -
- Growth: CSS skeleton loader T321675: NewImpact: Create skeleton loading state (see code)
The most relevant implementations of skeleton loaders are in MobileForntend and Minerva skin (using the class .image-lazy-loaded), and GrowthExperiments project (.se-card-image.skeleton, .se-card-extract.skeleton, .se-card-pageviews.skeleton).
Growth newcomer homepage | Image thumbnails on articles | Image thumbnails on search (Minerva) |
T263040 Suggested edits module T321675 Impact module | ||
Open questions
- Skeleton size: will skeleton be the same size of the element that is replacing or should we create different predefined skeleton sizes? (e.g. 16px, 24px, 40px height)
- Skeleton color: If skeleton will be used on gray bg components (e.g. in framed tab component) we should use a different color for the skeleton.
- Skeleton sequence: could implementers control the sequence in which skeleton loads? Could this be a prop?
Codex implementation
Component task owners
- Designer: @Sarai-WMDE
- Developer: add the main developer's name
Design spec
Stage 1: Minimum viable product (MVP)
MVP includes basic layout, default states, and most important functionality.
Acceptance criteria
- Determine what MVP includes for this component and document this in a subtask. Assign task to designer.
- Design MVP.
- Get approval by Product design team
- Once complete design MVP, assign task to developer.
- Implement MVP
Stage 2: Additional states, features, and variants
Acceptance criteria
- Document design and implementation of additional states and features in individual subtasks
- Complete each additional state/feature subtask
Stage 3: Refinement
Acceptance criteria
- Finalize docs: open and complete a subtask for any additional demos that need to be added or documentation that needs work
- Update loading guidelines added in T377434 with relevant information about Skeleton loaders
- Meet accessibility standards: open and complete a subtask for any necessary accessibility improvements
- Meet internationalization standards: open and complete a subtask to fix any i18n bugs
- Complete testing: open and complete a subtask for any additional unit or functional tests that are needed