nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.14k stars 1.34k forks source link

[Avatar] Fix flashing when image is already cached #3437

Open LeakedDave opened 1 month ago

LeakedDave commented 1 month ago

NextUI Version

2.4.2

Describe the bug

Avatars flicker and animate when they should be rendered instantly when cached, Radix shows a fix here ->

https://github.com/radix-ui/primitives/pull/3008

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Using Avatar should render immediately if the image is cached with no loading animation or flickerAvatars flicker and animate when they should be rendered instantly when cached, Radix shows a fix here ->

https://github.com/radix-ui/primitives/pull/3008

Expected behavior

Using Avatar should render immediately if the image is cached with no loading animation or flickerAvatars flicker and animate when they should be rendered instantly when cached, Radix shows a fix here ->

https://github.com/radix-ui/primitives/pull/3008

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

linear[bot] commented 1 month ago

ENG-1123 [Avatar] Fix flashing when image is already cached

uigywnkiub commented 1 month ago

+, even with Image from next as Avatar or User props...

awesome-pro commented 1 month ago

@wingkwong I am working on it.

rkkautsar commented 1 month ago

@abhinandan-verma hi very sorry I have already worked on this since it's similar to my MR in radix. I didn't see your comment here when I worked on it. I have put up an MR here if you want to review: https://github.com/nextui-org/nextui/pull/3444. Let me know if it's acceptable or you can close it if you already has something else. Thanks

awesome-pro commented 1 month ago

@rkkautsar Thanks for your MR. I was working on it, but Your MR seems more effective. Kindly update the PR summary , description to make it more understandable.

ameytessact commented 1 month ago

is there any temporary fix until the PR is merged? I am facing the same issue with NextImage passed as ImgComponent.

LeakedDave commented 1 month ago

@abhinandan-verma Has this made it into 2.4.6 by any chance?

uigywnkiub commented 1 month ago

Still bug in 2.4.5 and 2.4.6

LeakedDave commented 2 weeks ago

Should we just go ahead and use Radix for this component? Any ETA?