From e321b5af6d95884bc38cbd27890753255b477f6a Mon Sep 17 00:00:00 2001 From: VATALIYA PARTH <88878890+PARTHVATALIYA@users.noreply.github.com> Date: Wed, 25 Sep 2024 22:30:47 +0530 Subject: [PATCH] Fix: Button Replace remaining 40px default size violations [Block Editor 5] (#65361) * Fix: inspector control tabs to use 40px default button size * Fix: inspector popover header to use 40px default button size * Fix: link control to use 40px default button size * Fix: list view to use 40px default button size * Fix: media placeholder to use 40px default button size * Add size attribute to inspector popover header and list view * Revert the changes for submit button * Replace button component * Remove override CSS * Remove __next40pxDefaultSize prop Co-authored-by: Marco Ciampini * Remove __next40pxDefaultSize prop Co-authored-by: Marco Ciampini --------- Co-authored-by: PARTHVATALIYA Co-authored-by: getdave Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo Co-authored-by: tyxla --- .../src/components/block-inspector/style.scss | 2 + .../inspector-controls-tabs/index.js | 41 ++++++++++--------- .../inspector-popover-header/index.js | 6 +-- .../inspector-popover-header/style.scss | 13 ------ .../src/components/link-control/index.js | 6 +-- .../link-control/settings-drawer.js | 3 +- .../list-view/block-select-button.js | 7 +--- .../src/components/list-view/style.scss | 9 ++++ .../src/components/media-placeholder/index.js | 18 +++----- 9 files changed, 45 insertions(+), 60 deletions(-) diff --git a/packages/block-editor/src/components/block-inspector/style.scss b/packages/block-editor/src/components/block-inspector/style.scss index bdbf3660d9619..92a9a0dd03ab3 100644 --- a/packages/block-editor/src/components/block-inspector/style.scss +++ b/packages/block-editor/src/components/block-inspector/style.scss @@ -49,4 +49,6 @@ .block-editor-block-inspector__tab-item { flex: 1 1 0px; + display: flex; + justify-content: center; } diff --git a/packages/block-editor/src/components/inspector-controls-tabs/index.js b/packages/block-editor/src/components/inspector-controls-tabs/index.js index 601854373b7eb..c8d9536aeb9ca 100644 --- a/packages/block-editor/src/components/inspector-controls-tabs/index.js +++ b/packages/block-editor/src/components/inspector-controls-tabs/index.js @@ -2,7 +2,8 @@ * WordPress dependencies */ import { - Button, + Icon, + Tooltip, privateApis as componentsPrivateApis, } from '@wordpress/components'; import { store as preferencesStore } from '@wordpress/preferences'; @@ -43,27 +44,27 @@ export default function InspectorControlsTabs( {
- { tabs.map( ( tab ) => ( - + showIconLabels ? ( + + { tab.title } + + ) : ( + + - { showIconLabels && tab.title } - - } - /> - ) ) } + + + + ) + ) } diff --git a/packages/block-editor/src/components/inspector-popover-header/index.js b/packages/block-editor/src/components/inspector-popover-header/index.js index d543ab0298cc6..cf6bf0d3d6796 100644 --- a/packages/block-editor/src/components/inspector-popover-header/index.js +++ b/packages/block-editor/src/components/inspector-popover-header/index.js @@ -31,8 +31,7 @@ export default function InspectorPopoverHeader( { { actions.map( ( { label, icon, onClick } ) => ( + ); } diff --git a/packages/block-editor/src/components/list-view/style.scss b/packages/block-editor/src/components/list-view/style.scss index 3ad6d3bd4aab5..297fb9d0a6a2e 100644 --- a/packages/block-editor/src/components/list-view/style.scss +++ b/packages/block-editor/src/components/list-view/style.scss @@ -216,6 +216,15 @@ text-align: left; position: relative; white-space: nowrap; + border-radius: 2px; + box-sizing: border-box; + color: inherit; + font-family: inherit; + font-size: 13px; + font-weight: 400; + margin: 0; + text-decoration: none; + transition: box-shadow 0.1s linear; .components-modal__content & { padding-left: 0; diff --git a/packages/block-editor/src/components/media-placeholder/index.js b/packages/block-editor/src/components/media-placeholder/index.js index 4d41289f324c0..9482c9f418174 100644 --- a/packages/block-editor/src/components/media-placeholder/index.js +++ b/packages/block-editor/src/components/media-placeholder/index.js @@ -87,8 +87,7 @@ const URLSelectionUI = ( { src, onChangeSrc, onSelectURL } ) => { return (