• 
      

    DnD inline images frontend.

    Review Request #8147 — Created May 6, 2016 and submitted — Latest diff uploaded

    Information

    Review Board
    release-3.0.x
    4db0143...

    Reviewers

    This change implements the frontend for letting users drag-and-drop images into
    their markdown editors. This will upload the image as a user file attachment
    and insert the relevant markdown syntax into the editor.

    This is based on work by David Kus at https://reviews.reviewboard.org/r/6510/
    Compared to that change, I've reworked the UI a bit to avoid the overlapping
    drop targets (the review request file attachments drop target is now isolated
    to the "Files" section, which appears momentarily if it wasn't already
    visible). I've also done a bunch of refactoring of the code to modernize and
    clean it up.

    At the moment, this adds overlays over the entire text field, and will insert
    the markdown text as a new line wherever the cursor is. I'd like to improve
    this in the future to make it more obvious where the new entry will end up
    (basically moving the cursor during the dragover with inline feedback) but
    that's a larger change.

    • Dragged images into a variety of text fields.
    • Dragged files to create new file attachments.
    • Ran unit tests.
    • Ran js-tests.