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

Challenge Join button is displayed for non-existent and inaccessible challenges #11420

Closed
Alys opened this issue Oct 16, 2019 · 7 comments · Fixed by #11521
Closed

Challenge Join button is displayed for non-existent and inaccessible challenges #11420

Alys opened this issue Oct 16, 2019 · 7 comments · Fixed by #11521

Comments

@Alys
Copy link
Contributor

Alys commented Oct 16, 2019

@vamsijv reports that when a challenge doesn't exist or isn't in a guild you're allowed to see (e.g., this one), the challenge page still has the elements on it to let you Join the challenge.

"... it's still offering people to join. Browser version [shows] message 'Challenge not found or you don't have access' upon clicking 'Join' button. It would be better if the page shows only this message on its load instead of regular UI elements for challenge."
finished challenge accessible - browser

I'm marking this as suggestion-discussion for the staff to comment on whether a change is desired. FYI @Tressley

@vamsijv
Copy link
Contributor

vamsijv commented Oct 19, 2019

@Alys Please let me know when you have any update on whether this needs to be worked on. Thanks.

@Tressley
Copy link
Collaborator

@vamsijv -- We've discussed this and it'll need someone to take it on, if you're interested!

Our proposed solution is instead of loading the Challenge page, we should re-direct the user to the "Discover Challenges" page that displays the error message.

@Alys -- Did you have proposed messaging for the error or does the current copy still work?

@vamsijv
Copy link
Contributor

vamsijv commented Oct 31, 2019

@Tressley Thanks for the update. I would be happy to help here.

If I understand correctly, we would like to "Take user to 'Discover Challenges' page, whenever a challenge that's not accessible to current user is attempted to load. In addition to this, we show a message basically informing the user that requested challenge is not accessible and guide him/her to other available challenges"

While I start working on this, please let me know the requirements(e.g message part) once finalized for this. Also I was wondering if there is any reference doc/requirement notes so I could know exactly how the accessibility of challenge to a particular user(e.g. owner, participant and for different type of challenge - party, public etc.) is determined exactly. This would drive our new behavior.

cc @Alys

@Alys
Copy link
Contributor Author

Alys commented Oct 31, 2019

I think the current message is good:

"challengeNotFound": "Challenge not found or you don't have access.",

@vamsijv If you search for the places where that message is used (git grep challengeNotFound), you'll find the code that controls how a user can access a challenge (since that message is displayed whenever a challenge should not be accessed by the user). We want to keep using the same access controls that we have now. That grep command will return a lot of hits but if you ignore the tests and the locales files, you'll see there's only three *.js files to look through. One example is the getChallenge() call so you can use that to find code that controls access:

Note though that we don't want any API calls themselves to be modified because that would be a breaking change for the API (i.e., any code that currently uses the API to fetch a challenge's data would work in a different way than it does now). The new behaviour to resolve this issue should be added to just the website's client-side code.

@vamsijv
Copy link
Contributor

vamsijv commented Nov 2, 2019

@Alys I was able to make the necessary changes based on your inputs. Thank you!
I believe next steps are unit testing from my end. Is there any other QA cycle involved (or fix validation by some dedicated QA) before deploying to production?
I know that there are some steps mentioned here for individual developers for testing any change that is needed for deployment. I will try to follow these unless you suggest something else for this fix to go live.

@Alys
Copy link
Contributor Author

Alys commented Nov 3, 2019

@vamsijv That wiki page you linked to should contain everything you need to do!

If it turns out that it doesn't, let us know and we'll add to it.

@vamsijv
Copy link
Contributor

vamsijv commented Nov 9, 2019

The changes for this ticket are available in PR for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants