• 
      

    Port $.inlineEditor to Backbone.

    Review Request #9223 — Created Sept. 26, 2017 and submitted — Latest diff uploaded

    Information

    Review Board
    release-3.0.x
    836c452...

    Reviewers

    The inline editor view is some of the first JavaScript code we wrote, and boy
    does it show. It was built as a jQuery-UI component, and has grown over the
    years to have a huge number of options. Unfortunately, the only extensibility
    it provided was the ability to render a custom element when in multiline mode.
    This was enough to let us add in the rich-text CodeMirror editor, but going
    further was out of the question.

    This change adds a new Backbone view called InlineEditorView which does
    everything that $.inlineEditor can do and more. It provides all the options
    that the jQuery-UI implementation does, but can also be subclassed to implement
    even more complex behavior or replace the text editors with other input types
    (including things as fancy as Selectize).

    This updates most (but not quite all) uses of $.inlineEditor to the new view.
    Ports for the last uses will be coming in a later change.

    • Ran js-tests.
    • Manually tested all of the builtin review request fields that used inline
      editors.
    • Tested multiline fields with both Markdown and plain text input and switching
      between the two.
    • Tested dirty state calculations and attempting to leave the page with dirty,
      unsaved editors.