From a03158d8ffd8fa9170925bacbe7ead242925fdb3 Mon Sep 17 00:00:00 2001
From: Joen A <1204802+jasmussen@users.noreply.github.com>
Date: Wed, 21 Dec 2022 13:17:52 +0100
Subject: [PATCH] Move wordcount to the top of the outline (#46648)
* Move wordcount to the top of the outline
* Fix box-sizing issue.
---
.../secondary-sidebar/list-view-outline.js | 24 +++++++++----------
.../components/secondary-sidebar/style.scss | 23 +++++++++---------
2 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/packages/edit-post/src/components/secondary-sidebar/list-view-outline.js b/packages/edit-post/src/components/secondary-sidebar/list-view-outline.js
index ed15a7eaa5e596..6d27767bdfd0bd 100644
--- a/packages/edit-post/src/components/secondary-sidebar/list-view-outline.js
+++ b/packages/edit-post/src/components/secondary-sidebar/list-view-outline.js
@@ -65,18 +65,6 @@ export default function ListViewOutline() {
}, [] );
return (
<>
- { headingCount > 0 ? (
-
- ) : (
-
-
-
- { __(
- 'Navigate the structure of your document and address issues like empty or incorrect heading levels.'
- ) }
-
-
- ) }
{ __( 'Characters:' ) }
@@ -93,6 +81,18 @@ export default function ListViewOutline() {
+ { headingCount > 0 ? (
+
+ ) : (
+
+
+
+ { __(
+ 'Navigate the structure of your document and address issues like empty or incorrect heading levels.'
+ ) }
+
+
+ ) }
>
);
}
diff --git a/packages/edit-post/src/components/secondary-sidebar/style.scss b/packages/edit-post/src/components/secondary-sidebar/style.scss
index 01b17beb4c8b82..50661aa50c30ee 100644
--- a/packages/edit-post/src/components/secondary-sidebar/style.scss
+++ b/packages/edit-post/src/components/secondary-sidebar/style.scss
@@ -76,24 +76,23 @@
}
.edit-post-editor__list-view-overview {
+ display: flex;
+ flex-direction: column;
+ gap: $grid-unit-10;
+ border-bottom: $border-width solid $gray-300;
+ padding: $grid-unit-20;
+
& > div > span:first-child {
// Width of the text information fields.
width: 90px;
display: inline-block;
}
- border-top: $border-width solid $gray-300;
- width: calc(100% - #{ $grid-unit-40 });
- padding: $grid-unit-20;
- & > div {
- padding: 0 0 $grid-unit-10;
- & > span {
- font-size: $helptext-font-size;
- line-height: $default-line-height;
- color: $gray-700;
- }
+
+ & > div > span {
+ font-size: $helptext-font-size;
+ line-height: $default-line-height;
+ color: $gray-700;
}
- // Height of the overview container.
- height: 72px;
}
.edit-post-editor__list-view-container {