Page MenuHomePhabricator

Add link - navigating with browser back button should keep the Add link context item open
Open, MediumPublic

Description

Split from T280422: Link recommendation inspector - reloading page workflows

A user doesn't interact with the link inspector
Presently VE will be open after returning to add link suggested browser via a browser back button which is not a desired behavior.

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

Event Timeline

@MMiller_WMF @RHo could you let us know how to prioritize this please? Is this a post-release backlog item?

@MMiller_WMF @RHo could you let us know how to prioritize this please? Is this a post-release backlog item?

Hi @kostajh - imo this is edge case enough for post-release.

kostajh triaged this task as Medium priority.May 11 2021, 8:13 PM

I think this is the issue that @RHo @kostajh @Tgr were discussing in T282290: [mobile] suggested add link inspector - reloading page workflows. In summary, the suggested edit session is cleared when the user navigates away from the article (read, history, talk pages of the same article will retain the session) and retaining the link recommendations would require some kind of grace period for cleaning the session and that would be too complicated than it's worth.

The specific example being discussed there is the privacy policy, which seems to also clear the session.

addlink_privacypolicy.gif (416×640 px, 1 MB)

The specific example being discussed there is the privacy policy, which seems to also clear the session.

On Wikimedia sites the privacy policy is an external link, which is different, although I still don't see how even a local one could clear the session. The session is an object in sessionStorage that doesn't go away on its own; it's cleared then the session init code calls maybeRestore() which removes the object when the stored page title doesn't match the actual one. But for that SuggestedEditSession.js needs to be loaded, and that wouldn't happen on random non-article pages (unless you enabled the help panel in that namespace).

As for external links, for the suggested edit session to be preserved, the sessionStorage object needs to be preserved. I tried to look up what the HTML5 spec says about this, but either I don't understand it or it's unspecified. Chrome preserves it, at least.