You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read the full diff and applied docs/review/general.md and docs/review/tests.md. There are no .scss or generated token changes, so the CSS, Figma and design-token rules don't apply. I didn't run tests, tsc or lint, since CI covers them. I found no blocking issues.
What the PR does:native is a new discriminated-union prop (UploadRequestProps | UploadNativeProps). When it's set, the component skips upload and delete requests, the upload button, and auto-upload. It keeps the valid files in the hidden <input type="file"> through DataTransfer, so a native form submit sends them.
Notes (non-blocking)
UploadProvider.tsx (the "keeps its input's files in step" useEffect): it has no dependency array, so it runs on every render. It compares file-key strings each time, which is cheap for small lists. Giving it deps (native, selectedFiles) would still be clearer.
UploadProvider.tsx (same effect, typeof DataTransfer === "undefined" fallback): the fallback only clears the input when the list is empty. If a file is removed from a multi-file selection, the input keeps the removed file and a native submit would still send it. This only matters in environments without DataTransfer (e.g. jsdom), but the behaviour differs from the real path, so tests that rely on it may pass for the wrong reason.
UploadInput.tsx and UploadDragger.tsx: with native, defaultValidations becomes undefined. Files that fail the client check (size or type) are excluded from the input, but nothing blocks the form submit, so the user can submit without the rejected file and get no form-level error. Please confirm this is intended. If it isn't, keep a validation for check-failed files in native mode.
UploadDragger.tsx: there is a stray blank line inside the props={{ ... }} object, between messages, and customValidation,.
The baseline types.ts files intersect UploadProps & UploadRequestProps, which pins them to the request variant. That looks deliberate for the token comparison, and ImageUpload doesn't offer native. A one-line comment in the baseline files would stop someone "fixing" it later.
Breaking-change check:uploadRequest and deleteRequest stay required unless native: true, so the public API remains backward compatible. Stories document native with a default of false, and tests were added for UploadInput, UploadList and UploadDragger.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Screenshots / Preview
Checklist
How to Test