Page MenuHomePhabricator

Link recommendation inspector - reloading page workflows
Closed, ResolvedPublic

Description

This is a follow up task for T278485. User when interacting with Add link structured task surface should be sufficiently informed about loosing changes when navigating away and/or the changes should be recoverable.

The two tables below present two paths - when a user does not interact with the add link inspector and when some interactions are done.

Notes:

  • when a user switches between tabs on an article itself (View history, Read, Discussion or switching to Edit source mode) they might not view such actions as navigating away. So the expectations might be to see saved Add link surface with saved changes when they click edit again.

-(updated) I marked in red the scenarios that seem to be the most inconsistent to me (not sufficient warning, not recovered changes despite the assuring message, unexpected outcome etc).

(1) A user doesn't interact with the link inspector

Actions on Add link overlayOutcome on initial pageDesired
(1) the link inspector is open->a user reloads the pagethe link inspector is open
(2) the link inspector is open -> a user clicks on "View history"-> clicks "Edit"the link inspector is open
(3) the link inspector is open -> a user clicks on "Read"-> clicks "Edit"the link inspector is open
(4) the link inspector is open -> a user clicks on "Discussion" tab -> clicks "Article"-> "Edit"the link inspector is open
(5) the link inspector is open -> a user navigates away-> clicks a browser Back buttonVE mode is openthe link inspector is open
(6) the link inspector is open -> a user clicks on "Source editing" -> clicks on "Edit"the link inspector is open

(2) A user interacts with the link inspector (a user clicks Yes/No)

Actions on Add link overlayOutcome on initial pageChanges are recovered?Desired
(1) reloads a pagea browser warning appears to confirm ReloadNo
✅ DONE (2) the link inspector is open-> a user clicks on "View history"-> clicks "Edit"a browser warning appears to confirm Leave; the message "Changes are recovered" is presentthe changes are not recoveredWe don't show the "changes are recovered" message.
(3) the link inspector is open -> a user clicks on "Read"-> clicks "Edit""Continue editing" and "Discard edits" options are present;"Continue editing" returns a user to add link surface - the changes are still present
(4) the link inspector is open -> a user clicks on "Discussion" tab -> clicks on 'Article"-> clicks "Edit"a browser warning appears to confirm "Leave"No
✅ DONE (5) the link inspector is open -> a user navigates away (clicks Random article)-> clicks a browser Back buttona browser warning appears to confirm "Leave""Change recovery failed" - VE is openIt is okay for VE to be open with the changes gone, but we wouldn't want to be telling them change recovery failed, because we never intended to recover them.
(6) the link inspector is open -> a user clicks on "Source editing" -> clicks on "Edit"no warning about navigating away or about non-recovered changesAdd link surface is present without any changes savedThis depends on whether we build T269653: Add a link: edit mode toggle (machine suggestions & visual) and its special dialog.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
kostajh moved this task from Backlog to May 3 - May 7 on the Add-Link board.
Etonkovidova renamed this task from Link inspector - reloading page workflows to Link recommendation inspector - reloading page workflows.Apr 19 2021, 5:47 PM

@kostajh -- I see that this is Ready for Development. On which parts do you plan to take action? Do you need help prioritizing which scenarios need to be changed?

@kostajh -- I see that this is Ready for Development.

per our new workflow, just trying to keep the Incoming column clear.

On which parts do you plan to take action? Do you need help prioritizing which scenarios need to be changed?

I was assuming the scenarios highlighted by Elena. I've put this on our schedule for next week, and yes please, clarification on exactly what should be changed would be very helpful.

We should also check what happens if the user abandons the edit (making VE store it as a draft edit) and then opens VE in normal mode (navigates to a different article and then returns, for example). I.e. T267690: Add a link in VE: don't write to or read from restored edits but with restoring being done by normal VE, not VE controlled by us.

@kostajh @Etonkovidova @Tgr -- I added a column to Elena's table listing the desired behavior. There is a basic rule that I think governs this that hopefully makes this simpler: If the user navigates away from the task, we are under no obligation to still have it there for them when they return to the article or to have saved any of their changes. If it's still there, that's bonus. We should rely on the browser's and VE's standard warnings about this, except in the case of when the user switches editors, because the behavior of our task deviates from VE's usual behavior (we discard their work instead of porting it into source mode).

How does this all sound?

@kostajh @Etonkovidova @Tgr -- I added a column to Elena's table listing the desired behavior. There is a basic rule that I think governs this that hopefully makes this simpler: If the user navigates away from the task, we are under no obligation to still have it there for them when they return to the article or to have saved any of their changes. If it's still there, that's bonus. We should rely on the browser's and VE's standard warnings about this, except in the case of when the user switches editors, because the behavior of our task deviates from VE's usual behavior (we discard their work instead of porting it into source mode).

How does this all sound?

That sounds good.

On mobile, we should also make sure that /section/all is preserved. I noticed that clicking the "X" in suggestions mode, reloading the page, and pressing Edit (which brings me back to suggestions mode) will load the first section only, resulting in weird behavior if there are suggested links in sections farther down the page.

Change 684310 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] AddLink: Use section=all for edit link on read view in mobile

https://gerrit.wikimedia.org/r/684310

On mobile, we should also make sure that /section/all is preserved. I noticed that clicking the "X" in suggestions mode, reloading the page, and pressing Edit (which brings me back to suggestions mode) will load the first section only, resulting in weird behavior if there are suggested links in sections farther down the page.

Done in https://gerrit.wikimedia.org/r/684310

Change 684310 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] AddLink: Use section=all for edit link on read view in mobile

https://gerrit.wikimedia.org/r/684310

@Etonkovidova we've made a bunch of changes since this was filed; could you please review the various scenarios (some are not applicable anymore – "Edit source" tab is gone for example) and let us know which, if any, need to be fixed?

Etonkovidova claimed this task.

@Etonkovidova we've made a bunch of changes since this was filed; could you please review the various scenarios (some are not applicable anymore – "Edit source" tab is gone for example) and let us know which, if any, need to be fixed?

Re-checked and updated the task. Only the following is not done, in terms of desired behavior - split it into T282043: Add link - navigating with browser back button should keep the Add link context item open
(1) A user doesn't interact with the link inspector

Actions on Add link overlayOutcome on initial pageDesired
(5) the link inspector is open -> a user navigates away-> clicks a browser Back buttonVE mode is openthe link inspector is open

Since for the following the desired behavior is to have just VE open without the link inspector open, technically it's DONE.
(2) A user interacts with the link inspector (a user clicks Yes/No)

Actions on Add link overlayOutcome on initial pageChanges are recovered?Desired
(5) the link inspector is open -> a user navigates away (clicks Random article)-> clicks a browser Back buttona browser warning appears to confirm "Leave""Change recovery failed" - VE is openIt is okay for VE to be open with the changes gone, but we wouldn't want to be telling them change recovery failed, because we never intended to recover them.