From 2b3dec66bc073812feca2191063e7bbeab16b4eb Mon Sep 17 00:00:00 2001 From: James Koster Date: Fri, 24 May 2024 16:19:08 +0100 Subject: [PATCH 1/6] Make post meta row button treatments consistent --- .../editor/src/components/post-discussion/panel.js | 3 +-- .../src/components/post-discussion/style.scss | 4 +--- .../editor/src/components/post-panel-row/style.scss | 13 +++++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/editor/src/components/post-discussion/panel.js b/packages/editor/src/components/post-discussion/panel.js index 4812b021a6e6b3..718754d56857aa 100644 --- a/packages/editor/src/components/post-discussion/panel.js +++ b/packages/editor/src/components/post-discussion/panel.js @@ -6,7 +6,6 @@ import { Dropdown, Button, __experimentalVStack as VStack, - __experimentalText as Text, } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; import { useState, useMemo } from '@wordpress/element'; @@ -81,7 +80,7 @@ function PostDiscussionToggle( { isOpen, onClick } ) { aria-expanded={ isOpen } onClick={ onClick } > - { label } + { label } ); } diff --git a/packages/editor/src/components/post-discussion/style.scss b/packages/editor/src/components/post-discussion/style.scss index b1eae851402859..b2d65c9aa7cf3f 100644 --- a/packages/editor/src/components/post-discussion/style.scss +++ b/packages/editor/src/components/post-discussion/style.scss @@ -13,9 +13,7 @@ } } .editor-post-discussion__panel-toggle { - &.components-button { - height: auto; - } + .components-text { color: inherit; } diff --git a/packages/editor/src/components/post-panel-row/style.scss b/packages/editor/src/components/post-panel-row/style.scss index 22d0cbbb644d8a..d229e77e4d1059 100644 --- a/packages/editor/src/components/post-panel-row/style.scss +++ b/packages/editor/src/components/post-panel-row/style.scss @@ -18,4 +18,17 @@ min-height: $grid-unit-40; display: flex; align-items: center; + + .components-button { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: inline-block; + max-width: 100%; + } + + .components-dropdown, + .editor-post-author__panel-dropdown { + max-width: 100%; + } } From 55ea136bb3b15bae3184bc40439303bb53929726 Mon Sep 17 00:00:00 2001 From: James Koster Date: Fri, 24 May 2024 16:25:04 +0100 Subject: [PATCH 2/6] Remove date button overrides --- .../editor/src/components/post-schedule/style.scss | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/editor/src/components/post-schedule/style.scss b/packages/editor/src/components/post-schedule/style.scss index 0b9d64a9ce1407..02ea48016f9696 100644 --- a/packages/editor/src/components/post-schedule/style.scss +++ b/packages/editor/src/components/post-schedule/style.scss @@ -8,14 +8,3 @@ padding: $grid-unit-20; } } - -.editor-post-schedule__dialog-toggle.components-button { - overflow: hidden; - text-align: left; - white-space: unset; - height: auto; - min-height: $button-size-compact; - - // The line height + the padding should be the same as the button size. - line-height: inherit; -} From 37c00bbceed51f5cc7b32a4724daacdeeff7b909 Mon Sep 17 00:00:00 2001 From: James Koster Date: Fri, 24 May 2024 16:58:34 +0100 Subject: [PATCH 3/6] Remove truncation --- packages/editor/src/components/post-panel-row/style.scss | 8 ++++---- packages/editor/src/components/post-url/style.scss | 9 --------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/editor/src/components/post-panel-row/style.scss b/packages/editor/src/components/post-panel-row/style.scss index d229e77e4d1059..6f3977936da852 100644 --- a/packages/editor/src/components/post-panel-row/style.scss +++ b/packages/editor/src/components/post-panel-row/style.scss @@ -20,11 +20,11 @@ align-items: center; .components-button { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: inline-block; max-width: 100%; + text-align: left; + text-wrap: pretty; + height: auto; + min-height: $button-size-compact; } .components-dropdown, diff --git a/packages/editor/src/components/post-url/style.scss b/packages/editor/src/components/post-url/style.scss index c622cfce33f90e..a711402f1a82eb 100644 --- a/packages/editor/src/components/post-url/style.scss +++ b/packages/editor/src/components/post-url/style.scss @@ -2,15 +2,6 @@ width: 100%; } -.components-button.editor-post-url__panel-toggle { - display: block; - max-width: 100%; - overflow: hidden; - text-align: left; - text-overflow: ellipsis; - white-space: nowrap; -} - .editor-post-url__panel-dialog .editor-post-url { // sidebar width - popover padding - form margin min-width: $sidebar-width - $grid-unit-20 - $grid-unit-20; From 5d03910be5ec0d8b923b6bea8f6c58ec357efd7d Mon Sep 17 00:00:00 2001 From: James Koster Date: Tue, 28 May 2024 16:13:10 +0100 Subject: [PATCH 4/6] Fix alignment --- packages/editor/src/components/post-panel-row/style.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/editor/src/components/post-panel-row/style.scss b/packages/editor/src/components/post-panel-row/style.scss index 6f3977936da852..c3994c732a8a5b 100644 --- a/packages/editor/src/components/post-panel-row/style.scss +++ b/packages/editor/src/components/post-panel-row/style.scss @@ -11,6 +11,8 @@ min-height: $grid-unit-40; display: flex; align-items: center; + padding: 6px 0; // Matches button to ensure alignment + line-height: $grid-unit-05 * 5; } .editor-post-panel__row-control { From db143d9207c09dc0559d21baf1946cf4e5e6eea9 Mon Sep 17 00:00:00 2001 From: James Koster Date: Wed, 29 May 2024 17:09:45 +0100 Subject: [PATCH 5/6] Remove duplicative style --- packages/editor/src/components/post-panel-row/style.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/editor/src/components/post-panel-row/style.scss b/packages/editor/src/components/post-panel-row/style.scss index c3994c732a8a5b..79ad7f1f9b622e 100644 --- a/packages/editor/src/components/post-panel-row/style.scss +++ b/packages/editor/src/components/post-panel-row/style.scss @@ -29,8 +29,7 @@ min-height: $button-size-compact; } - .components-dropdown, - .editor-post-author__panel-dropdown { + .components-dropdown { max-width: 100%; } } From d570d65fcc5c04e036626e7a2b7442780b278363 Mon Sep 17 00:00:00 2001 From: James Koster Date: Thu, 30 May 2024 11:30:33 +0100 Subject: [PATCH 6/6] Use hyphens --- packages/editor/src/components/post-panel-row/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor/src/components/post-panel-row/style.scss b/packages/editor/src/components/post-panel-row/style.scss index 79ad7f1f9b622e..baa7d7dd98977d 100644 --- a/packages/editor/src/components/post-panel-row/style.scss +++ b/packages/editor/src/components/post-panel-row/style.scss @@ -13,6 +13,7 @@ align-items: center; padding: 6px 0; // Matches button to ensure alignment line-height: $grid-unit-05 * 5; + hyphens: auto; } .editor-post-panel__row-control {