cockpit-project / cockpit-files

A Featureful File Browser for Cockpit (Modernized and tested version of https://github.com/45Drives/cockpit-navigator)
GNU Lesser General Public License v2.1
49 stars 26 forks source link

Upload status, inline error (and success) #453

Open garrett opened 5 months ago

garrett commented 5 months ago

After yesterday's discussion related to #384, I explored the idea about showing errors in the popover itself.

The advantage is that it would make errors more obvious, especially if you have a long-running process and walk away from your computer. Showing error alerts can either stack up over each other and be annoying in that way, are visible all at once (when there are more than one) and need to be manually dismissed, or they time out and you miss them.

But then I realized that we might want to clear the errors, especially if there were several happening at the same time and, for example, the network connection drops. Clicking on clear finished uploads would clear the completed (either with success or error states) and would even close the modal if there are none left.

This also implies that we'd keep the finished states to see that they're done instead of just disappearing. And then you could then perhaps click on them and it'd select the file in the browsing area.

So here's the mockup:

popover

And here's a series of mockups showing the process starting with what we have currently and adding the ideas one by one until getting the above mockup:

image

While this is probably the right approach, "just" having the error inline implies a lot of things, as you can see. (That is, put in another way: Error states imply success states, and the possibility of having more than one implies clearing, which implies also closing if there are no pending ones too.)

Since we have so many other features to work on, this would probably be lower priority.

garrett commented 5 months ago

This also implies we'd need to show an error state on the upload spinner area. It's straightforward if there isn't an ongoing upload, but when there's an upload and an error, it gets weird. And it also means we might want to have a circle green check (kinda like ✅, but a circle) when everything's done? But if you're just uploading one file, that might get odd as you'd have to manage stuff that has happened.

I haven't mocked up this part; I figure I already mocked up enough to show that we're probably not tackling this for now. :wink: