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

Add a warning message before overwriting assets in Files and Uploads #298

Open
ormsbee opened this issue Oct 15, 2023 · 4 comments
Open
Assignees

Comments

@ormsbee
Copy link

ormsbee commented Oct 15, 2023

There is currently no warning message when you are about to overwrite existing files on Studio's File and Uploads page.

Screenshot 2023-10-15 at 1 25 23 AM

Let's add a warning in a modal, in the same style as the delete confirmation (including the warning triangle):

Screenshot 2023-10-15 at 1 11 17 AM

Modal Text

Title: Overwrite Files

Text: The following files will be overwritten:

This should then be followed by an <ul> of files that would be overwritten, in alphabetical order by file name.

The buttons should be "Overwrite" and "Cancel".

Acceptance Criteria:

  • This new modal should only trigger when a user uploads one or more files that would overwrite existing files in File and Uploads.
  • Clicking on the "Overwrite" button will cause those files to get overwritten.
  • Clicking on the "Cancel" button or closing the modal will stop those files from being overwritten.

Edge case: If there are a mix of files where some of them would overwrite and some wouldn't, and the user hits "Cancel", the files that are not overwrites should still get uploaded. For example, say we have the following situation:

  • The files 1.webp and 2.webp exist in Files and Uploads.
  • The user uploads new files 1.webp, 2.webp, 3.webp, 4.webp.
  • The modal dialog triggers, and the user hits "Cancel"

In the above scenario, 3.webp and 4.webp should still get uploaded. The user is canceling the action of overwriting the existing files, but is not canceling the entire operation.

@ormsbee ormsbee self-assigned this Oct 15, 2023
@ormsbee ormsbee converted this from a draft issue Oct 15, 2023
@github-actions
Copy link

Thanks for your submission, @openedx/open-edx-project-managers will review shortly.

@tecoholic
Copy link

tecoholic commented Oct 16, 2023

@ormsbee This is being handled in openedx/edx-platform#33493 and openedx/studio-frontend#384, with a different UI (which I think can be adapted to match the vision here).

@ormsbee
Copy link
Author

ormsbee commented Oct 16, 2023

@tecoholic: I didn't realize this was already being implemented. If there have already been product/UX input into that ticket, please feel free to ignore this one.

@tecoholic
Copy link

tecoholic commented Oct 18, 2023

@ormsbee The UX you were suggesting was better suited than the one we had, which handled only 1 file. So we went with your suggestion. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ideation
Development

No branches or pull requests

2 participants