biocore / empress

A fast and scalable phylogenetic tree viewer for microbiome data analysis
BSD 3-Clause "New" or "Revised" License
48 stars 31 forks source link

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

Closed fedarko closed 3 years ago

fedarko commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

kwcantrell commented 3 years ago

Thanks @fedarko!