-
Notifications
You must be signed in to change notification settings - Fork 13.5k
fix(skeleton-text): animation no longer jumps on large skeleton text elements #22697
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
Conversation
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.
Thanks for the PR! Two things I noticed:
- The animation should be 1s, not 2s.
- The "shimmer" seems to be larger than it was before.
I attached a comparison below (you may need to open the GIFs in a new tab to see the full size). The left GIF has your changes, and the right GIF is what is currently in master
.
branch | master |
---|---|
![]() ![]() |
![]() ![]() |
$skeleton-text-background-animated 60%, | ||
transparent | ||
); | ||
animation: shimmer 2s infinite; |
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.
animation: shimmer 2s infinite; | |
animation: shimmer 1s infinite; |
The old animation was 1s long
@liamdebeasi ?? |
@liamdebeasi Could you please check my last Question? |
Sorry, most of the team was out the past few weeks for winter holidays, so I didn't see your question. Ideally this PR would keep the visual effect of the gradient exactly the same as shown in the |
I updated the styles back to the default one. |
Thanks, I took a look and some of the issues we discussed previously still persist (mainly the GIFs in #22697 (review)). I think the solution here is simpler than originally expected. The background-size of the skeleton text is set to Can you give that a shot and let me know if it looks good to you? So the animation should look something like this: @keyframes shimmer {
0% {
background-position: -400px 0
}
100% {
background-position: 400px 0
}
} If it looks good then I think we can revert the changes made here and just include the CSS Animation change. |
In general on lager Screens the Shimmer appears two times because of the fixed Size of 800px. But it looks good to me. |
I think this is intentional, but it might be worth revisiting the designs for this in the future.
If you could make the change that would be great. I do not have write access to this PR. |
Changed the Code Back to Original with the 400px change. |
@liamdebeasi Could you check and merge? |
Merged. Thank you! |
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
#22694
Issue Number: #22694
What is the new behavior?
Does this introduce a breaking change?
Other information