Skip to content

Enable Heartbeat Post Locking #4331

@adamsilverstein

Description

@adamsilverstein

Issue Overview

Enable heartbeat based post locking functionality.

Work with the existing editor functionality for post locking. Enhance when collaborative editing is available by offering 'Collaborate' as an additional option in the takeover modal and possibly post list options.

Expected Behavior

  • Post locking should work similar to or better than the classic editor's post locking feature: https://codex.wordpress.org/Post_Locking as well as respecting any locking of posts in the classic editor
  • Posts that are being edited are locked to prevent multiple editors overwriting each others changes
  • When you try to open the post the editor is disabled and a modal offers 'go back', 'preview' and 'take over', plus 'collaborate' if collaborative editing is available - the editor remains inactive/inaccessible unless you choose to take over or collaborate.
  • When you are editing a post and another user takes over, a similar modal pops up. Currently you can no longer edit, the only option is to return to the posts list screen. Perhaps this should instead offer collaborate or take over?

Testing

  • Create and edit a post.
  • In a separate browser, log in with a different user. Check post list screen and look for the post lock indicators.
  • Test in the classic editor and Gutenberg.

Current Behavior

  • Posts do not auto lock.
  • Opening a locked post from the classic editor in Gutenberg does not respect the post lock.
  • Opening a locked post in the classic editor with the Gutenberg plugin active and choosing to take over the post does not work correctly - instead of the classic editor, I am taken to the Gutenberg editor.

Screenshots

Some screenshots from the classic editor:

post list lock indicator:

takeover modal, note editor is disabled:

another user took over the post being edited modal, note editor is disabled:

Related Issues and/or PRs

#4218

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backwards CompatibilityIssues or PRs that impact backwards compatability[Feature] SavingRelated to saving functionality[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] EnhancementA suggestion for improvement.[Type] TaskIssues or PRs that have been broken down into an individual action to take

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions