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

Use toastr to support showing multiple toast messages at once, with a fancy UI #519

Merged
merged 10 commits into from Jun 10, 2021

Conversation

fedarko
Copy link
Collaborator

@fedarko fedarko commented May 27, 2021

This closes #286. It adds the toastr JS/CSS dependency, which is called from EMPress' existing util.toastMsg() function.

It is now possible for many toast messages to be active at once, which make the general "error message" UI much more pleasant: (note that in this GIF I'm clicking on the buttons causing each error a bunch of times, normally the user will just see at most 1-2 toast messages at a time)

toast

It's also possible to show different "types" of toast messages, e.g. distinguishing errors from successes from warnings. Below is what an Animation complete. message, which we classify as success, looks like:

Peek 2021-05-26 21-09

This GIF also shows that it's possible to dismiss a toast by clicking on it, which is a nice feature to have.

Lastly (and unrelated to the above stuff), this PR changes the Main CI title to be Main CI + McHelper. This makes it clearer that the cause for this CI failing (as is currently shown on the README) is McHelper, not the actual CI (all the actual tests/checks pass) -- not a big deal or anything, but this hopefully gives users some confidence that our tests aren't entirely broken ;)

@kwcantrell
Copy link
Collaborator

This is awesome @fedarko! Distinguishing "error" messages from "success" messages is a really nice touch.

Since this PR modifies the CI, do you think it would make sense to just put McHelper in a separate action? That way 'Main CI' will still pass if McHelper fails.

@fedarko
Copy link
Collaborator Author

fedarko commented May 28, 2021

Thanks @kwcantrell! I had a similar thought -- however, I didn't do this, since I thought it'd make sense to only upload stuff to McHelper when the Main CI passes (and we know that at least the tests are passing). This would avoid polluting McHelper with a bunch of broken QZVs.

...But thinking about it more, it doesn't have to be an all-or-nothing thing though -- it looks like it should be possible to configure GitHub actions to only run the separate McHelper action when the Main CI action (and maybe the standalone CI too?) passes. I think that might require a decent amount of messing around to get everything working right -- could we make that a separate issue for now?

@kwcantrell
Copy link
Collaborator

We can move this to a different issue. In the meantime, how about we just comment out McHelper?

@kwcantrell
Copy link
Collaborator

Thanks @fedarko!

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.

Support showing multiple toast messages at once
2 participants