diff --git a/packages/js/product-editor/changelog/fix-49697_settings_button_on_mobile b/packages/js/product-editor/changelog/fix-49697_settings_button_on_mobile new file mode 100644 index 00000000000..d8052fd8af0 --- /dev/null +++ b/packages/js/product-editor/changelog/fix-49697_settings_button_on_mobile @@ -0,0 +1,4 @@ +Significance: minor +Type: tweak + +Tweak header styling in description modal editor to address issues with smaller viewports. diff --git a/packages/js/product-editor/src/components/iframe-editor/header-toolbar/header-toolbar.scss b/packages/js/product-editor/src/components/iframe-editor/header-toolbar/header-toolbar.scss index deda3512663..35780aca303 100644 --- a/packages/js/product-editor/src/components/iframe-editor/header-toolbar/header-toolbar.scss +++ b/packages/js/product-editor/src/components/iframe-editor/header-toolbar/header-toolbar.scss @@ -31,8 +31,8 @@ align-items: center; display: flex; - .woocommerce-iframe-editor-document-tools { - &__left { + .components-accessible-toolbar { + .woocommerce-iframe-editor-document-tools__left { align-items: center; display: inline-flex; gap: 8px; diff --git a/packages/js/product-editor/src/components/iframe-editor/iframe-editor.scss b/packages/js/product-editor/src/components/iframe-editor/iframe-editor.scss index 2c92e08edb6..7208bc412d2 100644 --- a/packages/js/product-editor/src/components/iframe-editor/iframe-editor.scss +++ b/packages/js/product-editor/src/components/iframe-editor/iframe-editor.scss @@ -75,4 +75,10 @@ display: none; } } + + .woocommerce-iframe-editor__header-right + .interface-pinned-items + .components-button { + display: flex; + } } diff --git a/packages/js/product-editor/src/components/iframe-editor/iframe-editor.tsx b/packages/js/product-editor/src/components/iframe-editor/iframe-editor.tsx index 1edeb2cd7c0..a9d2649e1ef 100644 --- a/packages/js/product-editor/src/components/iframe-editor/iframe-editor.tsx +++ b/packages/js/product-editor/src/components/iframe-editor/iframe-editor.tsx @@ -30,7 +30,6 @@ import { // eslint-disable-next-line @woocommerce/dependency-group import { ComplementaryArea, - store as interfaceStore, // @ts-expect-error No types for this exist yet. } from '@wordpress/interface'; @@ -118,18 +117,12 @@ export function IframeEditor( { return select( blockEditorStore ).getSettings(); }, [] ); - const { hasFixedToolbar, isRightSidebarOpen } = useSelect( ( select ) => { + const { hasFixedToolbar } = useSelect( ( select ) => { // @ts-expect-error These selectors are available in the block data store. const { get: getPreference } = select( preferencesStore ); - // @ts-expect-error These selectors are available in the interface data store. - const { getActiveComplementaryArea } = select( interfaceStore ); - return { hasFixedToolbar: getPreference( 'core', 'fixedToolbar' ), - isRightSidebarOpen: getActiveComplementaryArea( - SIDEBAR_COMPLEMENTARY_AREA_SCOPE - ), }; }, [] ); @@ -264,11 +257,9 @@ export function IframeEditor( { bounds. */ }
- { isRightSidebarOpen && ( - - ) } +
{ /* @ts-expect-error 'scope' does exist. @types/wordpress__plugins is outdated. */ }