-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: directory uploads #79
Conversation
Use the new w3ui Uploader's directory upload support to allow users to upload directories. Also allow them to wrap a single file in a directory. I've moved this to a radio group because we are going to add the ability to upload a CAR file, which will be a third option and will use a different upload function.
Website preview 🔗✨ |
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 think we should definitely merge this to get it in but I think it might need an iteration to get the UX a bit nicer - the drop target should be able to support multi/single file OR directories right? There's no need for it to be specific like the "click to browse". Maybe a separate browse control under the drop target where we have the file/directory toggle? We can still have a click to browse on the drop target but it would just be a proxy for the control below.
</RadioGroup> | ||
{uploadType === UploadType.File && ( | ||
<label className='flex flex-row items-center mb-1'> | ||
<WrapInDirectoryCheckbox /> |
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.
Can it default to true
🙏 ?
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.
yep! tho because of how state management works here it'll be a setting on the Uploader
- will add this in before merge
yea, totally agree - I'll take another crack at this UX when I get the CAR upload stuff in! |
Interesting - testing this I discovered that this isn't correct - the HTML Input-baseed drop target seems to only accept files in file mode and directories in directory mode. I think we can move to the model you sugge˘st (which seems more intuitive to me) by using the HTML Drag and Drop interface rather than the HTML Input's builtin drag and drop support: https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop I can file an issue for this - imho it's not really worth tackling urgently but I do think it's generally a better UX! ed: filed: #81 |
🤖 I have created a release *beep* *boop* --- ## [1.4.0](w3console-v1.3.2...w3console-v1.4.0) (2024-01-19) ### Features * add a link to the customer self-service billing portal ([#84](#84)) ([74be0d7](74be0d7)) * directory uploads ([#79](#79)) ([2ded489](2ded489)) * support CAR uploads ([#82](#82)) ([ffa1487](ffa1487)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Use the new w3ui Uploader's directory upload support to allow users to upload directories. Also allow them to wrap a single file in a directory.
I've moved this to a radio group because we are going to add the ability to upload a CAR file, which will be a third option and will use a different upload function.