This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
Replies: 1 comment 3 replies
-
I think if we were to handle images, it increases complexity quite a bit because of how much the content can vary. We already saw this somewhat happen in
In this case, the user should probably be the one to check if the browser fetch failed (and pass In the future, we might want to add an |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I started looking at the UserIcon and our UX recommendations are to use a Gravatar image if the user have one available, or the abreviation if none is available.
I looked a bit into doing this, but basically, I dont really have a way to know if the image will be valid or end in a 404 (except maybe doing a fetch first on the URL, which makes the feature a bit complex) ?
I found online an article to style broken images: https://bitsofco.de/styling-broken-images/ While I must admit I havent tried it, it seems that we could leverage that in some way to use the image, and style a broken link with the abreviation.
So instead of providing a JSX.Element, I would provide a url to the image profile, the abreviation and the backgroundColor, and depending of the fetch status of the browser, the image would be displayed, and if not found, the properly styled abreviation.
Not a priority, just wondering if this was already been looked at or some other solutions was better.
Thoughts ?
Beta Was this translation helpful? Give feedback.
All reactions