Adding the reviews a user has made to their profile
Review Request #5484 — Created Feb. 16, 2014 and submitted
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". |
chipx86 | |
The suffix for this class is "Grid," but should be "DataGrid" to match the others. |
chipx86 | |
Trailing whitespace. |
chipx86 | |
Too many blank lines. |
chipx86 | |
Some older views are inconsistent in this way, but docstrings must follow the following format: """One-line summary.""" or: """One-line summary. … |
chipx86 | |
Please wrap this to 80 columns. |
david | |
This should use _() for localization. |
david | |
Please wrap at 80 columns. |
david | |
This should use _() for localization. |
david | |
Docstrings should start with a single line for a summary, then (optionally) a blank line and paragraphs of description. Please … |
david | |
Your code here uses 2-space indentation instead of 4. |
david | |
I don't know how permanent this is, but it should probably be formatted more like this: datagrid.tabs = [ (UserPageReviewRequestDataGrid.tab_title(username), … |
david | |
Please wrap to 80 columns. |
david | |
Please put a space ofter the :. Here and throughout this file. |
david | |
Remove this line. |
david | |
Remove this line. |
david | |
Indent 2 spaces in LESS files. |
david | |
Indent 1 space in HTML. Also note that we add spaces between {% and the tag names for block tags … |
david | |
If this isn't necessary, can you remove it? |
david | |
If this isn't necessary, can you remove it? |
david | |
There's an extra space between 'review_summary' and , |
david | |
Please capitalize the "Do" |
david | |
Maybe mention that this is an abstract class? |
david | |
Wrap to 80 columns. |
david | |
This doesn't match between here and UserPageReviewRequestDataGrid (one has "user page", one has "user's page"). Can you also include a … |
david | |
Trailing whitespace. Can you also rewrap this to put one item per line? |
david | |
Indent 1 more space. |
david | |
Indent 1 more space. |
david | |
Indent 1 more space. |
david | |
Indent 1 more space. |
david | |
Indent 1 more space. |
david | |
Remove these two lines. |
david | |
Can you switch the order of these two URLs? |
david | |
Comments should have a space between # and the comment text, and start with a capital letter. |
david | |
Maybe put these all on the same line? |
david | |
Maybe put these all on the same line? Also, watch out for trailing whitespace. |
david | |
Comments should have a space between # and the comment text, and start with a capital letter. |
david | |
Indent 1 more space. |
david | |
Indent 1 more space. |
david | |
Indent 1 more space. |
david | |
Hmm. It looks like it's been quite some time since you pulled from the origin repository. We've made some changes … |
david | |
Indent 2 more spaces. |
david | |
Can you add a blank line here? |
david | |
"Group" hasn't been imported here. You should import it at the top of this method (like in ReviewRequestManager._query) |
david | |
These are pretty generic class names, and the !important makes me scared. Can you maybe make these a bit more … |
david | |
Missing trailing period. |
chipx86 | |
This can be one line, like the one above. |
chipx86 | |
This is all a copy/paste of the load_extra_data in ReviewRequestDataGrid. We should pull that out into a ShowClosedReviewRequestsMixin. |
chipx86 | |
Should remove the blank line. |
chipx86 | |
Wrong class. |
chipx86 | |
Space before % |
chipx86 | |
Should remove the blank line. |
chipx86 | |
Space before % |
chipx86 | |
The latter part of that regex is too verbose. We know it'll just be [a-z-] |
chipx86 | |
Should be on one line. |
chipx86 | |
No blank line. |
chipx86 | |
No need for this comment. |
chipx86 | |
Let's do review-requests instead. Also, is None |
chipx86 | |
This should be: datagrid_cls = UserPageReviewRequestDataGrid Then below, you can just do: datagrid = datagrid_cls(request, .....) |
chipx86 | |
The parameters are the same for both classes. Let's compute the class here, and initialize it after the conditionals. |
chipx86 | |
No need for this comment. |
chipx86 | |
Blank line between these. |
chipx86 | |
Missing period. |
chipx86 | |
There's a bunch of !important rules in here. We should remove all of them, and instead nest the rules better … |
chipx86 | |
Should just list the class, not the element. Same with all the ones below. |
chipx86 | |
The &. ones go above the child element/class rules. |
chipx86 | |
THis should go above the .datagrid-title rule above. |
chipx86 | |
Too many spaces before endif. |
chipx86 | |
Shouldn't have . If we're trying to add some spacing, that should be done with CSS. |
chipx86 | |
It's not valid to have a <ul> inside another <ul>. It needs to be in <li>. |
chipx86 | |
Indentation got a bit wacky here. |
david | |
Col: 17 E126 continuation line over-indented for hanging indent |
reviewbot | |
Col: 5 E303 too many blank lines (2) |
reviewbot | |
local variable 'review1' is assigned to but never used |
reviewbot | |
local variable 'review2' is assigned to but never used |
reviewbot | |
'SignalHook' imported but unused |
reviewbot | |
'TemplateHook' imported but unused |
reviewbot | |
'URLHook' imported but unused |
reviewbot | |
Col: 21 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 38 E127 continuation line over-indented for visual indent |
reviewbot | |
Col: 38 E127 continuation line over-indented for visual indent |
reviewbot | |
'SignalHook' imported but unused |
reviewbot | |
'TemplateHook' imported but unused |
reviewbot | |
'URLHook' imported but unused |
reviewbot | |
Col: 21 E128 continuation line under-indented for visual indent |
reviewbot | |
Needs a trailing period. |
chipx86 | |
For each of these, you should have a trailing comma after the value in the dictionary, and the }) should … |
chipx86 | |
These can probably just be constants on the class, right? |
chipx86 | |
I don't think this is needed. |
chipx86 | |
This code is pretty similar to what's in ReviewRequestManager. I don't expect you to worry about refactoring all this right … |
chipx86 |
- 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:
-
~ I am working on adding the reviews a user has made to their profile page. It doesn't work at the moment - Django is throwing some errors, though I am working on sorting them out.
~ I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
+ The columns shown will include: + * summary (of review request) + * the star column + * submitter of review request + * date reviewed + * time stamp - Commit:
-
f3fa1ecf4dacd32e489297d8e2a2464c8282cd56
- Change Summary:
-
fixed summary and submitter column
- Description:
-
I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
The columns shown will include: * summary (of review request) * the star column * submitter of review request * date reviewed * time stamp + + The proposed design of the reviews page is discussed here
- Commit:
-
f3fa1ecf4dacd32e489297d8e2a2464c8282cd561f330d1a02d5b3a3565c2413f80a6de20e05b034
-
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:
-
I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
The columns shown will include: * summary (of review request) * the star column * submitter of review request ~ * date reviewed ~ * date reviewed - * time stamp ~ The proposed design of the reviews page is discussed here
~ The proposed design of the reviews page is discussed here
+ Things that still need to be finished: + * the star column + * adding the link to reviews page as a tab (see design above)
- 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:
-
I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
The columns shown will include: * summary (of review request) * the star column * submitter of review request * date reviewed The proposed design of the reviews page is discussed here
Things that still need to be finished: ~ * the star column ~ * adding the show-closed option to the tab bar as a dropdown - * adding the link to reviews page as a tab (see design above) - Commit:
-
1f330d1a02d5b3a3565c2413f80a6de20e05b03434fa25efdf5a08f4384b0144cbadbebb9f087e13
- Change Summary:
-
added show-closed dropdown for active datagrid
- Description:
-
I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
The columns shown will include: * summary (of review request) * the star column * submitter of review request * date reviewed The proposed design of the reviews page is discussed here
Things that still need to be finished: ~ * adding the show-closed option to the tab bar as a dropdown ~ * cleanup css + * testing - Commit:
-
34fa25efdf5a08f4384b0144cbadbebb9f087e13e0f130f5a6c1bdb2d358e533d3dcac5210467e7a
-
-
-
-
-
-
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.
-
-
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'])), ]
-
-
-
-
-
-
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:
-
I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
The columns shown will include: * summary (of review request) - * the star column * submitter of review request * date reviewed The proposed design of the reviews page is discussed here
Things that still need to be finished: * cleanup css * testing - Commit:
-
e0f130f5a6c1bdb2d358e533d3dcac5210467e7ac99ee36937a90d4ee5e63507987667d0bd726a7b
- Diff:
-
Revision 6 (+293 -22)
- Added Files:
- Change Summary:
-
fixed formatting issues
- Commit:
-
c99ee36937a90d4ee5e63507987667d0bd726a7b857077bd5a2e449ce9d6ce475f9202e6757cfd0b
- Change Summary:
-
moved show-closed tag to the topbar (out of dropdown)
- Description:
-
I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
The columns shown will include: * summary (of review request) * submitter of review request * date reviewed The proposed design of the reviews page is discussed here
Things that still need to be finished: - * cleanup css * testing - Commit:
-
857077bd5a2e449ce9d6ce475f9202e6757cfd0b5a4b56afcdf16424b215e761a3e39e466bf9d96b
- Diff:
-
Revision 8 (+249 -19)
- Removed Files:
- Added Files:
- Change Summary:
-
added tests
- Description:
-
I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
The columns shown will include: * summary (of review request) * submitter of review request * date reviewed ~ The proposed design of the reviews page is discussed here
~ Things that still need to be finished: ~ What remains:
~ * making sure private reviews are not shown. - * testing - Testing Done:
-
+ Created unit tests to test that the reviews page works, and reviews on private review requests are not shown.
- Commit:
-
5a4b56afcdf16424b215e761a3e39e466bf9d96ba4183fb397e7c68b96378a4c12a66fd81826a410
- Diff:
-
Revision 9 (+288 -20)
- Change Summary:
-
Moved the filtering of reviews into a manager, and fixed filtering for private requests.
- Summary:
-
[WIP] Adding the reviews a user has made to their profileAdding the reviews a user has made to their profile
- Description:
-
~ I am working on adding the reviews a user has made to their profile page, which will be shown at /users/<username>/reviews/
~ The columns shown will include: ~ 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 - - What remains:
- * making sure private reviews are not shown. - Commit:
-
a4183fb397e7c68b96378a4c12a66fd81826a410aff945f0c511469140e0ec705a88c442e8d39d8b
- Diff:
-
Revision 10 (+344 -20)
- Change Summary:
-
fixed a bug in displaying user reviews (an issue with authentication)
- Commit:
-
aff945f0c511469140e0ec705a88c442e8d39d8bf48ab4c561938448589e1a16361b3be91cf70f9f
- Diff:
-
Revision 11 (+345 -20)
-
-
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:
-
f48ab4c561938448589e1a16361b3be91cf70f9f331fb33531840e9947133362c45e13cf4c4a6465
- Diff:
-
Revision 12 (+350 -20)
-
Almost there!
-
-
-
"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 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:
-
331fb33531840e9947133362c45e13cf4c4a6465bd1be98495762eae9c6d8651715734a99b83e1b9
- 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!
-
-
-
-
This is all a copy/paste of the load_extra_data in ReviewRequestDataGrid. We should pull that out into a
ShowClosedReviewRequestsMixin
. -
-
-
-
-
-
-
-
-
-
-
The parameters are the same for both classes. Let's compute the class here, and initialize it after the conditionals.
-
-
-
-
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. -
-
-
-
-
-
- Change Summary:
-
resolved issues with css and formatting
- Commit:
-
bd1be98495762eae9c6d8651715734a99b83e1b952e95a6d4b8a454bb40768a3537d5fd758086632
- Diff:
-
Revision 14 (+357 -28)
- 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:
-
52e95a6d4b8a454bb40768a3537d5fd758086632fea04241d76278ff05cefeb3e93d9a995c3a5667
- Diff:
-
Revision 15 (+375 -51)
- Change Summary:
-
changes to ShowClosedReviewRequestMixin to fix inheritance issue
- Commit:
-
fea04241d76278ff05cefeb3e93d9a995c3a566769de9e4f1fa9d857c68aa1f97b5c028de72b745d
- Diff:
-
Revision 16 (+375 -51)
- Change Summary:
-
fix indentation issue
- Commit:
-
69de9e4f1fa9d857c68aa1f97b5c028de72b745dbe7853e3ccd2308b54099a307ff43c86e30b102e
- 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
-
-
-
-
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:
-
adressed review bot issues with formatting
- Commit:
-
be7853e3ccd2308b54099a307ff43c86e30b102e900f673fd2e0ad0dea511f2448bf110bbe5e27be
- 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
-
-
-
-
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:
-
900f673fd2e0ad0dea511f2448bf110bbe5e27be1e26f7715e0fd9382aaaec1c5d52f90e3c82bfa9
- 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 :)
-
-
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(**{ ... });
-
-
-
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:
-
1e26f7715e0fd9382aaaec1c5d52f90e3c82bfa92f16cf27c5c7c49a655d481c472b8bd751e117f3
- Diff:
-
Revision 20 (+371 -51)
- Change Summary:
-
rebased from master
- Commit:
-
2f16cf27c5c7c49a655d481c472b8bd751e117f30b39a1ed46defadd6824bf4b632ccdaec4d03c84
- Diff:
-
Revision 21 (+411 -50)
- Change Summary:
-
minor fix: moved class variable from init
- Commit:
-
0b39a1ed46defadd6824bf4b632ccdaec4d03c843e0b97ab947529a28577a146e785b8c9f3bc8153
- Diff:
-
Revision 22 (+411 -50)