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

Adding enhancement #131 - Student title vs. Instructor title #142

Merged
merged 2 commits into from
Nov 26, 2019

Conversation

sbuttar
Copy link
Contributor

@sbuttar sbuttar commented Nov 25, 2019

This PR addresses the enhancement requested by issue #131 , and was made with Ram Natla (@ramnatla). If the logged-in user is currently on the queue, the title of the page is updated to show their position: "(#2) Office Hours Help Queue". If the logged-in user is not on the queue, the title will display the total number of people on the queue. For example, if 20 people were on the queue, the title will display: "(20) Office Hours Help Queue".

To implement this, any time the queue receives an update, the title of the page was dynamically changed.

We would appreciate any and all feedback on this PR!

var myRequestIdx = this.state.requests.indexOf(myRequest.request);
document.title = `(#${myRequestIdx + 1}) Office Hours Help Queue`
} else {
document.title = `(${this.state.requests.length}) Office Hours Help Queue`
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for putting this together! Thoughts on providing some indication as to whether or not we’re showing your request or the total queue size? Maybe (8/24) Office Hours Help Queue if you’re on the queue and (24) Office Hours Help Queue if not.

Copy link
Owner

Choose a reason for hiding this comment

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

Oh, 🤦‍♂ just realized you have a pound sign in there. That works for me!

@mterwill mterwill merged commit cc00dea into mterwill:master Nov 26, 2019
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