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: file upload #1749

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

feat: file upload #1749

wants to merge 3 commits into from

Conversation

bitpshr
Copy link
Member

@bitpshr bitpshr commented May 7, 2021

Type: feature

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit tests are included in the PR
  • For new widgets, an entry has been added to the .dojorc
  • For new widgets, theme.variant() is added to the root domnode
  • Any widget variant uses theme.compose like this
  • 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

Screen Shot 2021-05-07 at 9 07 52 AM

Screen Shot 2021-05-07 at 9 07 34 AM

@vercel
Copy link

vercel bot commented May 7, 2021

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

codecov bot commented May 7, 2021

Codecov Report

Merging #1749 (2c345ba) into master (7c8e49e) will decrease coverage by 0.14%.
The diff coverage is 84.84%.

Impacted file tree graph

@@            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.

@msssk
Copy link
Contributor

msssk commented May 12, 2021

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.

@bitpshr
Copy link
Member Author

bitpshr commented May 18, 2021

@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.

@agubler
Copy link
Member

agubler commented Jun 1, 2021

@bitpshr there seems to be typescript errors

@agubler agubler removed their request for review May 22, 2023 08:10
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.

Uploader widget
3 participants