Skip to content

Add office filter to leaderboard#48

Open
amitskatti wants to merge 3 commits intoYelp:masterfrom
amitskatti:Add-office-filter-to-leaderboard
Open

Add office filter to leaderboard#48
amitskatti wants to merge 3 commits intoYelp:masterfrom
amitskatti:Add-office-filter-to-leaderboard

Conversation

@amitskatti
Copy link
Copy Markdown

Add office filter to leaderboard

@amitskatti
Copy link
Copy Markdown
Author

Copy link
Copy Markdown
Member

@rockdog rockdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your pull request.

Overall this looks great. Just added a question regarding org_title and a suggestion to DRY up the if statement for the leaderboard.

Any chance you could add a screenshot of the UI changes?

Comment thread views/web.py
selected_dept=department,
selected_timespan=timespan,
selected_timespan=timespan, selected_office=office,
org_title=config.ORG_TITLE,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if org_title is still being used? If not it should be removed here and in the config.

</select>
</div>
<div class="form-group">
<label class="sr-only" for="office">Department</label>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this should be Office not Department?

Comment thread logic/love_count.py
lovers.append((employee_key, c.sent_count))
else:
employee = employee_key.get()
if (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking but I think this could need a comment saying what condition we are looking for to append an employee to the list.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even better to extract this into a function with a little docstring to keep things DRY. Thoughts?

Comment thread logic/love_count.py
lovees.append((employee_key, c.received_count))
else:
employee = employee_key.get()
if (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking but I think this could need a comment saying what condition we are looking for to append en employee to the list.

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.

2 participants