Conversation
|
This pull request is being automatically deployed with Vercel (learn more). dojo.widgets – ./🔍 Inspect: https://vercel.com/dojo/dojowidgets/cpraac4yf widget-test-docs – ./🔍 Inspect: https://vercel.com/dojo/widget-test-docs/j4ljxjlc3 |
Codecov Report
@@ Coverage Diff @@
## master #1540 +/- ##
==========================================
- Coverage 90.15% 89.93% -0.23%
==========================================
Files 94 98 +4
Lines 4846 5016 +170
Branches 1297 1353 +56
==========================================
+ Hits 4369 4511 +142
- Misses 236 248 +12
- Partials 241 257 +16
Continue to review full report at Codecov.
|
|
I added comments to the issue re. the separation of the two widgets. I don't think this will need a child renderer at all as the file-list version of the file upload widget would be opinionated in it's appearance. The only child would likely be the |
234b08c to
9ffb246
Compare
* FileUploadInput: add file type validation for DnD * FileUploadInput: update unit tests * FileUploader: add formatted file size display * FileUploader: add CustomValidator example
6db05be to
19368f9
Compare
| } | ||
| } | ||
|
|
||
| function onClickButton() { |
There was a problem hiding this comment.
if we really need to do this then perhaps you should rename this function to clickNativeButton to make it clearer what it is doing.
|
|
||
| export interface FileUploaderProperties extends FileUploadInputProperties { | ||
| /** Custom validator used to validate each file */ | ||
| customValidator?: (file: File) => ValidationInfo | void; |
There was a problem hiding this comment.
I'm not sure about this pattern, other widgets set the valid property when they want to control the validation and use the the onValue function to trigger said validation.
| customValidator?: (file: File) => ValidationInfo | void; | ||
|
|
||
| /** The files to render in the widget (controlled scenario) */ | ||
| files?: FileWithValidation[]; |
There was a problem hiding this comment.
Seems odd that the validation is being mixed into the files for all of these callbacks. Would have expected onValue etc and files to only take / pass File[] params.
Type: feature
The following has been addressed in the PR:
.dojorctheme.variant()is added to the root domnodetheme.composelike thisDescription: add
FileUploaderwidgetResolves #1129