-
Notifications
You must be signed in to change notification settings - Fork 2.8k
V15: Improve the dropzone for Upload Field #18840
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Upload Field component to use a new dropzone input, aligning its behavior for file uploads, drag & drop, and upload cancellation. Key changes include replacing the old file upload preview logic with the new dropzone component, refactoring file and cancellation state management, and updating the dropzone manager to handle cancelled uploads appropriately.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-upload-field/input-upload-field.element.ts | Refactored to use the new dropzone component, including property and event handling updates, and removal of legacy temporary file logic. |
| src/Umbraco.Web.UI.Client/src/packages/media/dropzone/dropzone-manager.class.ts | Adjusted upload status handling by checking for cancelled uploads before success, and removed an unused helper method. |
Comments suppressed due to low confidence (2)
src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-upload-field/input-upload-field.element.ts:31
- [nitpick] Consider renaming '_file' to '_uploadedFile' to provide clearer context about its purpose within the component.
temporaryFileId: this._file?.temporaryFile.temporaryUnique,
src/Umbraco.Web.UI.Client/src/packages/media/dropzone/dropzone-manager.class.ts:130
- Verify that handling cancelled uploads here aligns with the intended upload flow, as this logic change may affect how cancelled uploads are processed.
if (uploaded.status === TemporaryFileStatus.CANCELLED) {
leekelleher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested out, all working as expected! 🚀
Description
The Upload Field now uses the new dropzone input
<umb-dropzone-input />to share the logic and user experience. The dropzone input features an uploader UI with manual and auto cancel of uploads, and users can follow the upload progress.Fixes AB#51190
How to test