Fix Home screen grey background (#45895)

* Add is-product-editor class to body

* Add changelog

* Move changelog

* Fix lint
This commit is contained in:
Fernando Marichal 2024-04-01 09:50:25 -03:00 committed by GitHub
parent 48fe28b2fd
commit 55f878021e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View File

@ -92,9 +92,11 @@ html.interface-interface-skeleton__html-container {
}
body {
background-color: $white;
.is-product-editor {
background-color: $white;
&.woocommerce-admin-page.woocommerce_page_wc-admin #wpbody-content {
min-height: calc(100vh - 96px);
&.woocommerce-admin-page.woocommerce_page_wc-admin #wpbody-content {
min-height: calc(100vh - 96px);
}
}
}

View File

@ -33,6 +33,7 @@ export default function ProductPage() {
const product = useProductEntityRecord( productId );
useEffect( () => {
document.body.classList.add( 'is-product-editor' );
registerPlugin( 'wc-admin-product-editor', {
// @ts-expect-error 'scope' does exist. @types/wordpress__plugins is outdated.
scope: 'woocommerce-product-block-editor',
@ -74,6 +75,7 @@ export default function ProductPage() {
const unregisterBlocks = initBlocks();
return () => {
document.body.classList.remove( 'is-product-editor' );
unregisterPlugin( 'wc-admin-more-menu' );
unregisterBlocks();
};

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Fix Home screen grey background #45895