-
-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancing user's profile #2760
Enhancing user's profile #2760
Conversation
app/dashboard/views.py
Outdated
@@ -1142,6 +1142,12 @@ def profile(request, handle): | |||
profile = profile_helper(handle, current_user=request.user) | |||
|
|||
context = profile.to_dict() | |||
for stats in profile.stats: | |||
if stats[1] == 'Bounties In Progress': | |||
bounty_progress = stats[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F841 local variable 'bounty_progress' is assigned to but never used
app/dashboard/views.py
Outdated
if stats[1] == 'Bounties In Progress': | ||
bounty_progress = stats[0] | ||
# context['started_bounties_count'] = [_ for _ in context['activities'] if _['activity_bounties']] | ||
for _ in context['activities']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F402 import '_' from line 37 shadowed by loop variable
E271 multiple spaces after keyword
Codecov Report
@@ Coverage Diff @@
## master #2760 +/- ##
==========================================
- Coverage 28.83% 28.83% -0.01%
==========================================
Files 164 164
Lines 13125 13127 +2
Branches 1755 1756 +1
==========================================
Hits 3785 3785
- Misses 9233 9235 +2
Partials 107 107
Continue to review full report at Codecov.
|
app/dashboard/views.py
Outdated
@@ -1142,6 +1142,8 @@ def profile(request, handle): | |||
profile = profile_helper(handle, current_user=request.user) | |||
|
|||
context = profile.to_dict() | |||
for x in context['activities']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E271 multiple spaces after keyword
@nanspro could you throw in screenshots / recording of the change ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code seems fine to me.. @thelostone-mc @mbeacom @SaptakS ?
{% if activity.bounty.funding_organisation %} | ||
<img class="avatar" src="{% url 'org_avatar' activity.bounty.funding_organisation %}"> | ||
{% else %} | ||
<img class="avatar" src="{% url 'org_avatar' activity.bounty.bounty_owner_github_username %}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we indent this by 1 ?
app/dashboard/views.py
Outdated
@@ -1142,6 +1142,8 @@ def profile(request, handle): | |||
profile = profile_helper(handle, current_user=request.user) | |||
|
|||
context = profile.to_dict() | |||
for x in context['activities']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we rename it something more meaningful ?
@nanspro code looks good to me! Could you address the minor changes ? |
app/economy/utils.py
Outdated
@@ -17,6 +17,7 @@ | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
|
|||
""" | |||
from cacheops import cached_as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'cacheops.cached_as' imported but unused
app/dashboard/views.py
Outdated
@@ -1142,6 +1142,8 @@ def profile(request, handle): | |||
profile = profile_helper(handle, current_user=request.user) | |||
|
|||
context = profile.to_dict() | |||
for activities in context['activities']: | |||
activities['started_bounties_count'] = activities['activity_bounties'].filter(activity_type='start_work').count() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (125 > 120 characters)
app/dashboard/views.py
Outdated
@@ -1142,6 +1142,8 @@ def profile(request, handle): | |||
profile = profile_helper(handle, current_user=request.user) | |||
|
|||
context = profile.to_dict() | |||
for activity in context['activities']: | |||
activity['started_bounties_count'] = activity['activity_bounties'].filter(activity_type='start_work').count() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (121 > 120 characters)
app/dashboard/views.py
Outdated
@@ -1142,6 +1142,10 @@ def profile(request, handle): | |||
profile = profile_helper(handle, current_user=request.user) | |||
|
|||
context = profile.to_dict() | |||
for activity in context['activities']: | |||
activity['started_bounties_count'] = activity['activity_bounties'].filter( | |||
activity_type='start_work' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W191 indentation contains tabs
E101 indentation contains mixed spaces and tabs
@thelostone-mc @owocki ready to be merged!!! |
Description
User's profile is more enhanced now due to presence of "Bounties In Progress" and more improvements to UI.
Checklist
Affected core subsystem(s)
Front end
Testing
locally
Refers/Fixes
Fixes #2375 , #2340