-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add components to support skeleton loading states #4052
Conversation
🦋 Changeset detectedLatest commit: 2f8d800 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
export const BaseSkeletonBone = styled.div<BaseSkeletonBoneProps>` | ||
animation: ${shimmer}; | ||
display: block; | ||
background-color: var(--bgColor-muted, ${get('colors.canvas.subtle')}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible that somebody could render a skeleton loader on top of something with the bgColor-muted
background color. This would make the loader invisible except for the "shimmer" animation.
Reviewers, how do you think we should reckon with this?
- Add a boolean prop to change the color of a skeleton loaders. Kind of like the
contrast
prop on TextInput. - Add a component-specific color token that uses a color from the base gray scale with higher contrast.
- Keep this as-is until we identify a real use-case where this causes a problem.
Relates to https://github.com/github/primer/issues/2682
Kapture.2023-12-11.at.17.02.20.mp4
Changelog
New
Adds the following components:
SkeletonBox
- general-use skeleton loading componentSkeletonAvatar
- used to replace avatars with a skeleton loading stateSkeletonText
- used to replace text with a skeleton loading stateChanged
DataTable
andTreeView
use the new skeleton loading components instead of their ad-hoc skeleton loadersRemoved
Rollout strategy
Testing & Reviewing
Merge checklist