Skip to content

BlockDetailsSkeleton

Paulo Gomes da Cruz Junior edited this page Oct 1, 2026 · 1 revision

type: Component title: BlockDetailsSkeleton description: Loading skeleton for the reporting-unit block details page (issue #1369). tags: [frontend, react, reporting-unit, skeleton, loading] timestamp: 2026-10-01T00:00:00Z

BlockDetailsSkeleton

BlockDetailsSkeleton renders the loading skeleton for the reporting-unit block details page. It mirrors the loaded layout using Carbon SkeletonText placeholders so the transition to real content does not shift the page.

Rationale

Use BlockDetailsSkeleton when the block details page is loading. The component is rendered only after the request has been in flight for at least 300 ms (via the Delayed Flag Hook and its SKELETON_DELAY_MS constant), so fast responses never flash a skeleton.

Source References

  • Source: frontend/src/components/waste/ReportingUnits/BlockDetailsSkeleton/index.tsx
  • Tests: covered by the ReportingUnitBlockDetails page tests

Public Interface

Props

Name Type Required Description
(none) — — The skeleton is static; no props are accepted.

Rendered Regions

Region Test ID Contents
Page banner block-details-skeleton Heading skeleton (260 px) plus a 320 px line.
Summary card block-details-skeleton-summary Heading skeleton (200 px) plus six field lines matching the six summary fields.
Results region block-details-skeleton-results Heading skeleton (180 px) plus three full-width lines.

Behavior

  • Mirrors the loaded layout of the ReportingUnitBlockDetails page — page banner, reporting-unit summary card, and waste-volume results region.
  • All placeholders are SkeletonText; no data fetching and no state.
  • The page renders null instead of this skeleton during the first 300 ms of loading.

Known Constraints

  • The placeholder widths are hardcoded in the component; layout adjustments require source changes.
  • The skeleton mirrors the current loaded layout; adding regions to the page (slice 3) requires matching updates here.

Change Impact

See Also

Waste Plus Wiki

Home

Architecture

Codes

Decisions

Knowledge Base

Development

Changes

Clone this wiki locally