Conversation
There was a problem hiding this comment.
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
Skeletoncomponent 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. |
packages/frappe-ui-react/src/components/skeleton/skeleton.stories.tsx
Outdated
Show resolved
Hide resolved
packages/frappe-ui-react/src/components/skeleton/skeleton.stories.tsx
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,49 @@ | |||
| import React from "react"; | |||
There was a problem hiding this comment.
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.
| import React from "react"; |
There was a problem hiding this comment.
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
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