Page MenuHomePhabricator

[Pre-deployment testing] Retaining draft comments/replies
Closed, ResolvedPublic

Description

I noticed that currently if we type a comment/reply and click "cancel" and then open the reply box again, it retains the typed comment, which is pretty neat IMO. Also, if you now start drafting a reply to another comment and do the same thing, it will retain the content of both replies, that is cool too. Although not sure if it's intentional.
But, when I post a reply it clears the other content/other draft replies, is there a way we can retain those even after posting a reply, since it's not really refreshing the whole page (or atleast visually) I expected it to retain those comments as well.

Event Timeline

Ryasmeen created this task.Dec 6 2019, 12:38 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 6 2019, 12:38 AM

Given the page can be reloaded we would need to implement LocalStorage/SessionStorage based auto-save to support that.

ppelberg added a comment.EditedDec 9 2019, 7:58 PM

Great spot, @Ryasmeen.

I think it's reasonable to expect drafted comments to remain "intact" even after a comment has been posted.

To Ed's point [1], the functionality you are describing [2] will come once auto-save is implemented (see: T240257).

In the meantime, before auto-saving is implemented, we are going to add in a feedback message that warns contributors their drafted comment will be discarded when they:

  • Click "Cancel": T240271
  • Attempt to navigate away from the page (e.g. via the browser's back button, closing the tab, etc.): T240259

Given the page can be reloaded we would need to implement LocalStorage/SessionStorage based auto-save to support that.

  1. "...is there a way we can retain those even after posting a reply...?"
JTannerWMF added a subscriber: JTannerWMF.

WE will revisit this ticket once V2.0 is deployed and we revisit implementing T240257

I noticed that currently if we type a comment/reply and click "cancel" and then open the reply box again, it retains the typed comment

This was not intended behaviour and was fixed. We should close out this ticket as there should be a separate one for auto-save.

ppelberg closed this task as Resolved.Feb 11 2020, 3:13 PM
ppelberg claimed this task.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptFeb 11 2020, 3:13 PM