Autosave and Post Locking Update
Today we had our first scheduled meeting.
Consensus was, for a first pass:
- Display a simple lock/padlock icon next to locked posts within the post list screen, leaving the “Request Lock” button for the post edit screens.
- When a post is locked, hide the Quick Edit link, and disable batch edit for the post
- To unlock a post, the user will enter the post edit screen, then click a button to request a lock. This will trigger a request to appear for the user with the current lock, where they can decide whether or not to allow the new lock.
As far as development tasks go, @azaozz is planning on finishing a first run at the “Heartbeat” API to be committed before the end of the week. I’ll begin working on the list table changes for post listings. We’re currently looking for volunteers to aid, as there’s plenty of room for help! Additional tasks will include the UI for handling post lock requests and auto-save to local storage.
We’ll certainly chat more about this tomorrow in dev chat, and are planning another meeting this Friday (2013–01–25), at 21:00 UTC (the same time as dev chat), unless this doesn’t work for many of you looking to help. Please post here, or come to the chats if you’re interested in helping with this project, and we’ll get in touch with you for further details!
John Saddington 12:20 pm on January 23, 2013 Permalink | Log in to Reply
fantastic. i’m on pins waiting for this implementation. can’t wait!
mindctrl 3:25 pm on January 23, 2013 Permalink | Log in to Reply
The idea for implementing post locking is for a person to manually click a Request Lock button in the edit post screen? Would that show up on all installs or only installs that are multi-author? Why not automatically lock a post when editing it so the workflow is streamlined?
Andrew Ozz 4:32 pm on January 23, 2013 Permalink | Log in to Reply
Good questions. The Request/Take over a lock button will only show when the same post is being edited by another user. Under normal circumstances posts would never be locked on installs with only one user. However if the user opens the same post on two different devices (computers) or in two different browsers, the first instance should lock the second. That should also happen if several people use the same user account.
We already monitor when a post is being edited and show a warning. The purpose of the enhancements is to actually prevent saving a post from two different places simultaneously.
mindctrl 5:59 pm on January 23, 2013 Permalink | Log in to Reply
Thanks for the clarification. Sounds great.
Will this be implemented in the mobile apps? I’m wondering what would happen if someone tried editing a locked post from a smartphone or tablet, and would those devices be able to lock and/or take over a locked post?
Mike Schroder 6:22 pm on January 23, 2013 Permalink | Log in to Reply
That’s the idea — you’d get the lock automatically if the post isn’t locked by anyone. Then, if it’s already locked, you have the option to request the lock from the author that holds it. The feature would still exist on single-author installs, but you wouldn’t notice it, because you’d be the only one able to hold locks.
[edit] Previous comments weren’t showing when I typed this. @azaozz‘s comments above explain further
[/edit]
Mark Jaquith 8:52 pm on January 23, 2013 Permalink | Log in to Reply
Unless I’m misunderstanding, this approach seems like it could result in posts becoming permanently locked.
1. Open post for editing
2. Walk away
3. ???
4. Profit
Mike Schroder 9:18 pm on January 23, 2013 Permalink | Log in to Reply
To resolve this issue, we’ve talked about including a concept of activity via keystrokes and maybe mouse movement to maintain the lock assignment (otherwise, a user would lose the lock after X amount of inactivity).
Andrew Ozz 7:49 pm on January 25, 2013 Permalink | Log in to Reply
We can also monitor user activity comparing autosaves to the server. If there are no changes for x minutes, user is inactive. Maybe we can set another flag for “user-active” in the post lock and toggle it based on autosaves.