Introduce a ReviewablePage model and move data, managers, and logic to it.
Review Request #9161 — Created Aug. 30, 2017 and submitted — Latest diff uploaded
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.