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

Show image loading errors to the user #8

Merged
merged 5 commits into from
Aug 29, 2023

Conversation

emilk
Copy link
Contributor

@emilk emilk commented Aug 28, 2023

Hi, and thanks for your work on egui_commonmark!

In this PR I've added support for showing image loading errors to the user:

image

To implement this I added a dependency on the poll-promise crate. An added benefit is that we can also show a loading spinner while an image is being downloaded:

image

I also changed the Mutex to the one from parking_lot. egui already depends on parking_lot, so it is no added dependency, and it is much more ergonomic (no need for .unwrap() everywhere).

I split the code in a few files - hope that's ok.

Copy link
Owner

@lampsitter lampsitter left a comment

Choose a reason for hiding this comment

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

Awesome! It looks great.
I'm on board with the added dependencies.

The only thing that is a little bit annoying is that poll-promise always pulls in the document-features crate, but it's not a show stopper.

I will approve after the typo fix 😃

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@emilk emilk requested a review from lampsitter August 28, 2023 21:04
@lampsitter lampsitter merged commit af015df into lampsitter:master Aug 29, 2023
1 check passed
@lampsitter
Copy link
Owner

Thanks!

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