Introduce a ReviewablePage model and move data, managers, and logic to it.

Review Request #9161 — Created Aug. 30, 2017 and submitted

Information

Review Board
release-3.0.x
78f2785...

Reviewers

RB.ReviewablePageView has been working with a model, taking in all
attribute data as view options and handling logic internally. This means
we can't do things like listen for attribute changes, and some future
work for dynamic updates is not very clean when contained solely in the
view.

This change introduces the RB.ReviewablePage and
RB.ReviewRequestPage models. RB.ReviewablePage is now responsible
for storing and transforming all the data formerly passed in as view
options (such as the editor state and review request data), and sets up
the related objects needed by other models and views.

In upcoming changes, the models will take on more responsibilities
needed for dynamic updating of pages.

Unit tests pass.

Tested all actions on the review request, diff viewer, and review UI pages.

Tested editing review request fields and publishing changes.

Tested viewing diffs, changing pages, and changing revisions.

Tested commenting on diffs and images.

Tested adding general comments.

Tested the Ship It button.

Tested opening and publishing the review dialog.

Description From Last Updated

Col: 21 ['commentsHint'] is better written in dot notation.

reviewbotreviewbot

Col: 21 ['files'] is better written in dot notation.

reviewbotreviewbot

Col: 21 ['pagination'] is better written in dot notation.

reviewbotreviewbot

Col: 21 ['revision'] is better written in dot notation.

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 passed.
JSHint failed.

JSHint

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (47df4a9)