-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update: Move template areas into a panel. #62033
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -25,8 +25,6 @@ import { | |||||||||||||||
getCurrentPost, | ||||||||||||||||
__experimentalGetDefaultTemplatePartAreas, | ||||||||||||||||
} from './selectors'; | ||||||||||||||||
import { TEMPLATE_PART_POST_TYPE } from './constants'; | ||||||||||||||||
import { getFilteredTemplatePartBlocks } from './utils/get-filtered-template-parts'; | ||||||||||||||||
import { getEntityActions as _getEntityActions } from '../dataviews/store/private-selectors'; | ||||||||||||||||
|
||||||||||||||||
const EMPTY_INSERTION_POINT = { | ||||||||||||||||
|
@@ -120,29 +118,6 @@ export const getPostIcon = createRegistrySelector( | |||||||||||||||
} | ||||||||||||||||
); | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Returns the template parts and their blocks for the current edited template. | ||||||||||||||||
* | ||||||||||||||||
* @param {Object} state Global application state. | ||||||||||||||||
* @return {Array} Template parts and their blocks in an array. | ||||||||||||||||
*/ | ||||||||||||||||
export const getCurrentTemplateTemplateParts = createRegistrySelector( | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This selector is still "aliased" in the site editor store and triggers an error now. Should we also remove it? gutenberg/packages/edit-site/src/store/selectors.js Lines 241 to 247 in 387acef
|
||||||||||||||||
( select ) => () => { | ||||||||||||||||
const templateParts = select( coreStore ).getEntityRecords( | ||||||||||||||||
'postType', | ||||||||||||||||
TEMPLATE_PART_POST_TYPE, | ||||||||||||||||
{ per_page: -1 } | ||||||||||||||||
); | ||||||||||||||||
|
||||||||||||||||
const clientIds = | ||||||||||||||||
select( blockEditorStore ).getBlocksByName( 'core/template-part' ); | ||||||||||||||||
const blocks = | ||||||||||||||||
select( blockEditorStore ).getBlocksByClientId( clientIds ); | ||||||||||||||||
|
||||||||||||||||
return getFilteredTemplatePartBlocks( blocks, templateParts ); | ||||||||||||||||
} | ||||||||||||||||
); | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Returns true if there are unsaved changes to the | ||||||||||||||||
* post's meta fields, and false otherwise. | ||||||||||||||||
|
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.
Why are we passing renderingMode here, can't we just select it within the component?