Closed Bug 1264314 Opened 8 years ago Closed 7 years ago

Alert user if page content has changed since their last draft

Categories

(developer.mozilla.org Graveyard :: Editing, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: shobson, Unassigned)

Details

(Keywords: in-triage)

When the user restores a saved draft it restores the entire page contents, not just what they changed. The potential exists for restoring a saved draft to over-write a different user's changes to the page.

We should alert the user if changes have been made to the page since their draft was saved and encourage them to discard it.
Severity: normal → enhancement
Keywords: in-triage
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/b5e34e76a9170f423b2305f62a1acb82e3d420e6
Add revision tracking to drafts, remove button, remove from new page

The goal of this PR is to make the auto save drafting feature reliable.

Fix Bug 1264314: Alert user if page content has changed since last draft
- revision ID is now saved when draft saved
- displays warning message if revision ID is old
- displays note if revision ID is old
Fix Bug 1298399: Remove ?document_saved
- query variable now includes revision ID of draft to delete
- query variable now directly consumed by javascript
- query variable new removed after draft deleted
Fix Bug 1268906: Tool bar buttons now trigger draft saves
- changed listener from 'key' to 'change'
Fix Bug 1274067: No new drafts created after discarding page
- disabled autosave after discard button clicked
Fix Bug 1269851: Save draft should not wait for typing break to save
- added throttled call to autosave every 500ms
- reduced debounce autosave to 500ms, to catch edits made after throttle
Fix Bug 1301656: Remove draft feature from new page creation
- removed draft widget from new pages
- changed data format for new translation pages to retain drafts there

Also:
- autosave now enabled by default even with saved draft
-- removed need to discard saved draft
- separated draft functionality into a new file
- new utility function to get query strings by variable name
- added some analytics instrumentation
- standardized draft storage formats for non-English pages
-- migrated old draft formats to new storage format
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.