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

Urbanecm created this task.Jul 17 2019, 1:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 17 2019, 1:37 PM
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: Readers-Web-Backlog.
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from Incoming to Upcoming on the Readers-Web-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 Readers-Web-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 reassigned this task from Edtadros to phuedx.Jul 31 2019, 2:30 AM
Edtadros added a subscriber: Edtadros.

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.

✅ 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

Edtadros updated the task description. (Show Details)Jul 31 2019, 2:31 AM
phuedx closed this task as Resolved.Jul 31 2019, 10:43 AM

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

Urbanecm reopened this task as Open.Aug 2 2019, 3:05 PM

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)?

Jdlrobson closed this task as Resolved.Aug 2 2019, 9:09 PM