[WIP] Add archived state to review requests
Review Request #6830 — Created Jan. 25, 2015 and discarded
Information | |
---|---|
cristocrat | |
Review Board | |
master | |
Reviewers | |
reviewboard, students | |
Orig: January 25, 2015
- added visibility field to ReviewRequestVisit with visible (V) and archived (A) states
- added show_archived attribute to DashboardDataGrid
- added ReviewRequestVisitManagerJanuary 31, 2015
- scrapped ReviewRequestVisitManager idea
- added a query that filters archived requests to ReviewRequestManager
- wrote and applied a evolution for visibility in the ReviewRequestVisit tableFebruary 11, 2015
- added archive and mute buttons in template with handlers
- added a reviewRequestVisit JavaScript resource that talks to the webAPI
- began review_request_visit APIFebruary 13, 2015
- scrapped review_request_visit API and decided on two separate archived_request_visit and muted_request_visit APIs to prevent visits from being exposed
- added archive/unarchive/mute/unmute functions in reviewRequestVisit model
- began archive bannerFebruary 16, 2015
- url() and archive() in archivedReviewRequestModel.js
- added decorators in the archived_review_request webAPI resourceFebruary 17, 2015
- finished implementing query that filters archived review requests
- added more functional hyperlink that toggles review request visibility with url query
- works as it should if there are no other existing url queries, but still need to figure out how to append to existing, non-"show-archived" url queriesFebruary 19, 2015
- fixed archive query
- completed POST request for archiving
- made "Hide" button disappear when review request is already archivedFebruary 28, 2015
Description | From | Last Updated |
---|---|---|
'ConcurrencyManager' imported but unused |
![]() |
|
undefined name 'ReviewRequestVisit' |
![]() |
|
The first line of this file should be from __future__ import unicode_literals. With that, you can change initial=u'V' to initial='V'. |
|
|
Col: 80 E501 line too long (109 > 79 characters) |
![]() |
|
Col: 2 W292 no newline at end of file |
![]() |
|
You should revert the change to this line. |
|
|
'ReviewRequestVisit' imported but unused |
![]() |
|
You don't need the '' default in the get statement. It would return a None which would be a false … |
VT VTL-Developer | |
I think that we want this to be a filter on the existing queryset (rather than replacing it entirely). Something … |
|
|
Col: 5 E101 indentation contains mixed spaces and tabs |
![]() |
|
Col: 5 W191 indentation contains tabs |
![]() |
|
Col: 6 E128 continuation line under-indented for visual indent |
![]() |
|
Col: 1 E302 expected 2 blank lines, found 1 |
![]() |
|
undefined name 'ReviewRequestVisit' |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 1 W191 indentation contains tabs |
![]() |
|
Col: 61 W292 no newline at end of file |
![]() |
|
Col: 9 E128 continuation line under-indented for visual indent |
![]() |
|
Col: 33 W291 trailing whitespace |
![]() |
|
'User' imported but unused |
![]() |
|
'augment_method_from' imported but unused |
![]() |
|
'webapi_check_local_site' imported but unused |
![]() |
|
Col: 1 E302 expected 2 blank lines, found 1 |
![]() |
|
local variable 'user' is assigned to but never used |
![]() |
|
local variable 'review_request' is assigned to but never used |
![]() |
|
undefined name 'DOES_NOT_EXIST' |
![]() |
|
local variable 'user' is assigned to but never used |
![]() |
|
local variable 'review_request' is assigned to but never used |
![]() |
|
undefined name 'DOES_NOT_EXIST' |
![]() |
|
'augment_method_from' imported but unused |
![]() |
|
'webapi_check_local_site' imported but unused |
![]() |
|
'resources' imported but unused |
![]() |
|
Col: 1 E302 expected 2 blank lines, found 1 |
![]() |
|
Col: 9 E128 continuation line under-indented for visual indent |
![]() |
|
These sorts of methods don't really help that much. It's nicer to just have the calling code set the field … |
|
|
I'd not sure if this is temporary test code or not, but we should just be passing filter_archived as a … |
|
|
This isn't quite right. Please see my earlier suggestion at https://reviews.reviewboard.org/r/6830/#comment20262 In this context, it would end up looking something … |
|
|
'User' imported but unused |
![]() |
|
'augment_method_from' imported but unused |
![]() |
|
Col: 60 E231 missing whitespace after ',' |
![]() |
|
local variable 'user' is assigned to but never used |
![]() |
|
This should probably be more like: visit, is_new = ReviewRequestVisit.objects.get_or_create( user=user, review_request=review_request) visit.visible = ReviewRequestVisit.ARCHIVED visit.save() |
|
|
undefined name 'archived_review_request' |
![]() |
|
Col: 26 E225 missing whitespace around operator |
![]() |
|
Col: 5 W604 backticks are deprecated, use 'repr()' |
![]() |
|
Col: 7 E226 missing whitespace around arithmetic operator |
![]() |
|
Col: 1 E112 expected an indented block |
![]() |
|
Col: 9 E128 continuation line under-indented for visual indent |
![]() |
|
Col: 9 E128 continuation line under-indented for visual indent |
![]() |
|
This isn't used anymore. |
|
|
Col: 19 E702 multiple statements on one line (semicolon) |
![]() |
|
Should have the model name before it: "reviewrequestvisit_visibility" I don't see any profile settings in here? |
|
|
Blank line between these. |
|
|
Should use one of the constants instead of hard-coding V. I'm not sure we want to index this here. If … |
|
|
This is already defined in ReviewRequestDataGrid. |
|
|
I feel like we're doing a bunch of unnecessary work for this 'show_archived' flag. I also think we can't assume … |
|
|
Best named hidden_q or just queryset. |
|
|
Instead of the ~Q(...), use Q(visibility__ne=...) |
|
|
Should use the consatnt instead of "P". |
|
|
I don't think we need this anymore? |
|
|
Should be added alphabetically. |
|
|
Col: 19 E702 multiple statements on one line (semicolon) |
![]() |
|
'Q' imported but unused |
![]() |
|
Rather than using a continuation character here, can you put the whole expression in parens? if (review_request.public and review_request.status == … |
|
|
These should probably be defined inside the UserSession object (right after this.watchedGroups = ...). We should also wrap these strings … |
|
|
Same comment as above. |
|
|
Same comment as above. |
|
|
Same comment as above. |
|
|
Same comment as above. |
|
|
Same comment as above. |
|
|
This should say "review request" instead of "change" |
|
|
This should say "review request" instead of "change" |
|
|
No blank line here (django and djblets are both "3rd party" libraries from Review Board's point of view). |
|
|
Can you add docstrings for the class and method? |
|
|
Please add visibility=self.model.ARCHIVED to the filter call (we don't want to update muted review requests). |
|
|
Col: 21 E126 continuation line over-indented for hanging indent |
![]() |
|
Please add a blank line after the docstring. |
|
|
Col: 1 E302 expected 2 blank lines, found 1 |
![]() |
|
review_published and reply_published pass a Review instance as their argument rather than a ReviewRequest. You'll need a separate handler for … |
|
|
Col: 80 E501 line too long (82 > 79 characters) |
![]() |
|
Since you have parens, put the opening paren on the previous line instead of using \\ |
|
|
I think djblets.util.http.get_url_params_except will do what you want. |
|
|
Col: 7 E111 indentation is not a multiple of four |
![]() |
|
Please don't change the signatures of these, and instead have a separate handler. |
|
|
I don't understand what the visibility attribute is used for. Can you explain? |
|
|
Please use "review request" instead of "change" |
|
|
Please use "review request" instead of "change" |
|
Description: |
|
|||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+44 -2) |

-
Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/models.py reviewboard/reviews/managers.py Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/models.py reviewboard/reviews/managers.py
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 2) Col: 80 E501 line too long (109 > 79 characters)
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 2) Col: 2 W292 no newline at end of file
-
-
-
reviewboard/datagrids/grids.py (Diff revision 2) You don't need the '' default in the get statement. It would return a
None
which would be a false for your if statement.
-
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 2) The first line of this file should be
from __future__ import unicode_literals
. With that, you can changeinitial=u'V'
toinitial='V'
. -
-
reviewboard/datagrids/grids.py (Diff revision 2) I think that we want this to be a filter on the existing queryset (rather than replacing it entirely). Something like this?
if not show_archived: hidden = ReviewRequestVisit.objects.filter( user=user, visibility__ne=ReviewRequestVisit.VISIBLE) hidden = hidden.values_list('review_request_id', flat=True) self.queryset = self.queryset.exclude(pk__in=hidden)
In fact, it might be even more appropriate to plumb the
show_archived
field through and do this at the bottom ofReviewRequestManager._query
, which already has some similar code (which filters out review requests that are "private")
Change Summary:
Create a ReviewRequestVisit resource
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+161 -5) |

-
Tool: Pyflakes Processed Files: reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/review_request_visit.py reviewboard/accounts/models.py reviewboard/reviews/managers.py Ignored Files: reviewboard/static/rb/js/resources/models/reviewRequestVisitModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/review_request_visit.py reviewboard/accounts/models.py reviewboard/reviews/managers.py Ignored Files: reviewboard/static/rb/js/resources/models/reviewRequestVisitModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 3) Col: 5 E101 indentation contains mixed spaces and tabs
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 3) Col: 5 W191 indentation contains tabs
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 3) Col: 6 E128 continuation line under-indented for visual indent
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 E302 expected 2 blank lines, found 1
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) undefined name 'ReviewRequestVisit'
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 1 W191 indentation contains tabs
-
reviewboard/webapi/resources/review_request_visit.py (Diff revision 3) Col: 61 W292 no newline at end of file
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 4 (+328 -5) |

-
Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/managers.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: Pyflakes Processed Files: reviewboard/reviews/managers.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 4) Col: 9 E128 continuation line under-indented for visual indent
-
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) 'User' imported but unused
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) 'augment_method_from' imported but unused
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) 'webapi_check_local_site' imported but unused
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) Col: 1 E302 expected 2 blank lines, found 1
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) local variable 'user' is assigned to but never used
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) local variable 'review_request' is assigned to but never used
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) undefined name 'DOES_NOT_EXIST'
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) local variable 'user' is assigned to but never used
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) local variable 'review_request' is assigned to but never used
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 4) undefined name 'DOES_NOT_EXIST'
-
reviewboard/webapi/resources/muted_review_request.py (Diff revision 4) 'augment_method_from' imported but unused
-
reviewboard/webapi/resources/muted_review_request.py (Diff revision 4) 'webapi_check_local_site' imported but unused
-
reviewboard/webapi/resources/muted_review_request.py (Diff revision 4) 'resources' imported but unused
-
reviewboard/webapi/resources/muted_review_request.py (Diff revision 4) Col: 1 E302 expected 2 blank lines, found 1
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 5 (+338 -5) |

-
Tool: Pyflakes Processed Files: reviewboard/reviews/managers.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/managers.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 5) Col: 9 E128 continuation line under-indented for visual indent
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 5) 'User' imported but unused
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 5) 'augment_method_from' imported but unused
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 5) Col: 60 E231 missing whitespace after ','
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 5) local variable 'user' is assigned to but never used
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 5) undefined name 'archived_review_request'
-
I haven't looked too much at the javascript code because it looks very preliminary.
I'd suggest setting the archive flag for a review request in the database admin and using that to test that the dashboard queries are working correctly.
-
reviewboard/accounts/models.py (Diff revision 5) These sorts of methods don't really help that much. It's nicer to just have the calling code set the field directly and call save() when appropriate.
-
reviewboard/datagrids/grids.py (Diff revision 5) I'd not sure if this is temporary test code or not, but we should just be passing
filter_archived
as a parameter to the existingReviewRequest.objects.*()
methods, rather than replacing the queryset. With this as-is, all the pages of the dashboard will look the same. -
reviewboard/reviews/managers.py (Diff revision 5) This isn't quite right. Please see my earlier suggestion at https://reviews.reviewboard.org/r/6830/#comment20262
In this context, it would end up looking something like this:
query = self.filter(query).distinct() if filter_archived: hidden = ReviewRequestVisit.objects.filter( user=user, visibility__ne=ReviewRequestVisit.VISIBLE) hidden = hidden.values_list('review_request_id', flat=True) query = query.exclude(pk__in=hidden) if with_counts: ...
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 5) This should probably be more like:
visit, is_new = ReviewRequestVisit.objects.get_or_create( user=user, review_request=review_request) visit.visible = ReviewRequestVisit.ARCHIVED visit.save()
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 6 (+331 -7) |

-
Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/evolutions/visibility.py profile_show_archived.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/reviews/managers.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
-
-
profile_show_archived.py (Diff revision 6) Col: 7 E226 missing whitespace around arithmetic operator
-
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 6) Col: 9 E128 continuation line under-indented for visual indent
Description: |
|
---|
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 7 (+322 -7) |

-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
reviewboard/accounts/evolutions/visibility.py (Diff revision 7) Col: 9 E128 continuation line under-indented for visual indent
Change Summary:
- added the archive banner
- half-way through unarchiving
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 8 (+350 -22) |

-
Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/templates/reviews/review_header.html reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/templates/reviews/review_header.html reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 8) Col: 19 E702 multiple statements on one line (semicolon)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 9 (+377 -39) |

-
Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/base.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/userSessionModel.js
-
reviewboard/webapi/resources/archived_review_request.py (Diff revision 9) Col: 19 E702 multiple statements on one line (semicolon)

-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/base.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/userSessionModel.js
-
-
reviewboard/accounts/evolutions/__init__.py (Diff revision 9) Should have the model name before it: "reviewrequestvisit_visibility"
I don't see any profile settings in here?
-
-
reviewboard/accounts/models.py (Diff revision 9) Should use one of the constants instead of hard-coding
V
.I'm not sure we want to index this here. If there's 500 archived review requests, then the index will contain 500 entries under 'A', which isn't that useful. The user's own archived ones will still need to be searched within that 500.
If we want to index something, it's probably best to do an
index_together = ('user', 'visibility')
. -
-
reviewboard/datagrids/grids.py (Diff revision 9) I feel like we're doing a bunch of unnecessary work for this 'show_archived' flag. I also think we can't assume that
profile
is defined here yet. Also, we need to record whether we've changed a profile setting.How about we instead do:
profile_changed = False ... default_show_archived = (profile and profile.extra_data.get('show_archived', False)) try: self.show_archived = ... except ValueError: self.show_archived = default_show_archived ... if profile and self.show_archived != default_show_archived: profile.extra_data[...] = ... profile_changed = True parent_profile_changed = super(...).load_extra_state(...) return profile_changed or parent_profile_changed
-
-
-
-
reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js (Diff revision 9) I don't think we need this anymore?
-
Change Summary:
- finished banners
- implemented automatic refreshing
- finished unarchiving
- finished all of muting and unmuting
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 10 (+453 -49) |

-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/datagrids/grids.py reviewboard/accounts/models.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/reviewGroupModel.js reviewboard/templates/base.html reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/js/resources/models/reviewRequestModel.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/models/userSessionModel.js Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/datagrids/grids.py reviewboard/accounts/models.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/reviewGroupModel.js reviewboard/templates/base.html reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/js/resources/models/reviewRequestModel.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/models/userSessionModel.js
-
-
This is getting to be a pretty big change. How would you feel about splitting this up into several review requests? One to add the database stuff, one for the dashboard queries, one to add API, and one for frontend?
-
reviewboard/reviews/views.py (Diff revision 10) Rather than using a continuation character here, can you put the whole expression in parens?
if (review_request.public and review_request.status == review_request.PENDING_REVIEW):
-
reviewboard/static/rb/js/resources/models/reviewGroupModel.js (Diff revision 10) These should probably be defined inside the UserSession object (right after
this.watchedGroups = ...
). We should also wrap these strings ingettext()
. -
reviewboard/static/rb/js/resources/models/reviewRequestModel.js (Diff revision 10) Same comment as above.
-
-
-
-
-
reviewboard/templates/reviews/review_header.html (Diff revision 10) This should say "review request" instead of "change"
-
reviewboard/templates/reviews/review_header.html (Diff revision 10) This should say "review request" instead of "change"
Change Summary:
- signals for automatic unarchiving
- fixed url query
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 11 (+518 -61) |

-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/datagrids/views.py reviewboard/webapi/resources/muted_review_request.py reviewboard/datagrids/grids.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py reviewboard/reviews/signals.py reviewboard/reviews/models/review.py Ignored Files: reviewboard/templates/base.html reviewboard/templates/reviews/review_header.html reviewboard/templates/datagrids/hideable_review_request_listview.html reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/models/userSessionModel.js Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/datagrids/views.py reviewboard/webapi/resources/muted_review_request.py reviewboard/datagrids/grids.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py reviewboard/reviews/signals.py reviewboard/reviews/models/review.py Ignored Files: reviewboard/templates/base.html reviewboard/templates/reviews/review_header.html reviewboard/templates/datagrids/hideable_review_request_listview.html reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/models/userSessionModel.js
-
reviewboard/accounts/managers.py (Diff revision 11) Col: 21 E126 continuation line over-indented for hanging indent
-
-
-
-
-
reviewboard/accounts/managers.py (Diff revision 11) No blank line here (django and djblets are both "3rd party" libraries from Review Board's point of view).
-
reviewboard/accounts/managers.py (Diff revision 11) Can you add docstrings for the class and method?
-
reviewboard/accounts/managers.py (Diff revision 11) Please add
visibility=self.model.ARCHIVED
to the filter call (we don't want to update muted review requests). -
-
reviewboard/accounts/models.py (Diff revision 11) review_published
andreply_published
pass a Review instance as their argument rather than a ReviewRequest. You'll need a separate handler for those signals which accessesreview.review_request
-
reviewboard/datagrids/grids.py (Diff revision 11) Since you have parens, put the opening paren on the previous line instead of using
\\
-
reviewboard/datagrids/views.py (Diff revision 11) I think
djblets.util.http.get_url_params_except
will do what you want. -
reviewboard/reviews/signals.py (Diff revision 11) Please don't change the signatures of these, and instead have a separate handler.
-
reviewboard/static/rb/js/models/userSessionModel.js (Diff revision 11) I don't understand what the
visibility
attribute is used for. Can you explain? -
reviewboard/static/rb/js/views/reviewRequestEditorView.js (Diff revision 11) Please use "review request" instead of "change"
-
reviewboard/static/rb/js/views/reviewRequestEditorView.js (Diff revision 11) Please use "review request" instead of "change"