Page MenuHomePhabricator

SD - create better error message for logged out users attempting to edit
Closed, ResolvedPublic

Description

This task is a follow-up task for T217774: Structured Discussions exposes user’s IP address if logged out in other browser window/tab as per @Tgr comment https://phabricator.wikimedia.org/T217774#5939958.

Possible follow-ups:

  • cover the template-based code paths (as per the code review comment)
  • decent error handling on resolve/unresolve (c575674)
  • make the error message easier to understand for the user (could replace the API error with something custom in getApiErrorMessage)

Presently, there are several issues with handling logged-out users (users who logged out in another tab/window).

(1) The warning message is not present in the beginning of editing.

  • a user is logged out (and not aware of it) starts editing and receives no warning.

In contrast, for an anon user the warning will be displayed on Structured discussions when a user starts to edit:

Screen Shot 2020-03-04 at 3.09.14 PM.png (512×830 px, 63 KB)

(2) When a logged-out user attempts to save an edit - the displayed warning message does not communicate clearly

  • what exactly happen (the language of the warning is too technical)
  • does not provide any info to a user what options a user has for editing (log in again or publish as anon edit).

Screen Shot 2020-03-04 at 2.56.57 PM.png (534×1 px, 78 KB)

Both, VE and wikitext editor do a good job to communicate to users what happened and what next steps might be:

Screen Shot 2020-03-04 at 2.51.05 PM.png (369×519 px, 52 KB)

(3) If a logged-out user confused by "Assertion that the user is logged in failed" message would change the editor (to VE or wikitext) even more enigmatic message will be displayed:
Screen Shot 2020-03-04 at 2.54.06 PM.png (303×785 px, 49 KB)

(minor) (4) Unnecessary confirmation dialog box if a user decides to cancel their edits:

Screen Shot 2020-03-04 at 2.54.43 PM.png (371×815 px, 68 KB)

Event Timeline

The warning message is not present in the beginning of editing.

Wouldn't really help, a user can get logged out mid-editing just as easily, and we probably don't want to continuously poll whether the user is logged in.

When a logged-out user attempts to save an edit

  • the displayed warning message does not communicate clearly what exactly happen (the language of the warning is too technical)
  • does not provide any info to a user what options a user has for editing (log in again or publish as anon edit).

Any text suggestions? Should it maybe include a login link that opens in a new tab? (Does that help more than it confuses on mobile?)

Both, VE and wikitext editor do a good job to communicate to users what happened and what next steps might be:

But they provide a "try again" option, and we don't (at least in the current minimalistic implementation).

Come to think about it, the recent patch actually makes it impossible to save your post under a different username from how you started it. Not sure what to do about that...

If a logged-out user confused by "Assertion that the user is logged in failed" message would change the editor (to VE or wikitext) even more enigmatic message will be displayed:

As in, this error is shown when you switch editors? (And prevents the switch?) That ideally should not happen, not sure how easy it is to isolate that code path though.

Unnecessary confirmation dialog box if a user decides to cancel their edits:

Why would that be more unnecessary than showing that dialog on cancel in general?

Etonkovidova renamed this task from Structured Discussions - create better error message for logged out users attempting to edit to SD - create better error message for logged out users attempting to edit.May 6 2020, 1:10 AM
Etonkovidova claimed this task.

Thank you, @Tgr for the feedback on this task in https://phabricator.wikimedia.org/T246956#5943848.

I re-checked the issue testwiki wmf.12, and I think that the current message effectively conveys the message to a logged-out: when attempting to save their edits, a logged-out users will see the following message when attempting to save their edits:

Screen Shot 2024-01-08 at 4.23.04 PM.png (1×2 px, 194 KB)

#3 is also not happening anymore.