-
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.
Site Editor: Add ability to focus on editing a page's content vs the …
…page's template (#50857) * Add ability to prevent editing blocks using useBlockEditingMode() * Make useBlockEditingMode use context * Remove rootBlockEditingMode setting * Fix private createRegistrySelector selectors * Consolidate templateLock=contentOnly logic into getBlockEditingMode * Hide disabled blocks from List View * Hide disabled blocks from breadcrumbs * Add doc comments * Add unit tests * Use @typedef to document mode param * Restore packages/components/package.json from trunk * Restore packages/block-library/src/post-title/edit.js from trunk * Move BlockListBlockContext out of block.js so that it exists on mobile platforms * Site Editor: Add ability to focus on editing a page's content vs the page's template * Show page information in DocumentActions * Implement Content panel * Prevent block overlay on disabled blocks * Fix Navigation block being selectable * Show 'Page' in breadcrumbs when focused on editing page * Update post title, post featured image, and post content blocks to say 'Page' instead of 'Post' * toolbar title styling * Remove removePostFromContentBlockLabels for now * Fix being able to select text within disabled blocks * Hide BlockAppender when block is disabled * Fix comments block in non-post templates * Update template card selector in E2E tests * Fix 'Add submenu' button in Navigation block * Remove unhelpful comments * Remove more unnecessary comments * Use constant for block types array * Use BEMish selectors * Be explicit that we're switching away from the page lock * Update removePageFromBlockContext() test * Fix post context from appearing in Edit Template preview We have to set postId and postType to null for the preview and omit them in the editor. No point having helper methods, therefore. * Clear block selection when switching from template focus to page focus * Prevent insertion into a disabled block * Don't allow removing and moving children of disabled blocks * Work around @wordpress/data bug by not using createRegistrySelector() for now * Fix typo * Fix select() mock * Fix block-editor selector tests * Revert block-editor changes * Improve useDisableNonContentBlocks performance * Fix performance tests --------- Co-authored-by: Saxon Fletcher <[email protected]> Co-authored-by: ramon <[email protected]>
- Loading branch information
1 parent
6b626b2
commit 362475d
Showing
32 changed files
with
969 additions
and
183 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
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.
1 comment
on commit 362475d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flaky tests detected in 362475d.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5152237939
📝 Reported issues:
- [Flaky Test] should allow to return Global Styles root when example is clicked #50799 in
/test/e2e/specs/site-editor/style-book.spec.js
- [Flaky Test] should disable toolbar buttons when open #50837 in
/test/e2e/specs/site-editor/style-book.spec.js
- [Flaky Test] should have tabs containing block examples #50838 in
/test/e2e/specs/site-editor/style-book.spec.js
For me this selector is a bit weird, can't we instead rely on the existing "context" selector?
Ideally, we'd make some updates to the reducer/selectors to bring more clarity to what is being edited in the site editor, it's kind of a mess now.