);
@@ -135,14 +123,11 @@ class PostTitle extends Component {
const applyWithSelect = withSelect( ( select ) => {
const { getEditedPostAttribute, isCleanNewPost } = select( 'core/editor' );
const { getSettings } = select( 'core/block-editor' );
- const { getPostType } = select( 'core' );
- const postType = getPostType( getEditedPostAttribute( 'type' ) );
const { titlePlaceholder, focusMode, hasFixedToolbar } = getSettings();
return {
isCleanNewPost: isCleanNewPost(),
title: getEditedPostAttribute( 'title' ),
- isPostTypeViewable: get( postType, [ 'viewable' ], false ),
placeholder: titlePlaceholder,
isFocusMode: focusMode,
hasFixedToolbar,
@@ -169,6 +154,5 @@ const applyWithDispatch = withDispatch( ( dispatch ) => {
export default compose(
applyWithSelect,
applyWithDispatch,
- withInstanceId,
- withFocusOutside
+ withInstanceId
)( PostTitle );
diff --git a/packages/editor/src/components/post-title/style.scss b/packages/editor/src/components/post-title/style.scss
index 8760c20f196ace..351423d657b235 100644
--- a/packages/editor/src/components/post-title/style.scss
+++ b/packages/editor/src/components/post-title/style.scss
@@ -1,12 +1,7 @@
-.editor-post-title__block {
+.editor-post-title {
position: relative;
- padding: 5px 0;
font-size: $editor-font-size;
- @include break-small() {
- padding: 5px $block-side-ui-clearance;
- }
-
.editor-post-title__input {
display: block;
width: 100%;
@@ -18,7 +13,7 @@
color: $dark-gray-900;
transition: border 0.1s ease-out, box-shadow 0.1s linear;
@include reduce-motion("transition");
- padding: #{ $block-padding + 5px } $block-padding;
+ padding: #{ $block-padding + 5px } 0;
word-break: keep-all;
// Stack borders on mobile.
@@ -68,24 +63,3 @@
}
}
}
-
-.editor-post-title .editor-post-permalink {
- font-size: $default-font-size;
- color: $dark-gray-900;
- height: auto;
- position: relative;
- top: -2px;
- width: 100%;
-
- @include break-mobile() {
- position: absolute;
- top: -$button-size + $border-width + $border-width + 1px; // Shift this element upward the same height as the block toolbar, minus the border size
- right: 0;
- flex-wrap: nowrap;
- width: auto;
- }
- @include break-small() {
- left: $block-side-ui-clearance;
- right: $block-side-ui-clearance;
- }
-}
diff --git a/packages/editor/src/components/provider/index.js b/packages/editor/src/components/provider/index.js
index 69a2dbbd958892..555b7b88f02509 100644
--- a/packages/editor/src/components/provider/index.js
+++ b/packages/editor/src/components/provider/index.js
@@ -12,7 +12,10 @@ import { Component } from '@wordpress/element';
import { withDispatch, withSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import { EntityProvider } from '@wordpress/core-data';
-import { BlockEditorProvider, transformStyles } from '@wordpress/block-editor';
+import {
+ BlockEditorProvider,
+ __unstableEditorStyles as EditorStyles,
+} from '@wordpress/block-editor';
import apiFetch from '@wordpress/api-fetch';
import { addQueryArgs } from '@wordpress/url';
import { decodeEntities } from '@wordpress/html-entities';
@@ -134,23 +137,6 @@ class EditorProvider extends Component {
componentDidMount() {
this.props.updateEditorSettings( this.props.settings );
-
- if ( ! this.props.settings.styles ) {
- return;
- }
-
- const updatedStyles = transformStyles(
- this.props.settings.styles,
- '.editor-styles-wrapper'
- );
-
- map( updatedStyles, ( updatedCSS ) => {
- if ( updatedCSS ) {
- const node = document.createElement( 'style' );
- node.innerHTML = updatedCSS;
- document.body.appendChild( node );
- }
- } );
}
componentDidUpdate( prevProps ) {
@@ -197,27 +183,30 @@ class EditorProvider extends Component {
);
return (
-
-
+ >
);
}
}
diff --git a/packages/editor/src/style.scss b/packages/editor/src/style.scss
index 83a75edd9013ac..88ed59125a939b 100644
--- a/packages/editor/src/style.scss
+++ b/packages/editor/src/style.scss
@@ -9,7 +9,6 @@
@import "./components/post-format/style.scss";
@import "./components/post-last-revision/style.scss";
@import "./components/post-locked-modal/style.scss";
-@import "./components/post-permalink/style.scss";
@import "./components/post-publish-button/style.scss";
@import "./components/post-publish-panel/style.scss";
@import "./components/post-saved-state/style.scss";
diff --git a/readme.txt b/readme.txt
index 821d45e050fc2e..267d78d75d8454 100644
--- a/readme.txt
+++ b/readme.txt
@@ -52,4 +52,4 @@ The four phases of the project are Editing, Customization, Collaboration, and Mu
== Changelog ==
-To read the changelog for Gutenberg 7.8.0-rc.1, please navigate to the
.
diff --git a/storybook/test/__snapshots__/index.js.snap b/storybook/test/__snapshots__/index.js.snap
index f358ac613196e7..73dea5ec7db1bd 100644
--- a/storybook/test/__snapshots__/index.js.snap
+++ b/storybook/test/__snapshots__/index.js.snap
@@ -1,5 +1,44 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`Storyshots Components/AnglePickerControl Default 1`] = `
+
- Body
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Body Small 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 14px;
- line-height: 20px;
-}
-
-
- Body Small
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Button 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 600;
- font-size: 14px;
- line-height: 20px;
-}
-
-
- Button
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Caption 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 12px;
- line-height: 16px;
-}
-
-
- Caption
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Default 1`] = `
-Array [
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 32px;
- line-height: 40px;
-}
-
-
- Title Large
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 24px;
- line-height: 32px;
-}
-
-
- Title Medium
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
-}
-
-
- Title Small
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 600;
- font-size: 14px;
- line-height: 20px;
- font-size: 16px;
- line-height: 24px;
-}
-
-
- Subtitle
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 600;
- font-size: 14px;
- line-height: 20px;
- font-size: 14px;
- line-height: 20px;
-}
-
-
- Subtitle Small
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 16px;
- line-height: 24px;
-}
-
-
- Body
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 14px;
- line-height: 20px;
-}
-
-
- Body Small
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 600;
- font-size: 14px;
- line-height: 20px;
-}
-
-
- Button
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 12px;
- line-height: 16px;
-}
-
-
- Caption
-
,
- .emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 600;
- font-size: 12px;
- line-height: 16px;
-}
-
-
- Label
-
,
-]
-`;
-
-exports[`Storyshots Components/Experimental/Text Label 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 600;
- font-size: 12px;
- line-height: 16px;
-}
-
-
- Label
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Subtitle 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 600;
- font-size: 14px;
- line-height: 20px;
- font-size: 16px;
- line-height: 24px;
-}
-
-
- Subtitle
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Subtitle Small 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 600;
- font-size: 14px;
- line-height: 20px;
- font-size: 14px;
- line-height: 20px;
-}
-
-
- Subtitle Small
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Title Large 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 32px;
- line-height: 40px;
-}
-
-
- Title Large
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Title Medium 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 24px;
- line-height: 32px;
-}
-
-
- Title Medium
-
-`;
-
-exports[`Storyshots Components/Experimental/Text Title Small 1`] = `
-.emotion-0 {
- margin: 0;
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
-}
-
-
- Title Small
-
-`;
-
exports[`Storyshots Components/ExternalLink Default 1`] = `
`;
+exports[`Storyshots Components/Text Default 1`] = `
+Array [
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 400;
+ font-size: 32px;
+ line-height: 40px;
+}
+
+
+ Title Large
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 400;
+ font-size: 24px;
+ line-height: 32px;
+}
+
+
+ Title Medium
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+}
+
+
+ Title Small
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 600;
+ font-size: 14px;
+ line-height: 20px;
+ font-size: 16px;
+ line-height: 24px;
+}
+
+
+ Subtitle
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 600;
+ font-size: 14px;
+ line-height: 20px;
+ font-size: 14px;
+ line-height: 20px;
+}
+
+
+ Subtitle Small
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 400;
+}
+
+
+ Body
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 400;
+ font-size: 14px;
+ line-height: 20px;
+}
+
+
+ Body Small
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 600;
+ font-size: 14px;
+ line-height: 20px;
+}
+
+
+ Button
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 400;
+ font-size: 12px;
+ line-height: 16px;
+}
+
+
+ Caption
+
,
+ .emotion-0 {
+ box-sizing: border-box;
+ margin: 0;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
+ font-weight: 600;
+ font-size: 12px;
+ line-height: 16px;
+}
+
+
+ Label
+
,
+]
+`;
+
exports[`Storyshots Components/TextControl Default 1`] = `
-`;
-
exports[`Storyshots Icons/Icon Default 1`] = `
Array [
diff --git a/tsconfig.json b/tsconfig.json
index 7a0eb51600233b..d470e66c01e3c4 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -4,7 +4,7 @@
"allowSyntheticDefaultImports": true,
"checkJs": true,
"jsx": "preserve",
- "lib": ["dom", "esnext"],
+ "lib": ["dom", "esnext", "es2020.string"],
"module": "commonjs",
"noEmit": true,
"resolveJsonModule": true,
@@ -31,6 +31,7 @@
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
},
"include": [
+ "./bin/api-docs/update-api-docs.js",
"./packages/a11y/**/*.js",
"./packages/blob/**/*.js",
"./packages/dom-ready/**/*.js",