openedx / frontend-app-authoring

Front-end for the Open edX Studio experience, implemented in React and Paragon.
GNU Affero General Public License v3.0
13 stars 76 forks source link

Support arbitrary asset upload/deletion for Library Components #1400

Open ormsbee opened 2 weeks ago

ormsbee commented 2 weeks ago

https://github.com/openedx/frontend-app-authoring/issues/1398 specifies the ability to add images to an HTML or Problem component via the TinyMCE editor.

But for both debugging and for power user purposes, we're going to want to be able to do direct file upload via the Details tab in the sidebar. This will also allow ProblemBlocks to use static assets when using the advanced editor (which currently has no menu for asset upload). It will also allow for other kinds of assets to be uploaded and linked, like PDFs.

This can go directly under the part of the UI where we already display assets:

image-side-panel

Quoting @bradenmacdonald:

adding a basic "drop file here to upload" to the power user assets section is probably very little work. You can just add a link that displays a ModalDropzone and then call this existing REST API to save the upload.

ormsbee commented 1 week ago

Ideally, we could also get delete buttons of some sort for the existing assets.

bradenmacdonald commented 1 week ago

@jmakowski1123 @sdaitzman @marcotuts This is ready for acceptance testing on the sandbox. I included a delete button.

(n.b. PR hasn't merged yet)