So that I can better understand how the game is playing out.
Discussion
It would be nice if the admin could "drop in" on the play page of any player in the game, and see their play page "as if" they were that user.
It might be better if this were in some kind of "read only" mode, where they can see all of the data "as if" they were that user, but they can't buy/sell cows on behalf of that user.
But it's ok to implement it so that the admin can do those things if that's easier.
Consider a Spike
Note that this issue is one of those that might be dead simple, or really really complex, and it's difficult to know up front. You may need to do what's called a "spike" where you do a practice run on trying to build it in a Draft PR that is not intended to be merged, but functions as a kind of "first draft" where you try out ideas.
In a spike, since it's not intended as code to be merged, you can cut corners; e.g.
you can leave in all of the console.log() and/or log.info() statements you like
you can have commented out code all over the place
you don't have to worry about testing or test coverage
it's ok if the user interface is a little messy
You just try out your plan for implementing the feature to see if your plan is feasible. If it seems to be feasible, then you make a new branch and a new PR, doing everything "the right way", using the spike as a "cheat sheet".
Acceptance Criteria
[ ] When an admin views the Leaderboard there is an extra button called "Play Page"
[ ] This button does not show up on the Leaderboard for any user that is not an Admin
[ ] When the admin clicks that button, they are taken to the url /admin/play/:userCommonsId
[ ] What they see is the PlayPage, but they see it "as if" they were the user associated with that userCommonsId.
This may require some significant refactoring of the PlayPage and how it communicates with the backend!
[ ] The functioning of the PlayPage for regular users is unaffected by these changes.
[ ] When an admin is viewing the PlayPage "as if" they were that user, there is some visual indication (e.g. a banner at the top of the page) indicating that they are using their admin features to visit another players page. That banner might include: Name of Commons, Name of User, User id, User Email.
User Story
Discussion
It would be nice if the admin could "drop in" on the play page of any player in the game, and see their play page "as if" they were that user.
It might be better if this were in some kind of "read only" mode, where they can see all of the data "as if" they were that user, but they can't buy/sell cows on behalf of that user.
But it's ok to implement it so that the admin can do those things if that's easier.
Consider a Spike
Note that this issue is one of those that might be dead simple, or really really complex, and it's difficult to know up front. You may need to do what's called a "spike" where you do a practice run on trying to build it in a Draft PR that is not intended to be merged, but functions as a kind of "first draft" where you try out ideas.
In a spike, since it's not intended as code to be merged, you can cut corners; e.g.
console.log()
and/orlog.info()
statements you likeYou just try out your plan for implementing the feature to see if your plan is feasible. If it seems to be feasible, then you make a new branch and a new PR, doing everything "the right way", using the spike as a "cheat sheet".
Acceptance Criteria
/admin/play/:userCommonsId