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

V15: Add progress UI to the Upload Field property editor #18188

Merged
merged 11 commits into from
Feb 3, 2025

Conversation

iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented Jan 31, 2025

Description

Adds uploader UI for the Upload Field property editor UI used in the details view of the Media Library.

Changes

  • Adds UI to show upload progress and errors
  • Adds extra option to xhr requests for a so-called AbortSignal, which is facilitated through an AbortController allowing the request to be canceled
  • Optimises the Upload Field so it does not need a FileReader anymore, which avoids loading the file into memory

Success

2025-01-31.at.11.26.26.-.Coral.Heron.mp4

Error

2025-01-31.at.11.27.31.-.Maroon.Jaguar.mp4

Canceled

2025-01-31.at.11.57.20.-.Scarlet.Python.mp4

@bjarnef
Copy link
Contributor

bjarnef commented Feb 3, 2025

@iOvergaard instead of having the "remove" action until file is uploaded, would it be better having a "cancel" action while upload is in progress?

That way it would still show "card" even though the operation is cancelled.

@leekelleher leekelleher enabled auto-merge (squash) February 3, 2025 15:09
Copy link
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out, works great! 🚀

Following @bjarnef's suggestion I changed the button to "Cancel" during the upload progress.

@leekelleher leekelleher merged commit 1f4b3e2 into v15/dev Feb 3, 2025
29 checks passed
@leekelleher leekelleher deleted the v15/feature/upload-field-progress-performance branch February 3, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants