Save them in localStorage like Phabricator so they can resume later (also helps when topic is re-rendered - i.e. T73072: Flow: Submitting 1 reply will delete any other reply-text-areas currently open in the same Topic)
Description
Details
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/extensions/Flow | master | +137 -15 | Autosave comments |
Related Objects
- Mentioned In
- T221902: Flow: Issues with recovered unsaved changes warning
T73072: Flow: Submitting 1 reply will delete any other reply-text-areas currently open in the same Topic - Mentioned Here
- T221902: Flow: Issues with recovered unsaved changes warning
T73072: Flow: Submitting 1 reply will delete any other reply-text-areas currently open in the same Topic
Event Timeline
VE now has an API for this (ve.dm.Surface#startStoringChanges). It uses sessionStorage, as we are worried about storage limits with multiple large documents, but that could easily be switched to localStoarge - but sessionStorage is good enough for crash recovery.
Change 505392 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Flow@master] Autosave comments
Change 505392 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Autosave comments
Since this has been marked for inclusion in Tech News:
Do we know when it'll be in production? (If not: Do we have a rough idea?)
Just to be on the safe side: This is about autosaving comments being written in Structured Discussions?
Do we know when it'll be in production? (If not: Do we have a rough idea?)
Will be in next week's train (there was no train this week), so Tuesday 30th - Thursday 2nd.
Just to be on the safe side: This is about autosaving comments being written in Structured Discussions?
Yes. For the time being it is only persisted in session storage (which is the same as what VE does).
Checked in betalabs - works as expected (closing T73072: Flow: Submitting 1 reply will delete any other reply-text-areas currently open in the same Topic as Resolved too). I added the task to the post-deployment list of bugs to check in production.
minor observations:
(1) "Your unsaved changes have been automatically recovered" - as a user I have no idea that clicking on 'Reply' for one post (with some text in other Reply areas) triggers such sophisticated response about recovering unsaved changes. Since users see text they entered unchanged and still present, the message feels a little bit too technical and unnecessary.
(2) After "Your unsaved changes have been automatically recovered" message appears, the open Reply areas need additional input to make 'Reply' button active again.
(3) Open three Reply areas - do not enter any text in it and click on 'Reply' again and agian - the message will be triggered.
I file (2) and (3) into as a new task - T221902: Flow: Issues with recovered unsaved changes warning since the above issues are outside the scope of this task.