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

#2078: Send event if image load fails, update changelog closes #2123

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

yringler
Copy link
Contributor

See #2122

Copy link

vercel bot commented Jul 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
shoelace ✅ Ready (Inspect) Visit Preview Jul 29, 2024 2:51pm

@yringler
Copy link
Contributor Author

If you're interested in this feature, LMK, and I can also add to the "should not render the image when the image fails to load" unit test.

src/components/avatar/avatar.component.ts Outdated Show resolved Hide resolved
@claviska
Copy link
Member

Thanks for the PR! I'm fine with this with one minor suggestion. Feel free to add a test if you'd like.

@yringler
Copy link
Contributor Author

Renamed, added test

@@ -62,7 +70,7 @@ export default class SlAvatar extends ShoelaceElement {
src="${this.image}"
loading="${this.loading}"
alt=""
@error="${() => (this.hasError = true)}"
@error="${this.onImageLoadError}"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@error="${this.onImageLoadError}"
@error="${this.handleImageLoadError}"

@claviska claviska merged commit 03adb45 into shoelace-style:next Jul 29, 2024
1 of 2 checks passed
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.

2 participants