Create RB.Admin.PageView and update existing admin views to extend it
Review Request #10978 — Created March 27, 2020 and submitted
This review request creates
RB.Admin.PageView
, a new base page view that is
specific to admin views. Existing views inreviewboard/static/rb/js/admin/views
that don't extend from a specific view are updated to extendRB.Admin.PageView
.
They also call the parent view'sinitialize
andrenderPage
as needed. This
change will help with the implementation of the admin setup banner, which needs
to be displayed on all admin pages.
Existing unit tests all pass and a manual inspection of admin pages shows that
pages still render correctly.
Description | From | Last Updated |
---|---|---|
Similar to David's comment, this isn't a page view, so it shouldn't inherit from RB.Admin.PageView. You can completely revert this … |
chipx86 | |
I don't think this change is correct. There should be only one PageView object for the entire page, but this … |
david | |
There's an extra line here. |
david | |
Unlike render(), renderPage() doesn't return anything. So the function would be empty, just like RB.PageView's. As such, it's probably best … |
chipx86 | |
This is still incorrectly inheriting from PageView. We should revert all the changes in this file. |
david |
-
-
Similar to David's comment, this isn't a page view, so it shouldn't inherit from
RB.Admin.PageView
. You can completely revert this file. -
Unlike
render()
,renderPage()
doesn't return anything. So the function would be empty, just likeRB.PageView
's.As such, it's probably best we just leave this out entirely in this change. There's no value to having
renderPage()
be here, since a parent class callingRB.Admin.PageView.protoype.renderPage()
will end up calling the baseRB.PageView.prototype.renderPage()
.This function can be defined and implemented when a future change needs to do so.
So really, the code for this view should probably just be:
RB.Admin.PageView = RB.PageView.extend({ });
- Change Summary:
-
Fix issues from review
- Commit:
-
4f443b603081919d0910179d57818df4a42ba04f41a114f6052946ebc248c43cce58d51fed2fba0b
- Diff:
-
Revision 2 (+29 -11)
Checks run (2 succeeded)
- Change Summary:
-
Revert inlineFormGroupView
- Commit:
-
41a114f6052946ebc248c43cce58d51fed2fba0b4a1431f7f9725e102e43e71fd51e083444c90d47
- Diff:
-
Revision 3 (+22 -8)