Skip to content

Commit

Permalink
Block Directory: Remove 'edit-post' package dependency (#63349)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
  • Loading branch information
3 people committed Jul 10, 2024
1 parent b4711e7 commit 28e9e41
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/block-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@wordpress/compose": "file:../compose",
"@wordpress/core-data": "file:../core-data",
"@wordpress/data": "file:../data",
"@wordpress/edit-post": "file:../edit-post",
"@wordpress/editor": "file:../editor",
"@wordpress/element": "file:../element",
"@wordpress/hooks": "file:../hooks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
import { _n, sprintf } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { blockDefault } from '@wordpress/icons';
import { PluginPrePublishPanel } from '@wordpress/editor';

/**
* Internal dependencies
*/
import CompactList from '../../components/compact-list';
import { store as blockDirectoryStore } from '../../store';

// We shouldn't import the editor package directly
// because it would include the wp-editor in all pages loading the block-directory script.
const { PluginPrePublishPanel } = window?.wp?.editor ?? {};

export default function InstalledBlocksPrePublishPanel() {
const newBlockTypes = useSelect(
( select ) => select( blockDirectoryStore ).getNewBlockTypes(),
Expand Down

1 comment on commit 28e9e41

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 28e9e41.
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/9874252168
📝 Reported issues:

Please sign in to comment.