widgets
widgets copied to clipboard
feat: file upload
Type: feature
The following has been addressed in the PR:
- [x] There is a related issue
- [x] All code matches the style guide
- [x] Unit tests are included in the PR
- [x] For new widgets, an entry has been added to the
.dojorc
- [x] For new widgets,
theme.variant()
is added to the root domnode - [x] Any widget variant uses
theme.compose
like this - [x] WidgetProperties are exported
Description:
This pull request introduces two new widgets to help support file uploads, FileUploadInput
for simple uploads, and FileUploader
for more complex upload management.
Resolves #1129 Replaces #1540
Preview


This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.
dojo.widgets – ./
🔍 Inspect: https://vercel.com/dojo/dojo.widgets/Db2mP9AuBtAmjncLajjSAdngV2cV
✅ Preview: Failed
[Deployment for 2c345ba failed]
widget-test-docs – ./
🔍 Inspect: https://vercel.com/dojo/widget-test-docs/Bivv4DTqhp2NbFkPFZwDUXgusUhF
✅ Preview: Failed
[Deployment for 2c345ba failed]
Codecov Report
Merging #1749 (2c345ba) into master (7c8e49e) will decrease coverage by
0.14%
. The diff coverage is84.84%
.
@@ Coverage Diff @@
## master #1749 +/- ##
==========================================
- Coverage 90.46% 90.32% -0.15%
==========================================
Files 94 98 +4
Lines 5152 5284 +132
Branches 1406 1445 +39
==========================================
+ Hits 4661 4773 +112
- Misses 241 250 +9
- Partials 250 261 +11
Impacted Files | Coverage Δ | |
---|---|---|
src/file-upload-input/index.tsx | 80.00% <80.00%> (ø) |
|
src/file-uploader/index.tsx | 86.36% <86.36%> (ø) |
|
src/file-upload-input/nls/FileUploadInput.ts | 100.00% <100.00%> (ø) |
|
src/file-uploader/nls/FileUploader.ts | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 7c8e49e...2c345ba. Read the comment docs.
Why was DnD dropped? That seems like a key feature of a file upload widget.
I don't see that .dojorc
was updated - if this is no longer necessary we should remove it from our PR template.
@msssk I chose to remove drag-and-drop for this first version of the file upload components since it adds a lot of complexity. I agree that it's a nice to have feature (though getting less common in practice) but I don't think it's required to accomplish the end goal of uploading files and managing them.
@bitpshr there seems to be typescript errors