-
Notifications
You must be signed in to change notification settings - Fork 7
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
Poor user experience when trying to flag an annotation when not logged in #261
Comments
I'm guessing the client should either show a similar message to when a logged-out user tries to annotate, or we should just hide the flag button for logged-out users. |
I think this is just a flat-out bug. We shouldn't be showing the "flag" button for logged-out users because in our model flags are fundamentally associated with an (annotation, user) tuple aren't they? |
IIRC the general approach throughout the client is not to hide buttons when you're logged out. Not saying that's a good idea necessarily, just that we should be consistent until we decide to change it everywhere. So yes, I think just display a more friendly error message. But note the additional details discussion above - this error message when flagging can show for two reasons. 1. User is not logged in, and needs to login (to eLife, which will then automatically log them in to the client). 2. User is already logged in, but their OAuth token has expired, and they need to reload the page. So we need two different error messages (since the required user action is different). |
I think this is a perfectly reasonable position to take, but by the same logic we shouldn't show reply, annotate or highlight buttons when you're logged out. So the counter-argument would be that the flag button should be consistent with the rest of our buttons? |
That's a fair point and I suppose it does make sense to clue the user into the fact that they can flag an offensive annotation, even if they don't have an account to do so. |
I think there is a general lesson here that API error messages from the server should not be shown directly to users. I'm guessing this super technical error message comes directly from the API response. The client should always handle server errors by translating them into good user friendly error messages (or somehow avoiding running into the server error at all, or avoiding showing an error to the user at all, if possible, yes, but when you do have to show an error make it a good one) |
Yeah. I'm not sure I have an opinion either way, but I just think we should probably keep it consistent throughout. (Or maybe we shouldn't always? If there is good reason to deviate in one case.) |
Notes from backlog refinement:
Possible solutions:
|
Note from backlog refinement: There is a very simple and dumb option here (hide the button for logged out users), and an option that will provide better UX but will take a bit more work. @ajpeddakotla can we catch up about this when you're free? |
I think there are actually four options here, @robertknight :
|
Just a thought here ya'll - and apologies for wading into this a little late in the discussion. The red toaster messages really aren't that great. We haven't moved towards a UX like this before and I don't think we should start now. Can we simply hide the buttons when users aren't able to use them? Right now, the reply button shows when a user can't reply. Can we hide buttons that aren't available for users to act on when they are logged out? How complex of an idea is this to implement? @robertknight @seanh |
I think the short answer is that hiding flag and reply (and also page note) when you're not logged in would be easy to do (I say 2 points per button) but hiding buttons actually can't avoid all red toaster messages when you click on a button, it can just reduce the likelihood of them. Details: Was just chatting to @fatbusinessman about this in standup, and he made a good suggestion that I think we should follow: let's make the existing red toaster messages friendlier right now and then look into hiding all the buttons.
|
Update: hypothesis/client#374 and hypothesis/client#375 are merged so the error message is not as bad any more, but we can still also make it hide the flag button when you're not logged in so that the error message doesn't show at all? Scored as 2. Talking to @fatbusinessman about this a minute ago I think there's a good argument for hiding the flag button only when not logged in, but not necessarily hiding other buttons (reply, page note, annotate, highlight), because those buttons are more core to what the product offers so we may want users who don't have accounts to see that those actions are there, whereas flagging is probably not core. Also hiding just the flag button is less work and I think probably less controversial. So I think we have 3 options now:
|
Agree w/ your assessment @seanh and @fatbusinessman - Let's close the issue - we're fine with the error message we have now. |
Ok, closing and marking as done in the Not-Really-A-Sprint. |
Bug report form
Steps to reproduce
Expected behaviour
Some sort of user friendly error message that explains:
It might be nice if the actual error message could contain a clickable login link / button?
Actual behaviour
An unfriendly error message is shown:
After a few seconds the error message disappears by itself. If you click on the error message it disappears immediately.
Problems with this error message:
Contains technical jargon:
All three should be removed from the user error message.
It says that either the resource doesn't exist or you're not authorized, but in fact we know the resource does exist and the problem is definitely that the user isn't authorized (and also, both "the resource doesn't exist" and "you're not authorized" are meaningless jargon to the user).
It doesn't tell the user what they can do about it.
Your solution
Even though I think they're terrible, I'd suggest still using the floating-red-toaster-bubble-that-disappears approach to error messages (since that's not unique to this error message, it's the main way the client currently has for showing error messages, replacing that is a bigger job), and for now simply changing the error message. Maybe something like this:
I said above that it'd be nice if the error message itself could contain a login button or link. Unfortunately I don't think these toaster bubble error messages can - clicking anywhere on the bubble causes the bubble to disappear.
Additional details
I think it's important to realise that this is related to The client needs to handle OAuth-related errors in a user-friendly way #169 (the client needs to handle OAuth-related errors in a user-friendly way) - when the user gets logged out of the client because their OAuth token expires then flagging will start producing the error message above.
The client needs to handle OAuth-related errors in a user-friendly way #169 runs into a similar problem - when the user has been logged out because the client was unable to refresh their OAuth access token (this will happen sometimes, unavoidably) we currently don't have a great way to display an error message to the user.
So I think there is general issue here along the lines of the client lacks good ways of showing error messages.
But importantly when the user has been logged out because the client was unable to refresh their OAuth access token (this will happen sometimes, unavoidably) they will still be logged in to the eLife website. So telling them that they need to "log in" doesn't really help - from the user's point of view they're already logged in. They need to reload the page. But one of the (many) things that will start going wrong when this happens if that flagging will show this "404 Not Found. Either the resource you requested doesn't exist, or you are not currently authorized to see it" which of course doesn't help the user (to know that they need to reload the page).
Suggestion: When this OAuth logout has happened and the user needs to reload the page, I think we need to put the client into a "broken mode" where they can still read public annotations, but trying to do anything (annotate, highlight, reply, flag...) shows a "You need to reload the page" error message. But this is for The client needs to handle OAuth-related errors in a user-friendly way #169.
This could be handled as a separate issue - if you click on the flag multiple times it creates multiple error messages:
If it's possible to implement easily (I'm not sure whether it is) it'd be better to:
Not really part of this issue, but maybe worth noting for information, what happens when you click on the other button on annotations when you're not logged in is completely different:
In a way this is actually better:
On the other hand:
Anyway, that's a separate issue. (And of course you can also try to create annotations or highlights when logged out, which produces another two different error message behaviors.)
The text was updated successfully, but these errors were encountered: