Skip to content
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

[BUG] referrerPolicy prop broken on Avatar (has PR) #7825

Closed
3 tasks
cranium opened this issue Jul 5, 2023 · 2 comments · Fixed by #7826
Closed
3 tasks

[BUG] referrerPolicy prop broken on Avatar (has PR) #7825

cranium opened this issue Jul 5, 2023 · 2 comments · Fixed by #7826

Comments

@cranium
Copy link
Contributor

cranium commented Jul 5, 2023

Adding a referrerPolicy prop to Avatar was discussed here and Implemented with #6057, but it doesn't work (and likely never worked).

Description

With code such as:

<Avatar
  src="animage.png"
  ignoreFallback
  referrerPolicy="no-referrer"
  bgColor="black"
/>

I get a DOM that looks like:

<span referrerpolicy="no-referrer" class="chakra-avatar css-542hqf">
  <img src="animage.png" class="chakra-avatar__img css-3a5bz2">
</span>

The referrerpolicy is not being passed down to the img.

For context, this is needed to make Google OAuth URLs work as avatars.

Link to Reproduction

https://codesandbox.io/s/affectionate-rumple-mvt36x

Steps to reproduce

  1. Inspect the DOM in the codesandbox

Chakra UI Version

2.7.1

Browser

No response

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

@cranium
Copy link
Contributor Author

cranium commented Jul 5, 2023

I pushed #7826 to fix- let me know if anything else is missing or needed.

@cranium cranium changed the title referrerPolicy passed to Avatar is passed to span instead of nested AvatarImage [BUG] referrerPolicy passed to Avatar is passed to span instead of nested AvatarImage Jul 6, 2023
@cranium cranium changed the title [BUG] referrerPolicy passed to Avatar is passed to span instead of nested AvatarImage [BUG] referrerPolicy prop broken on Avatar Jul 7, 2023
@cranium
Copy link
Contributor Author

cranium commented Jul 7, 2023

@segunadebayo @jaqas can you take a look? Much love and thanks.

@cranium cranium changed the title [BUG] referrerPolicy prop broken on Avatar [BUG] referrerPolicy prop broken on Avatar (has PR) Jul 7, 2023
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 a pull request may close this issue.

1 participant