Skip to content

Open the image upload menu and upload the image from there after it was dropped to the content area of the markdown editor #2177

@MisRob

Description

@MisRob

Summary

We allow users to drop an image directly to the content area of the markdown editor without a need to use the image upload menu. However, we don't have anything implemented to communicate errors and progress for drag&drop. I added some simple console logging in this PR before we solve it.

Options:
1. Disable dropping images and use the menu only
2. Leave it enabled, show progress and errors somewhere in the content area of the editor - more complex task, designs needed
3. Leave it enabled and on image drop and simply open the menu and continue from there - I quite like this one, seems to be consistent and no new designs would be needed because we already have loading/error UX implemented in the menu.

@jtamiace @jayoshih Any thougths?

Related issue #2178

Let's make the image upload menu responsible for the upload of a dropped image. After an image is dropped to the content area of the editor, immediately open the image upload menu and handle the process in exactly the same way as when an image is uploaded using the image upload menu.

This will also solve a problem with errors or progress not being communicated to users when using drag&drop because this logic is already implemented in the images menu. Therefore, let's revert logging in these temporary watchers after it's done: https://github.com/learningequality/studio/blob/develop/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/MarkdownEditor.vue#L162 and https://github.com/learningequality/studio/blob/develop/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/MarkdownEditor.vue#L166.

Might make sense to implement together with #2178 (contains designs for rendering warnings when more images than one has been dropped).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions