-
-
-
reviewboard/datagrids/grids.py (Diff revision 1) Col: 1 E101 indentation contains mixed spaces and tabs
-
-
-
-
-
-
reviewboard/datagrids/grids.py (Diff revision 1) Col: 1 E101 indentation contains mixed spaces and tabs
-
reviewboard/datagrids/grids.py (Diff revision 1) Col: 17 E122 continuation line missing indentation or outdented
-
reviewboard/datagrids/grids.py (Diff revision 1) Col: 1 E101 indentation contains mixed spaces and tabs
-
-
-
-
-
-
-
reviewboard/datagrids/grids.py (Diff revision 1) Col: 14 E251 unexpected spaces around keyword / parameter equals
-
reviewboard/datagrids/grids.py (Diff revision 1) Col: 16 E251 unexpected spaces around keyword / parameter equals
-
Added a filter on the users page for viewing inactive/removed users
Review Request #8650 — Created Jan. 21, 2017 and submitted
There's been a request to add a filter to the Users page that allows for showing those who are no longer part of the team. This was done by updating class 'UsersDataGrid' to introduce show/hide inactive users functionality. I also created templates/datagrids/user_listview.html to display the show/hide inactive toggle.
This was tested by changing a user from active to inactive via admin page. Then, I checked on the users page if an inactive user disappears after clicking 'Hide inactive', and whether an inactive user also appears after clicking 'Show inactive'.
Description | From | Last Updated |
---|---|---|
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
Because there's only one UsersDataGrid, we don't really need a mixin class. We can just put this implementation into UsersDataGrid.load_extra_state |
david | |
Col: 1 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 17 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 1 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 14 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 16 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Do we need the reviewtags library here? |
david | |
Space between datagrid_filters and %} |
brennie | |
Col: 28 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 26 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
The load_extra_state method takes a non-optional profile argument. |
david | |
The other code in this file is old and doesn't match up with our new docstring guidelines. This should include … |
david | |
Can you make this "Do nothing."? |
david | |
allow_hide_inactive is always going to be True so we could just get rid of it. |
david | |
This can all go on one line. |
david | |
Col: 51 W291 trailing whitespace |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 58 W291 trailing whitespace |
reviewbot | |
Col: 37 W291 trailing whitespace |
reviewbot | |
Col: 51 W291 trailing whitespace |
reviewbot | |
The summary should be a single line, followed by a blank line, followed by more stuff. The following stuff should … |
david | |
Blank line between these. |
david | |
Should be "bool" instead of "Boolean" |
david | |
"The user profile..." |
brennie | |
So a few things here: self.show_inactive is initially False and int(False) will raise ValueError. Instead of self.show_inactive, lets use 0. … |
brennie | |
Not necessary. |
brennie | |
Col: 62 E241 multiple spaces after ',' |
reviewbot | |
Blank line between these. |
brennie | |
I just noticed that there's an extra </li> added on each of these lines (in addition to the one after … |
david |
-
-
reviewboard/datagrids/grids.py (Diff revision 1) Because there's only one
UsersDataGrid
, we don't really need a mixin class. We can just put this implementation intoUsersDataGrid.load_extra_state
-
reviewboard/templates/datagrids/user_listview.html (Diff revision 1) Do we need the
reviewtags
library here?
-
-
reviewboard/templates/datagrids/user_listview.html (Diff revision 1) Space between
datagrid_filters
and%}
Description: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||
Commit: |
|
||||||||||||
Diff: |
Revision 2 (+31 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
-
reviewboard/datagrids/grids.py (Diff revision 2) Col: 28 E251 unexpected spaces around keyword / parameter equals
-
reviewboard/datagrids/grids.py (Diff revision 2) Col: 26 E251 unexpected spaces around keyword / parameter equals
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+31 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
-
-
reviewboard/datagrids/grids.py (Diff revision 3) The
load_extra_state
method takes a non-optionalprofile
argument. -
reviewboard/datagrids/grids.py (Diff revision 3) The other code in this file is old and doesn't match up with our new docstring guidelines. This should include "Args" and "Returns" sections as per https://www.reviewboard.org/docs/codebase/dev/docs/writing-codebase-docs/
-
-
reviewboard/datagrids/grids.py (Diff revision 3) allow_hide_inactive
is always going to beTrue
so we could just get rid of it. -
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+40 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
-
-
-
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+40 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+40 -1) |
-
Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
-
-
reviewboard/datagrids/grids.py (Diff revision 6) The summary should be a single line, followed by a blank line, followed by more stuff. The following stuff should be aligned to the starting column of the """. Something like this:
def load_extra_state(self, profile): """Load extra state for the datagrid. This handles hiding or showing inactive users. Args: profile (reviewboard.accounts.models.Profile): User profile which contains some basic configurable settings. Returns: bool: Always returns False. """
-
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+42 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
-
-
-
reviewboard/datagrids/grids.py (Diff revision 7) So a few things here:
-
self.show_inactive
is initiallyFalse
andint(False)
will raiseValueError
. Instead ofself.show_inactive
, lets use0
. -
If you pull the
request.GET.get(...)
code into a separate variable, it will look slightly cleaner, i.e. less indents:
show_inactive = self.request.GET.get('show-inactive', 0) try: self.show_inactive = int(show_inactive) except ValueError: pass
-
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 8 (+40 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 9 (+40 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 10 (+41 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/user_listview.html
-
-
reviewboard/templates/datagrids/user_listview.html (Diff revision 10) I just noticed that there's an extra
</li>
added on each of these lines (in addition to the one after the{% endif %}
). This is also a bug in the code you modeled this on, so it's totally not your fault.We should at least fix it here, and if you wanted to fix up the one in review_request_listview.html as well, that would be awesome.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 11 (+43 -3) |
-
Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/review_request_listview.html reviewboard/templates/datagrids/user_listview.html Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py Ignored Files: reviewboard/templates/datagrids/review_request_listview.html reviewboard/templates/datagrids/user_listview.html