-
-
reviewboard/datagrids/grids.py (Diff revision 1) Since this is just a mixin now, it should be named "UserPageDataGridMixin".
-
reviewboard/datagrids/grids.py (Diff revision 1) The suffix for this class is "Grid," but should be "DataGrid" to match the others.
-
-
-
reviewboard/datagrids/views.py (Diff revision 1) Some older views are inconsistent in this way, but docstrings must follow the following format:
"""One-line summary."""
or:
"""One-line summary. Multi-line description. """
Adding the reviews a user has made to their profile
Review Request #5484 — Created Feb. 16, 2014 and submitted
Information | |
---|---|
tamijo | |
Review Board | |
master | |
3e0b97a... | |
Reviewers | |
reviewboard, students | |
I have added the reviews a user has made to their profile page, which can be accessed at /users/<username>/reviews/
The columns shown include: * summary (of review request) * submitter of review request * date reviewed
Created unit tests to test that the reviews page works, and reviews on private review requests are not shown.
Description | From | Last Updated |
---|---|---|
Since this is just a mixin now, it should be named "UserPageDataGridMixin". |
|
|
The suffix for this class is "Grid," but should be "DataGrid" to match the others. |
|
|
Trailing whitespace. |
|
|
Too many blank lines. |
|
|
Some older views are inconsistent in this way, but docstrings must follow the following format: """One-line summary.""" or: """One-line summary. … |
|
|
Please wrap this to 80 columns. |
|
|
This should use _() for localization. |
|
|
Please wrap at 80 columns. |
|
|
This should use _() for localization. |
|
|
Docstrings should start with a single line for a summary, then (optionally) a blank line and paragraphs of description. Please … |
|
|
Your code here uses 2-space indentation instead of 4. |
|
|
I don't know how permanent this is, but it should probably be formatted more like this: datagrid.tabs = [ (UserPageReviewRequestDataGrid.tab_title(username), … |
|
|
Please wrap to 80 columns. |
|
|
Please put a space ofter the :. Here and throughout this file. |
|
|
Remove this line. |
|
|
Remove this line. |
|
|
Indent 2 spaces in LESS files. |
|
|
Indent 1 space in HTML. Also note that we add spaces between {% and the tag names for block tags … |
|
|
If this isn't necessary, can you remove it? |
|
|
If this isn't necessary, can you remove it? |
|
|
There's an extra space between 'review_summary' and , |
|
|
Please capitalize the "Do" |
|
|
Maybe mention that this is an abstract class? |
|
|
Wrap to 80 columns. |
|
|
This doesn't match between here and UserPageReviewRequestDataGrid (one has "user page", one has "user's page"). Can you also include a … |
|
|
Trailing whitespace. Can you also rewrap this to put one item per line? |
|
|
Indent 1 more space. |
|
|
Indent 1 more space. |
|
|
Indent 1 more space. |
|
|
Indent 1 more space. |
|
|
Indent 1 more space. |
|
|
Remove these two lines. |
|
|
Can you switch the order of these two URLs? |
|
|
Comments should have a space between # and the comment text, and start with a capital letter. |
|
|
Maybe put these all on the same line? |
|
|
Maybe put these all on the same line? Also, watch out for trailing whitespace. |
|
|
Comments should have a space between # and the comment text, and start with a capital letter. |
|
|
Indent 1 more space. |
|
|
Indent 1 more space. |
|
|
Indent 1 more space. |
|
|
Hmm. It looks like it's been quite some time since you pulled from the origin repository. We've made some changes … |
|
|
Indent 2 more spaces. |
|
|
Can you add a blank line here? |
|
|
"Group" hasn't been imported here. You should import it at the top of this method (like in ReviewRequestManager._query) |
|
|
These are pretty generic class names, and the !important makes me scared. Can you maybe make these a bit more … |
|
|
Missing trailing period. |
|
|
This can be one line, like the one above. |
|
|
This is all a copy/paste of the load_extra_data in ReviewRequestDataGrid. We should pull that out into a ShowClosedReviewRequestsMixin. |
|
|
Should remove the blank line. |
|
|
Wrong class. |
|
|
Space before % |
|
|
Should remove the blank line. |
|
|
Space before % |
|
|
The latter part of that regex is too verbose. We know it'll just be [a-z-] |
|
|
Should be on one line. |
|
|
No blank line. |
|
|
No need for this comment. |
|
|
Let's do review-requests instead. Also, is None |
|
|
This should be: datagrid_cls = UserPageReviewRequestDataGrid Then below, you can just do: datagrid = datagrid_cls(request, .....) |
|
|
The parameters are the same for both classes. Let's compute the class here, and initialize it after the conditionals. |
|
|
No need for this comment. |
|
|
Blank line between these. |
|
|
Missing period. |
|
|
There's a bunch of !important rules in here. We should remove all of them, and instead nest the rules better … |
|
|
Should just list the class, not the element. Same with all the ones below. |
|
|
The &. ones go above the child element/class rules. |
|
|
THis should go above the .datagrid-title rule above. |
|
|
Too many spaces before endif. |
|
|
Shouldn't have . If we're trying to add some spacing, that should be done with CSS. |
|
|
It's not valid to have a <ul> inside another <ul>. It needs to be in <li>. |
|
|
Indentation got a bit wacky here. |
|
|
Col: 17 E126 continuation line over-indented for hanging indent |
![]() |
|
Col: 5 E303 too many blank lines (2) |
![]() |
|
local variable 'review1' is assigned to but never used |
![]() |
|
local variable 'review2' is assigned to but never used |
![]() |
|
'SignalHook' imported but unused |
![]() |
|
'TemplateHook' imported but unused |
![]() |
|
'URLHook' imported but unused |
![]() |
|
Col: 21 E128 continuation line under-indented for visual indent |
![]() |
|
Col: 38 E127 continuation line over-indented for visual indent |
![]() |
|
Col: 38 E127 continuation line over-indented for visual indent |
![]() |
|
'SignalHook' imported but unused |
![]() |
|
'TemplateHook' imported but unused |
![]() |
|
'URLHook' imported but unused |
![]() |
|
Col: 21 E128 continuation line under-indented for visual indent |
![]() |
|
Needs a trailing period. |
|
|
For each of these, you should have a trailing comma after the value in the dictionary, and the }) should … |
|
|
These can probably just be constants on the class, right? |
|
|
I don't think this is needed. |
|
|
This code is pretty similar to what's in ReviewRequestManager. I don't expect you to worry about refactoring all this right … |
|
Change Summary:
fixed Django errors. All of the columns have not beed added, and the submitter columns show the review request summary instead of the actual submitter. The frontend also still needs to show the link to the reviews page on the profile.
Description: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||
Diff: |
Revision 2 (+138 -10) |
Change Summary:
fixed summary and submitter column
Description: |
|
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||||||||
Diff: |
Revision 3 (+161 -10) |
-
Reading through this code, it looks like most of the functionality is here. Can you specify in the description what is left to do, and if it's pretty close, remove the WIP tag?
Change Summary:
updated description to show what remains in progress.
Description: |
|
---|
Change Summary:
modified submitter view to take 'grid' parameter, and added tab bar to the profile page that shows links to the reviews and review requests page
Description: |
|
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||||||||
Diff: |
Revision 4 (+214 -18) |
Change Summary:
added show-closed dropdown for active datagrid
Description: |
|
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||||||||
Diff: |
Revision 5 (+276 -15) |
-
-
-
-
-
-
reviewboard/datagrids/views.py (Diff revision 5) Docstrings should start with a single line for a summary, then (optionally) a blank line and paragraphs of description. Please also wrap to 80 columns.
-
reviewboard/datagrids/views.py (Diff revision 5) Your code here uses 2-space indentation instead of 4.
-
reviewboard/datagrids/views.py (Diff revision 5) I don't know how permanent this is, but it should probably be formatted more like this:
datagrid.tabs = [ (UserPageReviewRequestDataGrid.tab_title(username), reverse('user', args=[username])), (UserPageReviewsDataGrid.tab_title(username), reverse('user', args=[username, 'reviews'])), ]
-
-
reviewboard/static/rb/css/common.less (Diff revision 5) Please put a space ofter the :. Here and throughout this file.
-
-
-
-
reviewboard/templates/datagrids/review_request_listview.html (Diff revision 5) Indent 1 space in HTML. Also note that we add spaces between
{%
and the tag names for block tags (separate from the HTML indentation). This file hasn't been updated to indent the tags correctly -- would you mind doing so while you're changing this? See reviewboard/templates/reviews/review_request_box.html for a good example.
Description: |
|
|||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||||||||||||||
Diff: |
Revision 6 (+293 -22) |
|||||||||||||||||||||||||||||||||
Added Files: |
Change Summary:
fixed formatting issues
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+290 -22) |
Change Summary:
moved show-closed tag to the topbar (out of dropdown)
Description: |
|
||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||
Diff: |
Revision 8 (+249 -19) |
||||||||||||||||||||||||||||||
Removed Files: |
|||||||||||||||||||||||||||||||
Added Files: |
Change Summary:
added tests
Description: |
|
|||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||||||||||||||||||||||||||
Commit: |
|
|||||||||||||||||||||||||||||||||
Diff: |
Revision 9 (+288 -20) |
-
This is looking pretty good! I have a bunch of style comments.
-
-
-
reviewboard/datagrids/grids.py (Diff revision 9) There's an extra space between
'review_summary'
and,
-
-
-
-
reviewboard/datagrids/grids.py (Diff revision 9) This doesn't match between here and UserPageReviewRequestDataGrid (one has "user page", one has "user's page"). Can you also include a mention of reviews vs. review requests in the docstring summary?
-
reviewboard/datagrids/tests.py (Diff revision 9) Trailing whitespace. Can you also rewrap this to put one item per line?
-
-
-
-
-
-
-
-
reviewboard/datagrids/views.py (Diff revision 9) Comments should have a space between # and the comment text, and start with a capital letter.
-
-
reviewboard/datagrids/views.py (Diff revision 9) Maybe put these all on the same line? Also, watch out for trailing whitespace.
-
reviewboard/datagrids/views.py (Diff revision 9) Comments should have a space between # and the comment text, and start with a capital letter.
-
-
-
Change Summary:
Moved the filtering of reviews into a manager, and fixed filtering for private requests.
Summary: |
|
||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||
Commit: |
|
||||||||||||||||||||||||||||||
Diff: |
Revision 10 (+344 -20) |
Change Summary:
fixed a bug in displaying user reviews (an issue with authentication)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 11 (+345 -20) |
-
-
reviewboard/reviews/managers.py (Diff revision 11) Hmm. It looks like it's been quite some time since you pulled from the origin repository. We've made some changes to the ReviewRequest version of this query to improve performance. Can you rebase on top of the latest master code, and add the
accessible_repo_ids
andaccessible_group_ids
mechanism thatReviewRequestManager._query
uses?
Change Summary:
updated code to incorporate changes from master repository
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 12 (+350 -20) |
-
Almost there!
-
-
-
reviewboard/reviews/managers.py (Diff revision 12) "Group" hasn't been imported here. You should import it at the top of this method (like in
ReviewRequestManager._query
) -
reviewboard/static/rb/css/common.less (Diff revision 12) These are pretty generic class names, and the !important makes me scared. Can you maybe make these a bit more specific, so that these rules won't bleed out into other parts of the UI?
Change Summary:
modified css rules to be more descriptive, and added missing import
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 13 (+350 -20) |
-
This looks good to me. Because it's a big change, Christian is also going to take a look before we push it. Nice work!
-
-
-
-
reviewboard/datagrids/grids.py (Diff revision 13) This is all a copy/paste of the load_extra_data in ReviewRequestDataGrid. We should pull that out into a
ShowClosedReviewRequestsMixin
. -
-
-
-
-
-
reviewboard/datagrids/urls.py (Diff revision 13) The latter part of that regex is too verbose. We know it'll just be
[a-z-]
-
-
-
-
-
reviewboard/datagrids/views.py (Diff revision 13) The parameters are the same for both classes. Let's compute the class here, and initialize it after the conditionals.
-
-
-
-
reviewboard/static/rb/css/common.less (Diff revision 13) There's a bunch of
!important
rules in here. We should remove all of them, and instead nest the rules better so that the browser will naturally choose them. -
reviewboard/static/rb/css/common.less (Diff revision 13) Should just list the class, not the element.
Same with all the ones below.
-
reviewboard/static/rb/css/common.less (Diff revision 13) The
&.
ones go above the child element/class rules. -
reviewboard/static/rb/css/common.less (Diff revision 13) THis should go above the
.datagrid-title
rule above. -
reviewboard/templates/datagrids/review_request_listview.html (Diff revision 13) Too many spaces before
endif
. -
reviewboard/templates/datagrids/review_request_listview.html (Diff revision 13) Shouldn't have
. If we're trying to add some spacing, that should be done with CSS. -
reviewboard/templates/datagrids/review_request_listview.html (Diff revision 13) It's not valid to have a
<ul>
inside another<ul>
. It needs to be in<li>
.
Change Summary:
resolved issues with css and formatting
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 14 (+357 -28) |
-
Looking good!
-
reviewboard/datagrids/views.py (Diff revisions 13 - 14) This should be:
datagrid_cls = UserPageReviewRequestDataGrid
Then below, you can just do:
datagrid = datagrid_cls(request, .....)
Change Summary:
fixed initiation of datagrid class; moved show_closed logic for datagrids into mixin. I'm not sure if this is done correctly..using super as other functions have done doesn't seem to work
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 15 (+375 -51) |
Change Summary:
changes to ShowClosedReviewRequestMixin to fix inheritance issue
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 16 (+375 -51) |
Change Summary:
fix indentation issue
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 17 (+373 -51) |

-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/views.py reviewboard/datagrids/columns.py reviewboard/datagrids/tests.py reviewboard/datagrids/urls.py reviewboard/extensions/hooks.py reviewboard/datagrids/grids.py reviewboard/reviews/managers.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/datagrids/review_request_listview.html
-
reviewboard/datagrids/grids.py (Diff revision 17) Col: 17 E126 continuation line over-indented for hanging indent
-
-
reviewboard/reviews/managers.py (Diff revision 17) Col: 21 E128 continuation line under-indented for visual indent

-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/datagrids/views.py reviewboard/datagrids/columns.py reviewboard/datagrids/tests.py reviewboard/datagrids/urls.py reviewboard/extensions/hooks.py reviewboard/datagrids/grids.py reviewboard/reviews/managers.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/datagrids/review_request_listview.html
-
reviewboard/datagrids/tests.py (Diff revision 17) local variable 'review1' is assigned to but never used
-
reviewboard/datagrids/tests.py (Diff revision 17) local variable 'review2' is assigned to but never used
-
-
-
Change Summary:
adressed review bot issues with formatting
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 18 (+372 -51) |

-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/views.py reviewboard/datagrids/columns.py reviewboard/datagrids/tests.py reviewboard/datagrids/urls.py reviewboard/extensions/hooks.py reviewboard/datagrids/grids.py reviewboard/reviews/managers.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/datagrids/review_request_listview.html
-
reviewboard/datagrids/tests.py (Diff revision 18) Col: 38 E127 continuation line over-indented for visual indent
-
reviewboard/datagrids/tests.py (Diff revision 18) Col: 38 E127 continuation line over-indented for visual indent
-
reviewboard/reviews/managers.py (Diff revision 18) Col: 21 E128 continuation line under-indented for visual indent

-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/datagrids/views.py reviewboard/datagrids/columns.py reviewboard/datagrids/tests.py reviewboard/datagrids/urls.py reviewboard/extensions/hooks.py reviewboard/datagrids/grids.py reviewboard/reviews/managers.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/datagrids/review_request_listview.html
-
-
-
Change Summary:
addresssed more review bot formatting issues
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 19 (+372 -51) |
-
A few small things. This is pretty great! Just a couple trivial style changes, and we'll be able to put this in for 2.1 :)
-
-
reviewboard/datagrids/grids.py (Diff revision 19) For each of these, you should have a trailing comma after the value in the dictionary, and the
})
should be aligned with the opening statement on its own line, like:self.queryset = self.queryset.filter(**{ ... });
-
reviewboard/datagrids/grids.py (Diff revision 19) These can probably just be constants on the class, right?
-
-
reviewboard/reviews/managers.py (Diff revision 19) This code is pretty similar to what's in ReviewRequestManager. I don't expect you to worry about refactoring all this right now, but we should probably do this at some point.
Can you put a TODO comment above all this code saying it should be consolidated with the queries in ReviewRequestManager?
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 20 (+371 -51) |
Change Summary:
rebased from master
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 21 (+411 -50) |
Change Summary:
minor fix: moved class variable from init
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 22 (+411 -50) |