Skip to content

Conversation

@sadeghbarati
Copy link
Collaborator

from radix-ui

@pkg-pr-new
Copy link

pkg-pr-new bot commented Apr 20, 2025

Open in StackBlitz

npm i https://pkg.pr.new/reka-ui@1838

commit: 1523e89

@zernonia
Copy link
Member

Thanks @sadeghbarati !! Can you check the failing test? 😁

image.referrerPolicy = referrer
}
}
watch([() => src.value, () => referrerPolicy?.value, () => crossOrigin?.value], ([src, referrerPolicy], _, onCleanup) => {
Copy link
Member

@zernonia zernonia Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onCleanup in watch is 3.5+ feature, I believe this might not a feasible solution for earlier version. Perhaps use watchEffect?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Zernonia 👋

Right, will change it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@sadeghbarati
Copy link
Collaborator Author

Could you please update the tests 😄

@sadeghbarati
Copy link
Collaborator Author

Don't understand why the test is failing cause the img element is present (console.log in Avatar utils.ts)

image

@zernonia
Copy link
Member

No worry @sadeghbarati ! I can help with fixing the failed test. We might need to mock addEventListener

@zernonia zernonia changed the title fix(avatar): improve image loading status handling and add crossOrigin prop feat(Avatar): improve image loading status handling and add crossOrigin prop Apr 23, 2025
@zernonia zernonia merged commit 554cbb0 into v2 May 6, 2025
6 checks passed
@sadeghbarati sadeghbarati deleted the avatar-changes branch May 9, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants