From e4c7537018390edc7251b3ac15730cc7e961240c Mon Sep 17 00:00:00 2001 From: Vrishabhsk Date: Fri, 25 Oct 2024 14:06:06 +0400 Subject: [PATCH 1/4] Add style to fix scrollbar overlapping with close button --- .../src/components/editor-canvas-container/style.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/edit-site/src/components/editor-canvas-container/style.scss b/packages/edit-site/src/components/editor-canvas-container/style.scss index 0bdbc2bbe32355..332c4cd1235ed1 100644 --- a/packages/edit-site/src/components/editor-canvas-container/style.scss +++ b/packages/edit-site/src/components/editor-canvas-container/style.scss @@ -32,4 +32,12 @@ top: $grid-unit-10; z-index: 2; background: $white; + + // Prevents Scrollbar overlapping the close button when viewing revisions. + &[aria-label="Close revisions"] { + position: relative; + top: 0; + margin: 8px 0; + left: calc(100% - #{$grid-unit-50}); + } } From 62f33f599f6eb40524545f690bd3f863999ca998 Mon Sep 17 00:00:00 2001 From: Vrishabhsk Date: Mon, 28 Oct 2024 17:36:34 +0400 Subject: [PATCH 2/4] Add support for className prop --- .../src/components/editor-canvas-container/index.js | 13 ++++++++++++- .../edit-site/src/components/revisions/index.js | 1 + .../edit-site/src/components/style-book/index.js | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/editor-canvas-container/index.js b/packages/edit-site/src/components/editor-canvas-container/index.js index ac1083e69abd7e..e4629fcd480750 100644 --- a/packages/edit-site/src/components/editor-canvas-container/index.js +++ b/packages/edit-site/src/components/editor-canvas-container/index.js @@ -17,6 +17,11 @@ import { privateApis as editorPrivateApis, } from '@wordpress/editor'; +/** + * External dependencies + */ +import clsx from 'clsx'; + /** * Internal dependencies */ @@ -46,6 +51,7 @@ function getEditorCanvasContainerTitle( view ) { function EditorCanvasContainer( { children, + className, closeButtonLabel, onClose, enableResizing = false, @@ -114,7 +120,12 @@ function EditorCanvasContainer( { return ( -
+
{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }