docs: don't animate pixel loader when not in view - #10576
Conversation
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
What do you think about putting this in the PixelLoader component itself rather than something that would need to be copy and pasted from the docs? That would also have the benefit that if you scrolled the response status out of view in the chat it would automatically pause to reduce cpu consumption. |
|
hmm good point, i'll take a look |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
nice seems to work. one tiny detail is that the setInterval and the animation can get out of sync because the animation is paused mid-cycle and resumes when it comes back into view, whereas the interval re-starts from the beginning. you can sort of see it as an extra delay between icons. they will re-sync on the next iteration though so not too big a deal. |
|
Build successful! 🎉 |
Agent Skills ChangesModified (9)
InstallReact Spectrum S2: React Aria: |
Closes
✅ Pull Request Checklist:
📝 Test Instructions:
Go to ai components doc page, open chrome's task manager and compare it with the ai component doc page on prod. the cpu should be lower when you are not over the pixel loader section.
🧢 Your Project: