-
Notifications
You must be signed in to change notification settings - Fork 146
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
USWDS: File Input Documentation #987
Conversation
|
||
<h4>When to use the file input</h4> | ||
<ul class="usa-content-list"> | ||
<li><strong>Documents are required.</strong> You should only ask users to upload files when it is critical to service delivery.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You use the word "upload" here but later mention that this component doesn't upload files. Maybe use the word, attach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - better to be precise. I've reworded this "provide"
<h4>When to consider something else</h4> | ||
<ul class="usa-content-list"> | ||
<li><strong>Documents are optional.</strong> Don’t ask users to provide documents if you do not require them.</li> | ||
<li><strong>Upload functionality.</strong> The USWDS file input does not currently upload files.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need some clarification. I think the point we're making is that it doesn't immediately upload when the user selects the file(s.) Or are we saying something different? Perhaps mention what it does do ("attaches files which will be uploaded upon form submission," or something like that.) Why might a developer need immediate upload functionality, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe another "when to consider something else" case is when the user might want to send very large files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed this to say that the file input only posts files when the form is submitted. The bold text says "upload in place"
I think regarding the file size, we can say something like "asking for large files" so that we respect data limits or spotty signals.
</ul> | ||
<h4>Usability guidance</h4> | ||
<ul class="usa-content-list"> | ||
<li><strong>Allow multiple file formats.</strong> Users won’t have the same software. Allow multiple types of files so user won’t need to download new software.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not clear on this one. I get that we don't want to be overly restrictive in what file formats can be attached. I just don't understand the point about users not needing to download new software.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wrestling with how to word this. You want to be flexible in what formats to allow. Like, don't require that files be .docx
. Some people might use pages, which by default gives a .pages
extension
@thisisdano This is ready for review. I have a couple of overarching questions about what to put into the guidance as well.
|
Description
Adds documentation for file input
Additional information
Include any of the following (as necessary):
Before you hit Submit, make sure you’ve done whichever of these applies to you:
npm test
and make sure the tests for the files you have changed have passed.