-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable post locking in Gutenberg (#4217)
* Enable post locking via the heartbeat api, following core * remove interval change * Docblock updates * revert unintended changes * remove nonce handling * rename file & setup * Ensure heartbeat interval is low enough to work for post locking * Unlock the post when the window is closed or exited. * Fixes for eslint * tabs not spaces * post locking WIP * modal on load first pass * Fixes for phpunit * Enable a Modal showCloseIcon property * Add a post locked modal, first pass * Add an “isPostLocked” selector * Add a locked reducer * action is ‘lockPost’ and takes a boolean * fixes for phpunit * cleanup hearbeat post locking * Show the post locked modal when the post is locked * spaces for phpcs * passed lock & user at initialization * update inline docs * pass a unlocking lockNonce to settings if the post is locked * Lock modal actions, first pass; leverage existing PostPreviewButton * note previews open in a new tab, unlike classic editor where it happens in the main window * Add some style * improve modal string construction, nonce setup, linting fixes * better setup, fix beforeunload * complete takeover action logic * update core data readme * Complete takeover action, reaction * alignment for eslint * Add the lock details to the lockPost dispatch * Ensure modal header can display an icon when passed its src * modal icon img styles * Improve post lock modal, improve all posts url construction * Add lockedDetails to the lockPost action * add lockDetails to the locked reducer * new selector: getLockDetails * Add avatgar data for existing locks * dispatch an autosave when the post is taken over * Fix for phpcs, also smaller gravatar size x2 display * Add docs for getLockDetails * improve post locking modal style to match designs * switch ajaxurl from global to editor settings * Don’t hide the modal title - display it above the existing content * import { setupHearthbeatPostLocking } from '@wordpress/editor'; * complete move of setupHearthbeatPostLocking to editor package * showCloseIcon -> isDismissable * post lock modal - switch to withSelect * Revert "post lock modal - switch to withSelect" This reverts commit 2c1fcf0. * modal cleanup and withSelect rework * improve avatar image alignment * Use a href links instead of action handlers for buttons * no closing * Try moving to editor package * Revert "Try moving to editor package" This reverts commit ca9fa60. * remove inner buttons, not needed * clean up modal imports * improve heartbeat post locking setup * docs update * more docs cleanup * Fixes for phpcs * Remove specific Modal Header Icon * Move the PostLockedModal to the editor module * Styles cleaning for the post locked modal * Post Lock: Clarifying the lock state * Move post locking setup to the post locked modal component * Remove unnecessary exposed function * cleanup after merge * fixes for phpcs * docs cleanup * cleanup after merge * Adjust the modal display with latest language, formatting and post type * spacing * restore heartbeat settings after merge * Add e2e tests for the post locking modal * Revert "Add e2e tests for the post locking modal" This reverts commit 1f53d95. * Fix i18n of the post lock modal message and tweak docs * Try fixing the release post issue * include and use an unclock nonce * Remove the heartbeat interval tweak * Code style and documentation tweaks * i18n: Drop untranslatable `postType` interpolation. * i18n: Separate strings for more versatile translation
- Loading branch information
1 parent
590cf72
commit 37bd1e6
Showing
17 changed files
with
515 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.