-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
v3: Avatar component does not accept crossorigin prop or actions. #3230
Comments
Additionally, I'd be willing to submit a PR for this feature if needed. |
Just keep in mind that Actions are not attributes, they are functional implementation that the Svelte compiler interfaces with. AFAIK they cannot be passed as a arbitrary prop, just like they can't be triggered at runtime. We have been pondering a convention for passing arbitrary props to components that require them, but I'm not sure we've settled on one yet. Ideally this needs to satisfy a few requirements:
I know this seems like a trivial add, but any PR must take into account the bigger picture here. In the meantime, you could consider using the Fallback slot with your own |
The action was passed through the Arbitrary props aren't completely necessary, but a crossorigin one could be implemented for avatars and other image-based components. Not sure if that's in-scope or would get messy however. |
@itzTheMeow I'll quickly reiterate that the team and I are still evaluating this and similar issues as part of a larger sweeping change to component APIs in the future. Unfortunately I don't think we're going to be able to make headway on this prior to the v3 launch coming next week. So I'm going bump this to our post-release milestone to revisit in the future. My advise in my prior message will need to suffice as the interim solution for now:
It's not perfect I know. But hopefully this can get you by for now. |
Describe the feature in detail (code, mocks, or screenshots encouraged)
In v2, you were able to pass an action to the
Avatar
component. This was useful for performing actions on the image after it loaded. In v3 however, this property has been removed. Also in v2, you could set additional props on the avatar such ascrossorigin="anonymous"
, as they were passed to the internal img element. In v3 this is removed.I'd like to request these features be added back in v3.
What type of pull request would this be?
Enhancement
Provide relevant links or additional information.
No response
The text was updated successfully, but these errors were encountered: