Page MenuHomePhabricator

Edits lost when writing replies on talk page before leaving the page
Closed, ResolvedPublic3 Estimated Story Points

Description

Problem

If you're on https://cs.m.wikipedia.org/wiki/Pes_dom%C3%A1c%C3%AD#/talk/2 and writing some comment, and click (intentionally or by mistake) on some of the links on the page, your comment will be discarded without warning.

Proposed solution

The talk page interface should warn users before leaving the page, similary to what edit interface (on desktop at least) already does.

developer notes

The onBeforeExit function for the add new talk section overlay can be pulled out and reused here with a few modifications. See also T228235

QA notes

On the beta cluster in AMC mode, click talk button and click one of the topics. Type text in the reply box and click the arrow button in top left.

  • Clicking cancel should prevent the overlay from exiting.
  • Click browser back button. Click cancel to protect your edits.
  • Click BROWSER back button and say yes - your edits should be lost
  • Click back button and say yes - your edits should be lost

QA Results

Event Timeline

Jdlrobson renamed this task from Warn users writing a comment on talk page before leaving the page to Edits lost when writing replies on talk page before leaving the page.Jul 17 2019, 3:05 PM
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from Incoming to Upcoming on the Web-Team-Backlog board.
ovasileva triaged this task as Medium priority.Jul 17 2019, 3:41 PM
ovasileva moved this task from Upcoming to Needs Prioritization on the Web-Team-Backlog board.

Change 525448 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Prevent talk replies from being lost by accidental back click

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

Jdlrobson set the point value for this task to 3.Jul 25 2019, 5:29 PM

Change 525448 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Prevent talk replies from being lost by accidental back click

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

Edtadros subscribed.

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):

QA Steps

On the beta cluster in AMC mode, click talk button and click one of the topics. Type text in the reply box and click the arrow button in top left.

T228278.gif (692×344 px, 1 MB)

✅ AC1: Clicking cancel should prevent the overlay from exiting.
✅ AC2: Click browser back button. Click cancel to protect your edits.
✅ AC3: Click BROWSER back button and say yes - your edits should be lost
✅ AC4: Click back button and say yes - your edits should be lost

LGTM 💪 I tested this on the BC as did @Edtadros in T228278#5378507. The patch will be deployed to group0 wikis tomorrow.

This issue was fixed only partially. When I click the arrow in the interface, or browser back button, all works as expected. But when I click a link that's in a comment in the page, my comment still gets lost without warning (demonstrated on a screencast). Group2 should be on wmf.16 now, so it should work on both cswiki and enwiki. For comparation, see how it behaves with the desktop editor (screencast.

Could you fix this issue, please?

Opened a new issue for that @ T229701 Thanks for the report!

Opened a new issue for that @ T229701 Thanks for the report!

Thanks! Should we re-close this issue then? Or why was it separated (just curious)?