Fix editor header hidden in Firefox (#38247)
* Update page config to add support for layout header/footer * Fix lint error
This commit is contained in:
parent
5d6b3d5ceb
commit
2843fbb7a8
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: update
|
||||
|
||||
Remove css unrelated to the product block editor.
|
|
@ -101,9 +101,3 @@
|
|||
display: none; // use important or increase specificity.
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-layout:has( .woocommerce-product-block-editor ) {
|
||||
.woocommerce-layout__header {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,6 +182,9 @@ export const getPages = () => {
|
|||
navArgs: {
|
||||
id: 'woocommerce-add-product',
|
||||
},
|
||||
layout: {
|
||||
header: false,
|
||||
},
|
||||
wpOpenMenu: 'menu-posts-product',
|
||||
capability: 'manage_woocommerce',
|
||||
} );
|
||||
|
@ -196,6 +199,9 @@ export const getPages = () => {
|
|||
navArgs: {
|
||||
id: 'woocommerce-edit-product',
|
||||
},
|
||||
layout: {
|
||||
header: false,
|
||||
},
|
||||
wpOpenMenu: 'menu-posts-product',
|
||||
capability: 'manage_woocommerce',
|
||||
} );
|
||||
|
|
|
@ -185,7 +185,8 @@ function _Layout( {
|
|||
);
|
||||
}
|
||||
|
||||
const { breadcrumbs } = page;
|
||||
const { breadcrumbs, layout = { header: true, footer: true } } = page;
|
||||
const { header: showHeader = true, footer: showFooter = true } = layout;
|
||||
|
||||
const query = Object.fromEntries(
|
||||
new URLSearchParams( location && location.search )
|
||||
|
@ -199,15 +200,17 @@ function _Layout( {
|
|||
>
|
||||
<SlotFillProvider>
|
||||
<div className="woocommerce-layout">
|
||||
<Header
|
||||
sections={
|
||||
isFunction( breadcrumbs )
|
||||
? breadcrumbs( { match } )
|
||||
: breadcrumbs
|
||||
}
|
||||
isEmbedded={ isEmbedded }
|
||||
query={ query }
|
||||
/>
|
||||
{ showHeader && (
|
||||
<Header
|
||||
sections={
|
||||
isFunction( breadcrumbs )
|
||||
? breadcrumbs( { match } )
|
||||
: breadcrumbs
|
||||
}
|
||||
isEmbedded={ isEmbedded }
|
||||
query={ query }
|
||||
/>
|
||||
) }
|
||||
<TransientNotices />
|
||||
{ ! isEmbedded && (
|
||||
<PrimaryLayout>
|
||||
|
@ -226,7 +229,7 @@ function _Layout( {
|
|||
<WCPayUsageModal />
|
||||
</Suspense>
|
||||
) }
|
||||
<Footer />
|
||||
{ showFooter && <Footer /> }
|
||||
<CustomerEffortScoreModalContainer />
|
||||
</div>
|
||||
<PluginArea scope="woocommerce-admin" />
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Add support for `showHeader` config in router config to hide header if needed.
|
Loading…
Reference in New Issue