Fix regressions caused by the recent editor changes.

Review Request #5230 — Created Jan. 9, 2014 and submitted

Information

Review Board
master

Reviewers

Fix regressions caused by the recent editor changes.

Some of my recent work made assumptions about elements that exist on a
page in ReviewRequestEditorView. While fixing this, I realized there's a
lot of work we're doing on those pages we don't need to do.

This change conditionalizes a lot of the logic to only work with fields
and other review request editable stuff if we're on a page with those
elements. We could get more fine-grained, but this is enough to simplify
review UIs a fair amount and to fix the breakages.

It also fixes loading images in a Markdown field. Since an image could
load after we render (unless it's in cache), it could end up messing
with the sizes. Now we call resizeLayout when any contained image loads.

There's also fixes to make unit tests pass. The structure of the
template better matches the real structure of the review request, at
least close enough for logic to work.

  • Tested editing review requests.
  • Tested the Markdown and image review UIs.
  • Tested loading a page with images in a Markdown field.
  • Tested adding images to a Markdown field.
  • Unit tests pass.
Description From Last Updated

Missing a closing quote on this line.

daviddavid
david
  1. 
      
  2. Missing a closing quote on this line.

    1. Doh. Jasmine didn't even mention this. Just looked like all tests passed. Wonder if we can do something about that.

  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...