seqeralabs / nf-tower

Nextflow Tower system
https://tower.nf
Mozilla Public License 2.0
146 stars 52 forks source link

Implement a better error feedback mechanism #30

Open pditommaso opened 5 years ago

pditommaso commented 5 years ago

Backend error should be visualised with error/warning box appearing just below the nav bar instead of a popup.

It should last more (configurable via an application setting) and there should be a cross icon (top-left corner) to close it.

Screenshot 2019-05-29 at 11 12 59
tcrespog commented 5 years ago

Hi Paolo. I find Bootstrap toasts a good fit for this. Are you ok with them?

pditommaso commented 5 years ago

What about using an alert with a dismissing icon?

tcrespog commented 5 years ago

I'll check if it's possible to show an alert as a toast. I'll try to do that in order to leverage the builtin mechanism to hide the toast automatically after a configurable delay. If not, I'll implement a custom mechanism to show alerts in a toast-like manner.

pditommaso commented 5 years ago

What's special with a toast? Let's jump on gitter if you want.

tcrespog commented 5 years ago

The Bootstrap toasts have options to specify the fading behavior. Don't worry I sense an alert can be integrated with a toast without many problems.

pditommaso commented 5 years ago

My point is that I would like to avoid the popup or dialog effect. For this reason, I was suggesting the alert.

tcrespog commented 5 years ago

Yes, I know. I was thinking as you. In this case the toast would be like an invisible carrier for the alert.

pditommaso commented 5 years ago

OK

tcrespog commented 5 years ago

Done.

pditommaso commented 5 years ago

Has this change merged? I still see errors appear into a small red popup as the one in the top comment.

tcrespog commented 5 years ago

I haven't made any progress regarding the last change you proposed about this Paolo (the one with the error appearing in full width). My "Done" comment on 6 Jun was in fact the implementation of the current popup version.

pditommaso commented 5 years ago

OK, the idea here is to show a red rectangle on top of the page instead of a small toast/popup. The error should be visualised until the user navigate away, make another action (maybe using http interceptor?) or click a dismiss icon.

The bootstrap alert could serve as inspiration.

tcrespog commented 5 years ago

Some questions:

pditommaso commented 5 years ago

was thinking at this, would not be possible to define error areas (basically a two divs), one when showing the main page. If does not exists fallback in a top one for the landing?

tcrespog commented 5 years ago

Do you mean having the current mechanism when the landing page is being shown and the new one otherwise?

pditommaso commented 5 years ago

I'm imagining a red box on top of the page (as a navbar) in case of the landing, and just below the navbar once logged.

tcrespog commented 5 years ago

Something like this? Screenshot 2019-09-12 at 14 59 24 And this? Screenshot 2019-09-12 at 15 00 25

pditommaso commented 5 years ago

Yes! text centred, thansk!

tcrespog commented 5 years ago

Ok, but fixed? Scrolls along with the content (like the navbar)?

pditommaso commented 5 years ago

umm, yes let's fixed as the navbar .. otherwise it could popup while the page is scrolled down and the user won't see it.

tcrespog commented 5 years ago

Done in branch notification_refactor.

tcrespog commented 5 years ago

By the way, success messages (like the one showed when the user profile is saved) are also shown this way for consistency, but in this case they fade away after a specified time. You can do this per error basis in case you want to fade a specific error message but no others. Have a look at the code and let me know if you have any questions.

pditommaso commented 5 years ago

Makes sense. I'll check it out.