Fix Home screen grey background (#45895)
* Add is-product-editor class to body * Add changelog * Move changelog * Fix lint
This commit is contained in:
parent
48fe28b2fd
commit
55f878021e
|
@ -92,9 +92,11 @@ html.interface-interface-skeleton__html-container {
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: $white;
|
.is-product-editor {
|
||||||
|
background-color: $white;
|
||||||
|
|
||||||
&.woocommerce-admin-page.woocommerce_page_wc-admin #wpbody-content {
|
&.woocommerce-admin-page.woocommerce_page_wc-admin #wpbody-content {
|
||||||
min-height: calc(100vh - 96px);
|
min-height: calc(100vh - 96px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ export default function ProductPage() {
|
||||||
const product = useProductEntityRecord( productId );
|
const product = useProductEntityRecord( productId );
|
||||||
|
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
|
document.body.classList.add( 'is-product-editor' );
|
||||||
registerPlugin( 'wc-admin-product-editor', {
|
registerPlugin( 'wc-admin-product-editor', {
|
||||||
// @ts-expect-error 'scope' does exist. @types/wordpress__plugins is outdated.
|
// @ts-expect-error 'scope' does exist. @types/wordpress__plugins is outdated.
|
||||||
scope: 'woocommerce-product-block-editor',
|
scope: 'woocommerce-product-block-editor',
|
||||||
|
@ -74,6 +75,7 @@ export default function ProductPage() {
|
||||||
const unregisterBlocks = initBlocks();
|
const unregisterBlocks = initBlocks();
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
document.body.classList.remove( 'is-product-editor' );
|
||||||
unregisterPlugin( 'wc-admin-more-menu' );
|
unregisterPlugin( 'wc-admin-more-menu' );
|
||||||
unregisterBlocks();
|
unregisterBlocks();
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Fix Home screen grey background #45895
|
Loading…
Reference in New Issue