Skip to content

Commit

Permalink
Show metabox when pattern is accessed directly (#68255)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: stokesman <presstoke@git.wordpress.org>
  • Loading branch information
3 people authored Dec 25, 2024
1 parent e5bc2a1 commit f226f7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/edit-post/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ function Layout( {
const isRenderingPostOnly = getRenderingMode() === 'post-only';
const isNotDesignPostType =
! DESIGN_POST_TYPES.includes( currentPostType );
const isDirectlyEditingPattern =
currentPostType === 'wp_block' &&
! onNavigateToPreviousEntityRecord;

return {
mode: getEditorMode(),
Expand All @@ -417,7 +420,9 @@ function Layout( {
!! select( blockEditorStore ).getBlockSelectionStart(),
showIconLabels: get( 'core', 'showIconLabels' ),
isDistractionFree: get( 'core', 'distractionFree' ),
showMetaBoxes: isNotDesignPostType && ! isZoomOut(),
showMetaBoxes:
( isNotDesignPostType && ! isZoomOut() ) ||
isDirectlyEditingPattern,
isWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),
templateId:
supportsTemplateMode &&
Expand All @@ -435,6 +440,7 @@ function Layout( {
currentPostId,
isEditingTemplate,
settings.supportsTemplateMode,
onNavigateToPreviousEntityRecord,
]
);
useMetaBoxInitialization( hasActiveMetaboxes );
Expand Down

1 comment on commit f226f7b

@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 f226f7b.
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/12489622989
📝 Reported issues:

Please sign in to comment.