Page MenuHomePhabricator

Add auto-save to the reply widget
Open, Needs TriagePublic

Description

⚠️ This ticket is still being drafted

Description

The contents of contributors' unpublished comments should be saved automatically if their browser crashes.

In Version 1.0, a contributor's unpublished comment will not be retained if they close the browser tab in which said comment was being drafted.

Open questions

  • How should it be communicated to contributors they have drafts that have been saved?
  • What happens if the parent comment is deleted or moved? Will the reply be discarded, or will it be resurfaced elsewhere?
  • Is it expected that the user will only be drafting one comment at any given time?

References

Related tickets to review/understand

Event Timeline

ppelberg created this task.Dec 9 2019, 8:05 PM
Esanders renamed this task from Build auto-save to Add auto-save to the reply widget.Dec 10 2019, 2:53 PM
Jc86035 added a comment.EditedDec 10 2019, 3:22 PM

What happens if the parent comment is deleted or moved? Will the reply be discarded? Or is it expected that the user will only be drafting one comment at any given time?

ppelberg added a comment.EditedDec 10 2019, 8:03 PM

What happens if the parent comment is deleted or moved? Will the reply be discarded? Or is it expected that the user will only be drafting one comment at any given time?

Good question, @Jc86035. I don't think we have an answer for this question yet. To make sure it gets addressed, I'm adding this question to the "Open questions" section of the task description.

In the meantime, what would you expect to happen if the comment to which you've drafted a reply gets deleted before you've had the chance to publish said comment?

ppelberg updated the task description. (Show Details)Dec 10 2019, 8:04 PM
ppelberg added a comment.EditedDec 10 2019, 8:14 PM

Update: 10-Dec

Approach to auto-save:
The task description now reflects the below./

For v1.0 of replying, we are planning to take a "disaster recovery" approach (read: sessions storage) to auto-save.

This means if a contributor's browser crashes, the content of their reply will remain "intact" if and when the browser restores the contributors tabs.

This does not mean a contributor's unpublished comment will be retained if they close the browser tab in which said comment was being drafted.

In the future, we will explore a more robust approach to auto-save. #todo @ppelberg create this ticket

ppelberg updated the task description. (Show Details)Dec 10 2019, 8:16 PM
Jc86035 updated the task description. (Show Details)Dec 12 2019, 4:43 PM

In the future, we will explore a more robust approach to auto-save. #todo @ppelberg create this ticket

Aforementioned "ticket": T241404: Implement a way to retain draft comments