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

Upload Component ( Enhancement ) #1049

Open
sandruparo opened this issue Oct 6, 2021 · 12 comments
Open

Upload Component ( Enhancement ) #1049

sandruparo opened this issue Oct 6, 2021 · 12 comments
Labels
feature Feature request ui Related to UI

Comments

@sandruparo
Copy link

image

@sandruparo sandruparo added the feature Feature request label Oct 6, 2021
@sandruparo
Copy link
Author

@mturoci

We have revamped the upload component also in the wave style guide. We need to enhance this component and include this in the sdk . Thanks Martin.

cc - @shihan007 @shanaka-rajitha @dulajra @VijithaEkanayake

@mturoci mturoci added the ui Related to UI label Oct 7, 2021
@mturoci
Copy link
Collaborator

mturoci commented Oct 7, 2021

@sandruparo the proposed design is missing a few parts, please include:

  • Errors display - e.g. max file size exceeded, unsupported file type etc.
  • State for single file upload only.
  • Display what file extensions / sizes are supported if present.

What's the purpose of the X button?
image

@shihan007
Copy link

@mturoci I'll update those states. X is a close icon use to remove file if user want.

@shihan007
Copy link

shihan007 commented Oct 11, 2021

@mturoci
Copy link
Collaborator

mturoci commented Oct 11, 2021

Thanks @shihan007, what about the rest of the points?

State for single file upload only.
Display what file extensions / sizes are supported if present.

@shihan007
Copy link

shihan007 commented Oct 11, 2021

@mturoci

  • Display what file extensions / sizes are supported if present.

I have added a text below browse button

  • State for single file upload only.

You mean user cannot upload multiple files?

@mturoci
Copy link
Collaborator

mturoci commented Oct 11, 2021

I have added a text below browse button

I thought this is supposed to be a label, e.g. Upload test dataset etc. So do you recommend that label in a real-world scenario is something like:
Upload test dataset (.csv) files with max file size xy per file or xy max file size in total?

You mean user cannot upload multiple files?

Yes

@shihan007
Copy link

shihan007 commented Oct 11, 2021

I thought this is supposed to be a label, e.g. Upload test dataset etc. So do you recommend that label in a real-world scenario is something like:
Upload test dataset (.csv) files with max file size xy per file or xy max file size in total?

yeah

  • State for single file upload only.

We can add " select one file at a time" text to above text. And if user still chooses multiple file to upload lets display an error msg as shown " Error uploading multiple files, please select one file".

@mturoci
Copy link
Collaborator

mturoci commented Oct 11, 2021

Overall UX is odd. Ideally we should prevent user from experiencing what he can or cannot do himself. It's better to restrict actions so that it's impossible to do the wrong thing. If such restrictions are not possible though, at least inform the user in advance.

Having all the info in a single simple label feels too much to me + this assumes app devs will handle that themselves which I doubt. Let's try a different approach - try to think about placing these restrictions somewhere, separate from the label, so that they are visible and don't require dev interaction at all - they will be auto-populated based on chosen attributes.

We can add " select one file at a time" text to above text. And if user still chooses multiple file to upload lets display an error msg as shown " Error uploading multiple files, please select one file".

As mentioned above, it's best to restrict invalid action completely so that user doesn't need to learn "the hard way". What about hiding whole drag&drop box after a single file was uploaded?

Another issue is that displaying uploaded files like this can cause layout shifts or even scrollbars which is usually unwanted.

@shihan007
Copy link

@mturoci yeah agree with you. As you suggesting we can display text on top of the component, But still user allowed to do so. Hiding drag and drop is a good idea but what if user want to re upload a file?

In normal user behaviour they tend to drag and drop or browse right way. They may not read the instructions at all. From our end it is good to restrict user from choosing other types if those are not allowed. And if user upload a file that exceed our mentioned file size we have to display an error we cannot expect user will follow instruction all the time by scanning file sizes.

My opining is it doesn't matter where we display our instructions.

@mturoci
Copy link
Collaborator

mturoci commented Oct 11, 2021

As you suggesting we can display text on top of the component, But still user allowed to do so.

Not sure what you mean.

Hiding drag and drop is a good idea but what if user want to re upload a file?

Either add a button that would "reset" whole component or maybe better first require to remove the previous file, if no uploaded file is present, display D&D

In normal user behaviour they tend to drag and drop or browse right way. They may not read the instructions at all. From our end it is good to restrict user from choosing other types if those are not allowed. And if user upload a file that exceed our mentioned file size we have to display an error we cannot expect user will follow instruction all the time by scanning file sizes.

It for sure will not be noticed in the label, but giving it some color and prominency (e.g. some color tag in top right corner with something like extensions: csv, pdf, max file size: 30mb etc.) could resolve it. wdyt?

@shihan007
Copy link

Either add a button that would "reset" whole component or maybe better first require to remove the previous file, if no uploaded file is present, display D&D

Yeah let's display this way if only support one upload. After upload successful. If an error occur we can go with the suggested one.
Screenshot 2021-10-11 at 20 17 49

For file types and max file type I prefer this way

Screenshot 2021-10-11 at 20 21 05

And if upload support multiple uploads we can use this one
Screenshot 2021-10-11 at 20 23 50

@mturoci mturoci removed their assignment Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request ui Related to UI
Projects
None yet
Development

No branches or pull requests

3 participants