-
-
-
-
-
-
The other functions in this class don't do this yet, but we're trying to move unit tests to use underscore_separated_functions, like the rest of the codebase. Can you update this to do that?
-
Trailing whitespace. I think it's best to have all parameters on their own lines, aligned with default_view, so that there's consistency. Like: grid = DashboardDataGrid( request, local_site=..., ...)
Users should be able to specify their default Dashboard view
Review Request #3653 — Created Dec. 11, 2012 and discarded
Users should be able to specify their default dashboard view. Introduce a User Profile attribute that allows the user to select one of "incoming","outgoing","starred","mine". Once they select one of these (the default will be "incoming"), the default view will be set to that and will be shown anytime they come into the /dashboard/ page. Summary of changes: * reviewboard/accounts/evolutions/__init__.py * reviewboard/accounts/evolutions/default_view.py + Migration script to add the "default_view" column to accounts_profile * reviewboard/accounts/forms.py + Create a default_view field selected from a dropdown list of "incoming", "outgoing", "mine" or "starred". + Save the user selected value when saving the user profile. * reviewboard/accounts/models.py + Create a default_view field in the model (CharField) that has a default value of "incoming". * reviewboard/reviews/datagrids.py + Get the value from the constructor and set it to be the default_view. If nothing is setup, default to 'incoming' (Existing behaviour) Fill it out the same way as how it would be when a user does /dashboard?view=<view type> * reviewboard/reviews/tests.py + Added testDashboardDefaultView that sets the default view for "doc" user. Test the counts by varying the account profile value. * reviewboard/reviews/views.py + Call DashboardDataGrid passing in the user's default_view profile setting.
Manual, ran the test cases (new and existing). I wasnt sure of how to run the migration testing, so that was not tested.
Description | From | Last Updated |
---|---|---|
Should be listed alphabetically. |
chipx86 | |
Can we call this default_dashboard_view, so it's clear? |
chipx86 | |
The human-readable strings should be localized (using _(..)) |
chipx86 | |
Should also be default_dashboard_view. Also, alignment issue. |
chipx86 | |
The other functions in this class don't do this yet, but we're trying to move unit tests to use underscore_separated_functions, … |
chipx86 | |
Trailing whitespace. I think it's best to have all parameters on their own lines, aligned with default_view, so that there's … |
chipx86 | |
I'd prefer this go in Profile. |
chipx86 | |
I think ideally, this would be 4 separate test functions, one per view. That way we know that each of … |
chipx86 | |
use assertTrue. |
chipx86 | |
assertTrue. |
chipx86 | |
This shouldn't be needed. |
chipx86 |
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/tests.py reviewboard/accounts/views.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/models.py reviewboard/reviews/datagrids.py reviewboard/accounts/evolutions/default_dashboard_view.py reviewboard/accounts/forms.py Ignored Files: reviewboard/templates/accounts/prefs.html
RA
- Change Summary:
-
Fixed review comments and split the tests to be separate for each of the views.
- Diff:
-
Revision 3 (+83 -3)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/tests.py reviewboard/accounts/views.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/models.py reviewboard/reviews/datagrids.py reviewboard/accounts/evolutions/default_dashboard_view.py reviewboard/accounts/forms.py Ignored Files: reviewboard/templates/accounts/prefs.html