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

[lexical-playground][image-node] Bug Fix: Load image error UI #6111

Merged
merged 1 commit into from
May 20, 2024

Conversation

MaxPlav
Copy link
Contributor

@MaxPlav MaxPlav commented May 15, 2024

Currently, if an image fails to load because of a network error, the page is down, etc. the Node is silently inserted but no UI is shown.

Description

Adding a fallback image that would substitute an original image if it fails to load due to a network failure etc.

Closes: #5564

Test plan

#5564 (comment)

  1. Open https://playground.lexical.dev/ in a browser
  2. Insert an image and block the image load request via the dev tools.
  3. Try to insert the image once again.
  4. See that a fallback image is loaded instead.

Before

image-before.mov

After

image_after.mov

Insert relevant screenshots/recordings/automated-tests

Copy link

vercel bot commented May 15, 2024

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

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2024 9:16pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2024 9:16pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 15, 2024
@MaxPlav MaxPlav marked this pull request as ready for review May 15, 2024 20:51
@StyleT StyleT added the contribution-week Issues that are good to be picked up for the contribution week label May 15, 2024
Copy link
Contributor

@StyleT StyleT left a comment

Choose a reason for hiding this comment

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

LGTM overall!

Copy link
Contributor

Choose a reason for hiding this comment

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

May I suggest using SVG instead of PNG? You can take this one (MIT license) for example: https://www.svgrepo.com/svg/377374/image-broken

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, replaced the fallback image with that
Screenshot 2024-05-15 at 16 14 43

@StyleT StyleT added the extended-tests Run extended e2e tests on a PR label May 15, 2024
@StyleT StyleT added this pull request to the merge queue May 20, 2024
Merged via the queue into facebook:main with commit 6795e91 May 20, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. contribution-week Issues that are good to be picked up for the contribution week extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants