freeCodeCamp / chapter

A self-hosted event management tool for nonprofits
BSD 3-Clause "New" or "Revised" License
1.92k stars 359 forks source link

feat: stop the card flashing in eventCard #2351

Closed Sboonny closed 1 year ago

Sboonny commented 1 year ago

Without onError the eventCards will fallback to the image, while we need it to fallback if there is no image

ghost commented 1 year ago
👇 Click on the image for a new way to code review - Make big changes easier — review code in small groups of related files - Know where to start — see the whole change at a glance - Take a code tour — explore the change with an interactive tour - Make comments and review — all fully sync’ed with github [Try it now!](https://app.codesee.io/r/reviews?pr=2351&src=https%3A%2F%2Fgithub.com%2FfreeCodeCamp%2Fchapter)

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

Sboonny commented 1 year ago

rec-tab.webm

The issue is the fallback is shown while the image is lazy loading

Sboonny commented 1 year ago

Did you remember the image falling gracefully discussion in discord, and made suggestion based on it? 🤣

I have forgot about it completely, edit: well to be honest misremembered it, and didn't test it. 🤦 Thank you 💚

gikf commented 1 year ago

Thanks, this makes sense. The fallbackSrc and fallbackStrategy still might be useful though, for cases when image_url is provided, but cannot be loaded.