Trophy case 3,4
Review Request #3878 — Created Feb. 16, 2013 and discarded
https://hackpad.com/Trophy-Case-Design-MK30awhb3nL
(1) unit test, named test_importing_trophies, do follow things. 1.Add User object named user1. 2.Add 2 reveiw requests associated with user1, display_id=1000 for Milestone Trophy and display_id=1221 for Palindrome Trophy. 3.Compute user1's all trophies. And, this code passed test. (2) I made sure profile.extra_data works. I set the pdb.set_trace in "if not extra_data.get('has_trophy_case', False)", then I tried to access twice and I checked that pdb is called only once.
Description | From | Last Updated |
---|---|---|
Instead of display (id: 1), I think these should link to the review requests that caused the reward. Maybe something … |
mike_conley | |
This is looking much, much better! Another suggestion - please remove the quotes, and use the trophy title instead of … |
mike_conley | |
Col: 80 E501 line too long (101 > 79 characters) |
reviewbot | |
Col: 20 E203 whitespace before ' |
reviewbot | |
Apparently, `written by Hiro` is not a good class description |
GR gregwym | |
Col: 5 E303 too many blank lines (2) |
reviewbot | |
Col: 13 E201 whitespace after '(' |
reviewbot | |
Col: 18 E202 whitespace before ')' |
reviewbot | |
You sure you want to name a function as `newfunc`? It is not a descriptive name. |
GR gregwym | |
Col: 35 E201 whitespace after '(' |
reviewbot | |
Col: 68 E202 whitespace before ')' |
reviewbot | |
Col: 22 E201 whitespace after '(' |
reviewbot | |
Col: 26 E202 whitespace before ')' |
reviewbot | |
I think we use `` instead of ``. Besides, I wonder whether using is a good option. In my opinion, … |
GR gregwym | |
Col: 69 W291 trailing whitespace |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
Col: 1 W391 blank line at end of file |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 1 W391 blank line at end of file |
reviewbot | |
Col: 1 W391 blank line at end of file |
reviewbot | |
Col: 16 E711 comparison to None should be 'if cond is None |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 25 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 25 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
Col: 5 E303 too many blank lines (2) |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 1 W391 blank line at end of file |
reviewbot | |
Col: 80 E501 line too long (89 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (92 > 79 characters) |
reviewbot | |
Col: 43 W291 trailing whitespace |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
Col: 9 E221 multiple spaces before operator |
reviewbot | |
Col: 28 E127 continuation line over-indented for visual indent |
reviewbot | |
Col: 18 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 18 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 16 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 16 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 11 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 11 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 11 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 23 E203 whitespace before ' |
reviewbot | |
Col: 80 E501 line too long (105 > 79 characters) |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 23 E203 whitespace before ' |
reviewbot | |
Col: 12 E225 missing whitespace around operator |
reviewbot | |
Col: 20 E226 missing optional whitespace around operator |
reviewbot | |
Col: 24 E225 missing whitespace around operator |
reviewbot | |
Col: 35 E225 missing whitespace around operator |
reviewbot | |
Col: 38 E226 missing optional whitespace around operator |
reviewbot | |
Col: 41 E226 missing optional whitespace around operator |
reviewbot | |
Col: 44 E226 missing optional whitespace around operator |
reviewbot | |
Col: 53 E226 missing optional whitespace around operator |
reviewbot | |
Col: 55 E226 missing optional whitespace around operator |
reviewbot | |
Col: 69 E225 missing whitespace around operator |
reviewbot | |
Col: 12 E225 missing whitespace around operator |
reviewbot | |
Col: 21 E225 missing whitespace around operator |
reviewbot | |
Col: 24 E226 missing optional whitespace around operator |
reviewbot | |
Col: 27 E226 missing optional whitespace around operator |
reviewbot | |
Col: 30 E226 missing optional whitespace around operator |
reviewbot | |
Col: 39 E226 missing optional whitespace around operator |
reviewbot | |
Col: 41 E225 missing whitespace around operator |
reviewbot | |
Col: 23 E203 whitespace before ' |
reviewbot | |
Col: 80 E501 line too long (105 > 79 characters) |
reviewbot | |
Col: 18 E203 whitespace before ' |
reviewbot | |
I don't see anything about this in the spec. Not sure we need or want a page showing all the … |
chipx86 | |
Col: 80 E501 line too long (105 > 79 characters) |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Call this "import_trophies" instead. |
chipx86 | |
Blank line between these. |
chipx86 | |
This is going to be very, very slow, because we're loading every single review request from the database that the … |
chipx86 | |
Blank line between these. |
chipx86 | |
You're never actually saving the profile. |
chipx86 | |
I don't think you want to do a copy. What's it for? |
chipx86 | |
Blank line before this. This can be simplified to: if not extra_data.get('has_trophy_case', False): |
chipx86 | |
Blank line between these. |
chipx86 | |
I'm not really sure what this is doing, but a better way to write it would be: trophy_list = [ … |
chipx86 | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
This is going to look weird if it's only 1 trophy, since it will say: "Got 1 trophies". Instead, you … |
chipx86 | |
CSS should never go in HTML directly. |
chipx86 | |
Indentation issue. |
chipx86 | |
Does it not work to pass this variable to "static" below. instead of using definevar? |
chipx86 | |
This line is pretty long. I don't think we want this entire bit of logic either. If you have hundreds … |
chipx86 | |
I think this should just be "test_importing_trophies" |
mike_conley | |
Let's put these in alphabetical order, so Profile, ReviewRequestVisit, Trophy. |
mike_conley | |
You should use Trophy.objects.get_trophy(trophy.trophy_type) Callers shouldn't know (or care) that the manager holds the trophies in a trophy_dict. |
mike_conley | |
Trailing whitespace |
mike_conley | |
Space before "none" |
mike_conley | |
Should be "Has gotten {{user_trophies}} troph{{ user_trophies|pluralize:"y,ies" }}. |
mike_conley | |
I'm confused - we appear to be showing a user's trophies twice - once in the header in a big … |
mike_conley | |
The alt tag should be the trophy title |
mike_conley | |
Remove this trailing whitespace. |
mike_conley | |
This function is not up to date with what Hiro has in http://reviews.reviewboard.org/r/3905/ I think you need to merge in … |
mike_conley | |
This should use Hiro's get_trophy, not getAbstractTrophy. |
mike_conley | |
I'm confused, why is this still here? In my last review, I wrote: "...we appear to be showing a user's … |
mike_conley | |
Is 'trophy' ever used? I don't think it is - if not, please remove it. |
mike_conley | |
trophy-box is used by user_trophies.html, which is no longer being used. I think this set of rules can be removed. |
mike_conley | |
The alignment of the HTML tags needs to be corrected. Also, I'd like you to post a screenshot showing what … |
mike_conley | |
This file isn't being used anymore and can be removed. |
mike_conley | |
Clearer documentation would be, """Compute the trophies awarded to a user.""" |
mike_conley | |
I think the alt tag should be the trophy description. |
mike_conley | |
These need to be removed. |
mike_conley | |
Hm, this shouldn't be here. You should increase the margin-bottom of the instead. Maybe something like: .trophy-info h1 { margin-bottom: … |
mike_conley | |
This isn't the right way to link to a review request. It should be like this: {% blocktrans with trophy_data.trophy.review_request.display_id … |
mike_conley | |
This newline should go back. |
mike_conley | |
Break up this long line by putting the tag on the next line, and the {% endblocktrans %} on its … |
mike_conley |
- Change Summary:
-
[accounts/managers.py] *Add compute_user_all_trophies(user) to TrophyManager class. *Hiro gonna create TrophyManager class and add compute_trophies(rid) func later. [accounts/models.py] *Import TrophyManager and add it to Trophy class [reviews/templatetags/reviewtags.py] *Import Trophy and create compute_user_all_trophies(user) func. *This func calls TrophyManager's function(see accounts/managers.py). [templates/reviews/user_page.html] *add a template tag for call compute_user_all_trophies(user). *fix the list of trophies ... (<br> --> <ul> and <li>) [accounts/tests.py] *add test_wip(self), which is assumed name. *test_wip(self) creates user, creates some review requests, publishes them and erases the m.
- Diff:
-
Revision 2 (+76 -2)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/evolutions/trophies.py reviewboard/accounts/tests.py Ignored Files: reviewboard/templates/reviews/user_page.html
-
-
-
-
-
-
-
-
- Change Summary:
-
*add some code to user_page.html for show all trophies(review request ID) stored in the database. *keep Hiroki's model up to date. 2013-02-27. *call the compute_user_all_trophies, which is func of [accounts/managers.py], when user access user_page.html.(see view.py) *move JSONField from LocalSiteProfile class to Profile class.
- Diff:
-
Revision 3 (+151 -23)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/models.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/evolutions/local_site_profile.py Ignored Files: reviewboard/templates/reviews/user_page.html reviewboard/templates/reviews/trophy_box.html
-
-
-
-
-
-
-
-
-
-
-
- Change Summary:
-
fix format
- Diff:
-
Revision 4 (+148 -23)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/models.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/evolutions/local_site_profile.py Ignored Files: reviewboard/templates/reviews/user_page.html reviewboard/templates/reviews/trophy_box.html
-
-
- Diff:
-
Revision 5 (+150 -23)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/models.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/evolutions/local_site_profile.py Ignored Files: reviewboard/templates/reviews/user_page.html reviewboard/templates/reviews/trophy_box.html
-
- Diff:
-
Revision 6 (+150 -23)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/models.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/evolutions/local_site_profile.py Ignored Files: reviewboard/templates/reviews/user_page.html reviewboard/templates/reviews/trophy_box.html
- Change Summary:
-
wip unittests for compute_user_all_trophies function. (It doesn't work!)
- Diff:
-
Revision 7 (+68 -23)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/evolutions/local_site_profile.py Ignored Files: reviewboard/templates/reviews/user_page.html reviewboard/templates/reviews/trophy_box.html
- Diff:
-
Revision 8 (+67 -22)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/evolutions/local_site_profile.py Ignored Files: reviewboard/templates/reviews/user_page.html reviewboard/templates/reviews/trophy_box.html
- Change Summary:
-
Fix tests.py (unittests for compute_user_all_trophies function).
- Diff:
-
Revision 9 (+69 -22)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/evolutions/local_site_profile.py Ignored Files: reviewboard/templates/reviews/user_page.html reviewboard/templates/reviews/trophy_box.html
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/templates/reviews/user_page.html
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/datagrids.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/urls.py reviewboard/accounts/tests.py Ignored Files: reviewboard/templates/accounts/user_infobox.html reviewboard/templates/trophies/trophy_infobox.html reviewboard/templates/trophies/trophy_list.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/common.js reviewboard/templates/trophies/trophy.html reviewboard/templates/reviews/user_page.html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/datagrids.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/urls.py reviewboard/accounts/tests.py Ignored Files: reviewboard/templates/accounts/user_infobox.html reviewboard/templates/trophies/trophy_infobox.html reviewboard/templates/trophies/trophy_list.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/common.js reviewboard/templates/trophies/trophy.html reviewboard/templates/reviews/user_page.html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/datagrids.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/urls.py reviewboard/accounts/tests.py Ignored Files: reviewboard/templates/accounts/user_infobox.html reviewboard/templates/trophies/trophy_infobox.html reviewboard/templates/trophies/trophy_list.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/common.js reviewboard/templates/trophies/trophy.html reviewboard/templates/reviews/user_page.html
-
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/datagrids.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/urls.py reviewboard/accounts/tests.py Ignored Files: reviewboard/templates/accounts/user_infobox.html reviewboard/templates/trophies/trophy_infobox.html reviewboard/templates/trophies/trophy_list.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/common.js reviewboard/templates/trophies/trophy.html reviewboard/templates/reviews/user_page.html
-
-
-
-
I don't see anything about this in the spec. Not sure we need or want a page showing all the types of trophies, since they're supposed to be more secret. You should spend your time making a nice, clean list (not datagrid) of trophies a user has on their profile page. Something like a banner at the top of their profile page showing each type of trophy they have.
- Change Summary:
-
remove trophy_page, trophy_list and trophy_infobox. add trophy_box to top of user_page
- Diff:
-
Revision 16 (+78 -3)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/reviews/user_trophies.html reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
- Change Summary:
-
fix display style of trophy_box
- Diff:
-
Revision 17 (+74 -3)
- Added Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/reviews/user_trophies.html reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
- Change Summary:
-
add trophy_pic to trophy_box
- Diff:
-
Revision 18 (+87 -3)
- Removed Files:
- Added Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/reviews/user_trophies.html reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
-
- Diff:
-
Revision 19 (+87 -3)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/common.less reviewboard/templates/reviews/user_trophies.html reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
-
-
-
-
-
This is going to be very, very slow, because we're loading every single review request from the database that the user has ever made, and turning each one into a full object. We know that every old trophy is one of two types: Milestone trophies (1000, 10000, etc.), and Fish trophies (1221, 1551, 12321, etc.). So, we know every one of them is an ID. There are only two ID fields we care about: "id" itself, and "local_id" (used for Local Sites, which is a way to turn one RB installation into several mini-installations). So, we only need those fields, and "local_site" to know which one to use. You can use Django's "only" method (https://docs.djangoproject.com/en/dev/ref/models/querysets/#only) for this. You would need to do: q = user.review_requests.only('id', 'local_id', 'local_site') for review_request in q: ...
-
-
-
-
-
-
I'm not really sure what this is doing, but a better way to write it would be: trophy_list = [ (trophy, Trophy.objects.trophy_dict[...]) for trophy in trophies ] However, since this is being rendered by the template, it might be nicer to give these keys: trophy_list = [ { 'trophy': trophy, 'trophy_cls': Trophy.objects..., } for trophy in trophies ] Then the templates can use the key names instead of numbers.
-
This is going to look weird if it's only 1 trophy, since it will say: "Got 1 trophies". Instead, you want to use Django's "plural" template tag: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#pluralize
-
-
-
-
This line is pretty long. I don't think we want this entire bit of logic either. If you have hundreds of review requests, this will get long. Instead, just a horizontal list of all their trophies that has the trophy image and then the review request ID number below. Also, you're doing "review_request.id" in here, but it has to be "review_request.display_id"
- Diff:
-
Revision 20 (+118 -3)
- Removed Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/reviews/user_trophies.html reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
-
-
-
-
You should use Trophy.objects.get_trophy(trophy.trophy_type) Callers shouldn't know (or care) that the manager holds the trophies in a trophy_dict.
-
-
-
-
I'm confused - we appear to be showing a user's trophies twice - once in the header in a big yellow box, and once down the side. We shouldn't duplicate this information. The whole user page is probably going to undergo a redesign soon...I think I'd prefer, for now, to place the trophies just down the side, with their images.
-
-
-
- Change Summary:
-
fix coding style fix importing trophy_cls
- Diff:
-
Revision 21 (+106 -5)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/tests.py reviewboard/accounts/models.py reviewboard/accounts/managers.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_trophies.html reviewboard/templates/reviews/user_page.html
-
-
This function is not up to date with what Hiro has in http://reviews.reviewboard.org/r/3905/ I think you need to merge in his changes.
-
-
I'm confused, why is this still here? In my last review, I wrote: "...we appear to be showing a user's trophies twice - once in the header in a big yellow box, and once down the side. We shouldn't duplicate this information. The whole user page is probably going to undergo a redesign soon...*I think I'd prefer, for now, to place the trophies just down the side, with their images*." So what you had down the left side was what I think we wanted, but we also wanted the images while you were at it.
- Change Summary:
-
*remove trophy-box on top of user_page *add trophy-list on side of user_page
- Diff:
-
Revision 22 (+143 -3)
- Removed Files:
- Added Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/reviews/user_trophies.html reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
- Diff:
-
Revision 23 (+143 -3)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/reviews/user_trophies.html reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
-
Hey Yuri - just a few things that I don't think are necessary anymore. Also, I'd really like to see a screenshot showing what this looks like with the trophies in the sidebar. Thanks, -Mike
-
-
trophy-box is used by user_trophies.html, which is no longer being used. I think this set of rules can be removed.
-
The alignment of the HTML tags needs to be corrected. Also, I'd like you to post a screenshot showing what this looks like.
-
-
-
Instead of display (id: 1), I think these should link to the review requests that caused the reward. Maybe something like "[title of trophy]" /r/15251 Where /r/15251 would link to review request 15251. Let's see what that looks like. Also, why are these pushed so far to the right? Can you get rid of the margin to the left of the trophy images?
- Change Summary:
-
*remove user_trophies.html completely *fix position of trophy images. *add new screenshot
- Diff:
-
Revision 24 (+91 -4)
- Removed Files:
- Added Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
- Change Summary:
-
*fix display style of trophy titles *add new screenshot
- Diff:
-
Revision 25 (+91 -4)
- Removed Files:
- Added Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
-
Hey Yuri, I'm pretty close to giving this a ship-it. Just two more nits below from me. Also, you need to fill out the "Testing Done" section - tell us what testing you did to make sure this all works. What steps did you follow to test? Describe what the unit test tests. That sort of thing. -Mike
-
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
- Description:
-
~ [WIP]
~ https://hackpad.com/Trophy-Case-Design-MK30awhb3nL
- https://hackpad.com/Trophy-Case-Design-MK30awhb3nL - Testing Done:
-
+ (1)
+ unit test, named test_importing_trophies, do follow things. + 1.Add User object named user1. + 2.Add 2 reveiw requests associated with user1, display_id=1000 for Milestone Trophy and display_id=1221 for Palindrome Trophy. + 3.Compute user1's all trophies. + And, this code passed test. + + (2)
+ I made sure profile.extra_data works. + I set the pdb.set_trace in "if not extra_data.get('has_trophy_case', False)", then I tried to access twice and I checked that pdb is called only once.
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
-
Gah, just noticed two more things.
-
Hm, this <br> shouldn't be here. You should increase the margin-bottom of the <h1> instead. Maybe something like: .trophy-info h1 { margin-bottom: 10px; }
-
This isn't the right way to link to a review request. It should be like this: {% blocktrans with trophy_data.trophy.review_request.display_id as id and review_request.get_absolute_url as review_request_url %} <a href="{{review_request_url}}">/r/{{id}}</a> {% endblocktrans %} Please double check that this works.
- Change Summary:
-
remove </ br> tag from user_page use get_absolute_url() to link trophy's review_request pages.
- Diff:
-
Revision 28 (+94 -5)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py Ignored Files: reviewboard/static/rb/css/dashboard.less reviewboard/static/rb/css/common.less reviewboard/templates/accounts/user_infobox.html reviewboard/templates/reviews/user_page.html