Skip to content

Feat/skeleton component#231

Open
aakash19here wants to merge 4 commits intortCamp:mainfrom
aakash19here:feat/skeleton-component
Open

Feat/skeleton component#231
aakash19here wants to merge 4 commits intortCamp:mainfrom
aakash19here:feat/skeleton-component

Conversation

@aakash19here
Copy link
Copy Markdown

Description

Adds a new Skeleton component to the library, a lightweight, accessible loading placeholder that improves the user experience by displaying animated placeholders while content is being fetched, similar to a youtube style skeleton loading screen.

The implementation is inspired by shadcn/ui's Skeleton and follows the same minimal, composable approach.

Screenshot/Screencast

Dark:

dark.mov

Light:

light.mov

Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

Copilot AI review requested due to automatic review settings March 20, 2026 19:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Skeleton loading placeholder component to frappe-ui-react, along with Storybook examples and unit tests, and exports it through the library’s components index.

Changes:

  • Added Skeleton component implementation (div-based placeholder with pulse animation).
  • Added Storybook stories demonstrating common Skeleton layouts.
  • Added unit tests and exported the component via the package component barrel exports.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/frappe-ui-react/src/components/skeleton/skeleton.tsx Implements the new Skeleton component and its default styling/props forwarding.
packages/frappe-ui-react/src/components/skeleton/skeleton.stories.tsx Adds Storybook stories to showcase the component in different layouts.
packages/frappe-ui-react/src/components/skeleton/tests/index.tsx Adds unit tests for basic render/attributes/class behavior.
packages/frappe-ui-react/src/components/skeleton/index.ts Adds barrel exports for the new component.
packages/frappe-ui-react/src/components/index.ts Re-exports Skeleton from the top-level components entrypoint.

@@ -0,0 +1,49 @@
import React from "react";
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React is imported but not used in this test file (other component tests rely on the automatic JSX runtime and omit this import). Consider removing it to avoid unused-import lint failures.

Suggested change
import React from "react";

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the react import the ts compiler throws this error 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.ts(2686) even though ts config has jsx property to be react-jsx

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.

2 participants