Skip to content

feat(ListView): add ListViewSkeleton component#3330

Open
rzp-vyom[bot] wants to merge 1 commit intomasterfrom
feat/list-view-skeleton-loader
Open

feat(ListView): add ListViewSkeleton component#3330
rzp-vyom[bot] wants to merge 1 commit intomasterfrom
feat/list-view-skeleton-loader

Conversation

@rzp-vyom
Copy link
Copy Markdown
Contributor

@rzp-vyom rzp-vyom bot commented Apr 9, 2026

Summary

Adds ListViewSkeleton — a shimmer placeholder that mirrors the full ListView layout so every list view has a consistent, first-class loading state without needing spinners or ad-hoc custom skeletons.

Discussed in the Blade Slack thread — agreed to implement standard skeleton loading for list views, without RazorSense animation (tried but looked odd).

What it renders

  1. QuickFilter tab pills — 4 pill-shaped shimmer skeletons
  2. Search / action area — rectangular skeleton, right-aligned
  3. Table header row — one skeleton per column
  4. Table body rows — configurable count, cell widths varied (70% / 75% / 50%) to look like real data
  5. Pagination bar — 3 shimmer controls, bottom-right

API

<ListViewSkeleton
  rows={7}              // body row count   (default: 7)
  columns={5}           // column count     (default: 5)
  showFilters={true}    // filter bar       (default: true)
  showPagination={true} // pagination bar   (default: true)
/>

Usage

if (isLoading) {
  return <ListViewSkeleton rows={7} columns={5} />;
}
return (
  <ListView>
    <ListViewFilters ... />
    <Table ... />
  </ListView>
);

Files changed

File Change
src/components/ListView/ListViewSkeleton.tsx New component
src/components/ListView/__tests__/ListViewSkeleton.web.test.tsx 13 unit tests + 2 snapshots
src/components/ListView/index.ts Export ListViewSkeleton + ListViewSkeletonProps
src/components/ListView/docs/ListView.stories.tsx 4 new Storybook stories (preview via Chromatic link once CI runs)

export * from './ListView' in components/index.ts already covers the new export — no separate change needed there.

Test coverage

  • Renders all sections with default props
  • rows prop renders correct count (tested: 1, 3, 5, 7)
  • showFilters toggles filter bar
  • showPagination toggles pagination bar
  • Combined prop scenarios (table-only mode)
  • Snapshot coverage for default + minimal variants

Notes

  • No new dependencies — built on existing Skeleton + Box primitives
  • RazorSense animation intentionally excluded per design discussion
  • testID on every structural section for easy product-side test targeting

Storybook preview

Chromatic will generate a preview link once CI passes. Stories to look for:

  • Patterns/ListView — Skeleton — Default
  • Patterns/ListView — Skeleton — Table Only
  • Patterns/ListView — Skeleton — Many Columns (6)
  • Patterns/ListView — Skeleton → ListView transition (reload to replay)

🤖 Generated with Claude Code

Adds `ListViewSkeleton` — a shimmer placeholder that mirrors the full
ListView layout so every list view has a consistent, first-class loading
state without needing spinners or ad-hoc skeletons.

Layout mirrors:
  1. QuickFilter tab pills  (4 pill-shaped skeletons)
  2. Search / action area   (rectangular skeleton, right-aligned)
  3. Table header row       (one skeleton per column)
  4. Table body rows        (configurable via `rows` prop, cell widths
                             vary to look like real data)
  5. Pagination bar         (3 skeletons, bottom-right)

API:
  rows           — body row count (default: 7)
  columns        — column count   (default: 5)
  showFilters    — toggle filter bar skeleton (default: true)
  showPagination — toggle pagination skeleton (default: true)

Usage:
  if (isLoading) return <ListViewSkeleton rows={7} columns={5} />;
  return <ListView>...</ListView>;

Changes:
  - packages/blade/src/components/ListView/ListViewSkeleton.tsx  (new)
  - packages/blade/src/components/ListView/__tests__/ListViewSkeleton.web.test.tsx  (new, 13 tests + 2 snapshots)
  - packages/blade/src/components/ListView/index.ts  (export ListViewSkeleton)
  - packages/blade/src/components/ListView/docs/ListView.stories.tsx  (4 new stories)

No new dependencies. Built on existing Skeleton + Box primitives.
export * from './ListView' in components/index.ts already covers this.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

✅ PR title follows Conventional Commits specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants