nextcloud-libraries / nextcloud-upload

Nextcloud Upload helpers for Nextcloud apps https://npmjs.org/@nextcloud/upload
https://nextcloud-libraries.github.io/nextcloud-upload
GNU Affero General Public License v3.0
8 stars 3 forks source link

Uploader component design #816

Open nimishavijay opened 1 year ago

nimishavijay commented 1 year ago

As discussed in https://github.com/nextcloud/photos/pull/1785 the uploader component needs to work across all screen sizes. After discussing with @jancborchardt and @szaimen, here is what it could look like:

What do you think? @skjnldsv :)

jancborchardt commented 1 year ago

@nimishavijay FYI I did a small adjustment:

Tapping on this element would show an action menu with 2 entries, 1 line with the text info ("a few seconds remaining", etc), as well as the second option to "Cancel upload"

skjnldsv commented 1 year ago

Could we have mockups of what it would look like in the following state please? Not just inspiration, but real design references to use for the UI :)

  1. No upload ongoing with the add button visible ?
  2. Upload ongoing
  3. Something went wrong during the upload
  4. Upload finished
marcoambrosini commented 1 year ago

So here's a first draft. I think that the progress part of it should be implemented in the NcProgress component and imported from there into this wrapper as it would be nice to have the circular progress for other application too. The progress would wrapped in a NcButton component and all icons are 30px in diameter so that they can fit nicely in 44px tall rows, list items and so forth.

No upload ongoing with the add button visible ?

@skjnldsv what do you mean by this?

Screenshot 2023-07-27 at 17 31 23
skjnldsv commented 1 year ago

No upload ongoing with the add button visible ?

@skjnldsv what do you mean by this?

A mockup where no upload is in progress and we can see the add button

skjnldsv commented 1 year ago

@marcoambrosini thanks for the mockups! Can you maybe show them in action? Like with the UI around it? I find it harder to really grasp the expectations. ideally something looking like the initial mockups in photos :pray:

image

marcoambrosini commented 1 year ago

Ok, sorry I thought that what was needed was already established but I see now that it's a wider problem that needs solution. Our competitors use a small collapsible dialogs placed at the bottom of the screen and they work great. I'm going to work on something like that as opposed to this small indicator.

@skjnldsv I have a couple of questions: what kind of information about the upload do we have available in the front-end? For example, if I'm doing a batch upload, do I have the progress of every file in the batch? If not do we have at least a confirmation of each uploaded file? Thanks for the info :)

skjnldsv commented 1 year ago

You will know:

And for each upload in the queue you can request those same stats but for the file only.

marcoambrosini commented 1 year ago

So @skjnldsv as a first step we decided to have the component mentioned above next to the add button, both in photos and files. We will iterate and improve over time but for now we're going to keep it simple.

Screenshot 2023-08-02 at 20 02 37

Group 3

Both error and success state should last for 3 seconds and fade out.

skjnldsv commented 1 year ago

Please note that the second schreenshot doesn't use this component, so we can take the first one as refrerence only

jancborchardt commented 1 year ago

@skjnldsv which of the points here are still relevant after merging https://github.com/nextcloud/server/pull/39945 ? :)

skjnldsv commented 1 year ago

All of them, this was not scheduled for 28