saleor-dashboard-loading

Implements skeleton, spinner, and empty-state loading patterns for Saleor Dashboard entity views.

1.0k|1.2k|Updated Jun 19, 2019
One-click install
npx skills add https://github.com/saleor/saleor-dashboard --skill saleor-dashboard-loading
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: saleor-dashboard-loading
Source: https://github.com/saleor/saleor-dashboard/tree/main/.claude/skills/saleor-dashboard-loading
Command: npx skills add https://github.com/saleor/saleor-dashboard --skill saleor-dashboard-loading

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Entity detail pages in Saleor Dashboard often flash wrong defaults—selected radios, fake metrics, or form values—before async GraphQL data resolves, causing layout jumps and misleading UI. This Skill defines rules for building loading states that mirror the final layout without inventing data.

Core Features & Use Cases

  • Indicator selection guidance: Choose between Skeleton, Spinner, LoadingDots, and EmptyState based on whether the layout shape is known and whether the query returned data.
  • Page vs region loading: Gate the entire Form until the primary entity loads, then use in-card skeletons for secondary queries like voucher code pagination.
  • Anti-pattern prevention: Avoid fake selected defaults, premature type-dependent nav, full-page spinners for known grids, and skeletons shown forever on empty results.
  • Use Case: When building a new discount detail page, apply the checklist to gate the Form with key={entity.id}, render a *DetailsPageLoading shell matching the final grid, and wrap loading regions in aria-busy.

Quick Start

Ask the AI to add a loading skeleton shell to a Saleor Dashboard detail page following the saleor-dashboard-loading rules so no default form values flash before data loads.

Frequently Asked Questions about saleor-dashboard-loading

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a loading skeleton to a Saleor Dashboard detail page?

Create a dedicated *DetailsPageLoading component that mirrors the final DetailPageLayout, including skeleton section-nav labels, card bodies, and a disabled Savebar. Do not mount the Form until the primary entity query resolves, and remount it with key={entity.id} when navigating between entities.

When should I use Skeleton vs Spinner in React admin UIs?

Use Skeleton when async data fills a known layout such as cards, grids, or table rows. Use a Spinner only for single in-flight actions like a save button or dialog confirm, and use EmptyState when a query finishes with no results.

Why does my form flash default values before data loads?

The Form component mounts before the entity query resolves, so controlled inputs render initial defaults like a selected radio or zero metric. Gate the Form behind the entity existing and keep skeleton placeholders until the real data arrives.

Does this loading approach require installing the Geist package?

No. The patterns are inspired by Geist Skeleton design principles but are implemented with the existing macaw-ui-next Skeleton component and current spinners. No additional packages should be installed.

How do I handle secondary queries loading after the page reveals?

Use in-card skeletons for secondary lists like voucher code pagination instead of tearing down the whole page. Optionally keep the page shell on first paint until the secondary query settles once, using a hasRevealedContent flag keyed by entity id.