Skip to content
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

Merged
merged 1 commit into from
Nov 13, 2018
Merged

Enhancing user's profile #2760

merged 1 commit into from
Nov 13, 2018

Conversation

nanspro
Copy link
Contributor

@nanspro nanspro commented Nov 10, 2018

Description

User's profile is more enhanced now due to presence of "Bounties In Progress" and more improvements to UI.

Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)

Front end

Testing

locally

Refers/Fixes

Fixes #2375 , #2340

@@ -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]

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

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']:

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
Copy link

codecov bot commented Nov 11, 2018

Codecov Report

Merging #2760 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
app/dashboard/views.py 12.85% <0%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2625644...7eba4ea. Read the comment docs.

@@ -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']:

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

@thelostone-mc
Copy link
Member

@nanspro could you throw in screenshots / recording of the change ?

@nanspro
Copy link
Contributor Author

nanspro commented Nov 12, 2018

screenshot from 2018-11-12 17-18-55

owocki
owocki previously approved these changes Nov 12, 2018
Copy link
Contributor

@owocki owocki left a 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 %}">
Copy link
Member

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 ?

@@ -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']:
Copy link
Member

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 ?

@thelostone-mc
Copy link
Member

@nanspro code looks good to me! Could you address the minor changes ?

@@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.

"""
from cacheops import cached_as

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

@@ -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()

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)

@@ -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()

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)

@@ -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'

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

@nanspro
Copy link
Contributor Author

nanspro commented Nov 13, 2018

@thelostone-mc @owocki ready to be merged!!!

@SaptakS SaptakS merged commit 085670e into gitcoinco:master Nov 13, 2018
@gitcoinbot gitcoinbot mentioned this pull request Nov 13, 2018
@nanspro nanspro deleted the issue_2375 branch November 13, 2018 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants