WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #43316, comment 19


Ignore:
Timestamp:
03/08/2018 06:07:51 PM (4 years ago)
Author:
schlessera
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43316, comment 19

    initial v1  
    11My suggestion is to use a new route `/autosaves` extending the revisions controller.
    22
    3 The concept of an "Autosave" is different to the concept of a "Revision", even though right now, they are technically implemented in a similar manner and store in the same table. That could potentially change at any moment, though. Routes should be modeled after concepts, not how stuff is stored in the DB.
     3The concept of an "Autosave" is different to the concept of a "Revision", even though right now, they are technically implemented in a similar manner and stored in the same table. That could potentially change at any moment, though. Routes should be modeled after concepts, not how stuff is stored in the DB.
    44
    55The `/autosaves` endpoint would be used on the client to "trigger" an autosave. The server then decides how (or if) to store that autosave. The server then emits a response to the client, which could contain contextual data that the client needs to provide needed visual feedback. As an example, it could provide the latest valid autosave (=revision) ID. This can be used on the client to adapt its state.