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

feat: directory uploads #79

Merged
merged 3 commits into from
Jan 11, 2024
Merged

feat: directory uploads #79

merged 3 commits into from
Jan 11, 2024

Conversation

travis
Copy link
Member

@travis travis commented Jan 10, 2024

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.
Screenshot 2024-01-10 at 1 33 34 PM
Screenshot 2024-01-10 at 1 33 42 PM

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.
Copy link
Contributor

github-actions bot commented Jan 10, 2024

Website preview 🔗✨

build log

Copy link
Member

@alanshaw alanshaw left a 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 />
Copy link
Member

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 🙏 ?

Copy link
Member Author

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

@travis
Copy link
Member Author

travis commented Jan 11, 2024

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.

yea, totally agree - I'll take another crack at this UX when I get the CAR upload stuff in!

@travis travis merged commit 2ded489 into main Jan 11, 2024
5 checks passed
@travis travis deleted the feat/upload-directory branch January 11, 2024 21:09
@travis
Copy link
Member Author

travis commented Jan 11, 2024

the drop target should be able to support multi/single file OR directories right?

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

travis pushed a commit that referenced this pull request Jan 19, 2024
🤖 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants