Skip to content

Commit

Permalink
Site Editor: Restore quick inserter 'Browse all' button (#52529)
Browse files Browse the repository at this point in the history
* Site Editor: Restore quick inserter 'Browse all' button

* Remove leftover comment
  • Loading branch information
Mamaduka authored Jul 12, 2023
1 parent fa85e95 commit 56defb4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 0 additions & 4 deletions packages/edit-site/src/components/block-editor/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* External dependencies
*/

/**
* WordPress dependencies
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { useSelect } from '@wordpress/data';
import { useDispatch, useSelect } from '@wordpress/data';
import { useMemo } from '@wordpress/element';
import { store as coreStore } from '@wordpress/core-data';
/**
Expand All @@ -12,15 +12,19 @@ import { unlock } from '../../lock-unlock';
import inserterMediaCategories from './inserter-media-categories';

export default function useSiteEditorSettings( templateType ) {
const { storedSettings, canvasMode } = useSelect( ( select ) => {
const { getSettings, getCanvasMode } = unlock(
select( editSiteStore )
);
return {
storedSettings: getSettings(),
canvasMode: getCanvasMode(),
};
}, [] );
const { setIsInserterOpened } = useDispatch( editSiteStore );
const { storedSettings, canvasMode } = useSelect(
( select ) => {
const { getSettings, getCanvasMode } = unlock(
select( editSiteStore )
);
return {
storedSettings: getSettings( setIsInserterOpened ),
canvasMode: getCanvasMode(),
};
},
[ setIsInserterOpened ]
);

const settingsBlockPatterns =
storedSettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0
Expand Down

1 comment on commit 56defb4

@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 56defb4.
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/5526383332
📝 Reported issues:

Please sign in to comment.