From 1887a2600d6d98b55563e14fa63a36236bc706bc Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 20 Nov 2023 14:15:48 +0100 Subject: [PATCH 1/5] Post Schedule Panel: Remove text overflow ellipsis --- packages/editor/src/components/post-panel-row/index.js | 4 +++- .../editor/src/components/post-panel-row/style.scss | 10 ++++++++-- .../editor/src/components/post-schedule/style.scss | 6 +++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/editor/src/components/post-panel-row/index.js b/packages/editor/src/components/post-panel-row/index.js index a746486ea25f64..0571fc2967a939 100644 --- a/packages/editor/src/components/post-panel-row/index.js +++ b/packages/editor/src/components/post-panel-row/index.js @@ -12,7 +12,9 @@ import { forwardRef } from '@wordpress/element'; const PostPanelRow = forwardRef( ( { className, label, children }, ref ) => { return ( { label ? ( diff --git a/packages/editor/src/components/post-panel-row/style.scss b/packages/editor/src/components/post-panel-row/style.scss index b21679e9b9697c..27c15471fbe8c8 100644 --- a/packages/editor/src/components/post-panel-row/style.scss +++ b/packages/editor/src/components/post-panel-row/style.scss @@ -1,13 +1,19 @@ .editor-post-panel__row { width: 100%; - justify-content: flex-start; - align-items: flex-start; min-height: $button-size; } +.editor-post-panel__row.has-label { + justify-content: flex-start !important; + align-items: flex-start !important; +} + .editor-post-panel__row-label { width: 30%; flex-shrink: 0; + min-height: $button-size; + display: flex; + align-items: center; } .editor-post-panel__row-control { diff --git a/packages/editor/src/components/post-schedule/style.scss b/packages/editor/src/components/post-schedule/style.scss index fb8503962f7cdf..e6f22f9f5b8a4f 100644 --- a/packages/editor/src/components/post-schedule/style.scss +++ b/packages/editor/src/components/post-schedule/style.scss @@ -9,11 +9,11 @@ } } -.editor-post-schedule__dialog-toggle { +.editor-post-schedule__dialog-toggle.components-button { display: block; max-width: 100%; overflow: hidden; text-align: left; - text-overflow: ellipsis; - white-space: nowrap; + white-space: unset; + height: auto; } From 059cc97c3ca345bef019ef0ab77bb437c393153c Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 20 Nov 2023 16:24:48 +0100 Subject: [PATCH 2/5] Fix alignments --- packages/editor/src/components/post-schedule/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor/src/components/post-schedule/style.scss b/packages/editor/src/components/post-schedule/style.scss index e6f22f9f5b8a4f..c983de0746173e 100644 --- a/packages/editor/src/components/post-schedule/style.scss +++ b/packages/editor/src/components/post-schedule/style.scss @@ -16,4 +16,5 @@ text-align: left; white-space: unset; height: auto; + padding: 10px 12px; } From 5a5dc78a439809df1045f6379d3e3e520f2b15c2 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 20 Nov 2023 16:50:57 +0100 Subject: [PATCH 3/5] Remove conditional style --- packages/editor/src/components/post-panel-row/index.js | 4 +--- packages/editor/src/components/post-panel-row/style.scss | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/editor/src/components/post-panel-row/index.js b/packages/editor/src/components/post-panel-row/index.js index 0571fc2967a939..a746486ea25f64 100644 --- a/packages/editor/src/components/post-panel-row/index.js +++ b/packages/editor/src/components/post-panel-row/index.js @@ -12,9 +12,7 @@ import { forwardRef } from '@wordpress/element'; const PostPanelRow = forwardRef( ( { className, label, children }, ref ) => { return ( { label ? ( diff --git a/packages/editor/src/components/post-panel-row/style.scss b/packages/editor/src/components/post-panel-row/style.scss index 27c15471fbe8c8..b3dfc8c6bcf6b0 100644 --- a/packages/editor/src/components/post-panel-row/style.scss +++ b/packages/editor/src/components/post-panel-row/style.scss @@ -1,9 +1,6 @@ .editor-post-panel__row { width: 100%; min-height: $button-size; -} - -.editor-post-panel__row.has-label { justify-content: flex-start !important; align-items: flex-start !important; } From c94e615526e2c260f2a7cbe2a1c4d5c3e75f5cbe Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 20 Nov 2023 17:40:13 +0100 Subject: [PATCH 4/5] Add a line height --- packages/editor/src/components/post-schedule/style.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/editor/src/components/post-schedule/style.scss b/packages/editor/src/components/post-schedule/style.scss index c983de0746173e..7dc116ec94b717 100644 --- a/packages/editor/src/components/post-schedule/style.scss +++ b/packages/editor/src/components/post-schedule/style.scss @@ -16,5 +16,8 @@ text-align: left; white-space: unset; height: auto; + + // The line height + the padding should be the same as the button size. padding: 10px 12px; + line-height: 16px; } From 6d16862ecf41cf9050743d9b59966302139db8bd Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 20 Nov 2023 17:58:06 +0100 Subject: [PATCH 5/5] Use computation to explain the logic of the styles --- packages/editor/src/components/post-schedule/style.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/post-schedule/style.scss b/packages/editor/src/components/post-schedule/style.scss index 7dc116ec94b717..ca5bc19ae7d5ca 100644 --- a/packages/editor/src/components/post-schedule/style.scss +++ b/packages/editor/src/components/post-schedule/style.scss @@ -18,6 +18,6 @@ height: auto; // The line height + the padding should be the same as the button size. - padding: 10px 12px; - line-height: 16px; + padding: ( ( $button-size - $grid-unit-20 ) / 2 ) 12px; + line-height: $grid-unit-20; }