Skip to content

Commit

Permalink
Editor: Update WordPress editor npm packages.
Browse files Browse the repository at this point in the history
These are backports coming for the 5.6.1 release.

Summary of the following issues: 


* [#27970](WordPress/gutenberg#27970) - Fix editor crash when registering a block pattern without `categories`  Backport to WP Minor Release [Feature] Inserter [Feature] Patterns [Type] Bug
* [#27733](WordPress/gutenberg#27733) - [Embed block]: Add html and reusable support back  Backport to WP Minor Release [Block] Embed [Type] Regression
* [#27727](WordPress/gutenberg#27727) - Add aria labels to box control component inputs/button  Backport to WP Minor Release [Feature] UI Components [Package] Components [Type] Bug [a11y] Labelling
* [#27627](WordPress/gutenberg#27627) - HTML Block: Fix editor styles  Backport to WP Minor Release [Block] HTML [Type] Regression
* [#27526](WordPress/gutenberg#27526) - Core Data: Normalize `_fields` value for use in `stableKey`  Backport to WP Minor Release [Package] Core data [Type] Bug
* [#26705](WordPress/gutenberg#26705) - Fix: Font size picker does not correctly handles big font sizes.  Backport to WP Minor Release [Type] Bug
* [#26432](WordPress/gutenberg#26432) - Edit Site: prevent inserter overscroll  Backport to WP Minor Release First-time Contributor [Feature] Full Site Editing [Type] Bug


Packages updated:

@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]
@wordpress/[email protected]

Fixes #52391.

Props gziolo, whyisjake.

Built from https://develop.svn.wordpress.org/branches/5.6@50061


git-svn-id: http://core.svn.wordpress.org/branches/5.6@49762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
VenusPR committed Jan 28, 2021
1 parent 0d9a6f2 commit 283389a
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 37 deletions.
2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions wp-includes/css/dist/block-library/editor-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -668,15 +668,15 @@ figure.wp-block-gallery {
.block-library-heading-level-toolbar {
border: none; }

.wp-block-html {
.block-library-html__edit {
margin-bottom: 28px; }
.wp-block-html .block-library-html__preview-overlay {
.block-library-html__edit .block-library-html__preview-overlay {
position: absolute;
width: 100%;
height: 100%;
top: 0;
right: 0; }
.wp-block-html .block-editor-plain-text {
.block-library-html__edit .block-editor-plain-text {
font-family: Menlo, Consolas, monaco, monospace;
color: #1e1e1e;
padding: 0.8em 1em;
Expand All @@ -686,9 +686,9 @@ figure.wp-block-gallery {
/* Fonts smaller than 16px causes mobile safari to zoom. */
font-size: 16px; }
@media (min-width: 600px) {
.wp-block-html .block-editor-plain-text {
.block-library-html__edit .block-editor-plain-text {
font-size: 13px; } }
.wp-block-html .block-editor-plain-text:focus {
.block-library-html__edit .block-editor-plain-text:focus {
box-shadow: none; }

figure.wp-block-image:not(.wp-block) {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-library/editor-rtl.min.css

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions wp-includes/css/dist/block-library/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -673,15 +673,15 @@ figure.wp-block-gallery {
.block-library-heading-level-toolbar {
border: none; }

.wp-block-html {
.block-library-html__edit {
margin-bottom: 28px; }
.wp-block-html .block-library-html__preview-overlay {
.block-library-html__edit .block-library-html__preview-overlay {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0; }
.wp-block-html .block-editor-plain-text {
.block-library-html__edit .block-editor-plain-text {
font-family: Menlo, Consolas, monaco, monospace;
color: #1e1e1e;
padding: 0.8em 1em;
Expand All @@ -691,9 +691,9 @@ figure.wp-block-gallery {
/* Fonts smaller than 16px causes mobile safari to zoom. */
font-size: 16px; }
@media (min-width: 600px) {
.wp-block-html .block-editor-plain-text {
.block-library-html__edit .block-editor-plain-text {
font-size: 13px; } }
.wp-block-html .block-editor-plain-text:focus {
.block-library-html__edit .block-editor-plain-text:focus {
box-shadow: none; }

figure.wp-block-image:not(.wp-block) {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-library/editor.min.css

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion wp-includes/css/dist/edit-post/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
display: flex;
overflow: auto;
overscroll-behavior-y: none; }
@media (min-width: 782px) {
.interface-interface-skeleton__body {
padding-bottom: 25px; } }

.interface-interface-skeleton__content {
flex-grow: 1;
Expand Down Expand Up @@ -268,7 +271,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {

@media (min-width: 782px) {
.interface-interface-skeleton__left-sidebar {
border-left: 1px solid #e0e0e0; } }
border-left: 1px solid #e0e0e0;
overflow: hidden; } }

.interface-interface-skeleton__header {
flex-shrink: 0;
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/edit-post/style-rtl.min.css

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion wp-includes/css/dist/edit-post/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
display: flex;
overflow: auto;
overscroll-behavior-y: none; }
@media (min-width: 782px) {
.interface-interface-skeleton__body {
padding-bottom: 25px; } }

.interface-interface-skeleton__content {
flex-grow: 1;
Expand Down Expand Up @@ -268,7 +271,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {

@media (min-width: 782px) {
.interface-interface-skeleton__left-sidebar {
border-right: 1px solid #e0e0e0; } }
border-right: 1px solid #e0e0e0;
overflow: hidden; } }

.interface-interface-skeleton__header {
flex-shrink: 0;
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/edit-post/style.min.css

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion wp-includes/js/dist/block-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -27745,7 +27745,9 @@ function BlockPatternsCategory(_ref2) {
var populatedCategories = Object(external_this_wp_element_["useMemo"])(function () {
return allCategories.filter(function (category) {
return allPatterns.some(function (pattern) {
return pattern.categories.includes(category.name);
var _pattern$categories;

return (_pattern$categories = pattern.categories) === null || _pattern$categories === void 0 ? void 0 : _pattern$categories.includes(category.name);
});
});
}, [allPatterns, allCategories]);
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/js/dist/block-editor.min.js

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions wp-includes/js/dist/block-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -3584,7 +3584,9 @@ var util_metadata = {
align: true,
reusable: false,
html: false
}
},
editorStyle: "wp-block-embed-editor",
style: "wp-block-embed"
};
var DEFAULT_EMBED_BLOCK = util_metadata.name;
/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
Expand Down Expand Up @@ -15078,7 +15080,9 @@ var transforms_metadata = {
align: true,
reusable: false,
html: false
}
},
editorStyle: "wp-block-embed-editor",
style: "wp-block-embed"
};
var EMBED_BLOCK = transforms_metadata.name;
/**
Expand Down Expand Up @@ -15667,7 +15671,9 @@ var deprecated_metadata = {
align: true,
reusable: false,
html: false
}
},
editorStyle: "wp-block-embed-editor",
style: "wp-block-embed"
};
/**
* WordPress dependencies
Expand Down Expand Up @@ -15745,7 +15751,9 @@ var embed_metadata = {
align: true,
reusable: false,
html: false
}
},
editorStyle: "wp-block-embed-editor",
style: "wp-block-embed"
};


Expand Down Expand Up @@ -16354,7 +16362,9 @@ function HTMLEdit(_ref) {
setIsPreview(false);
}

return Object(external_this_wp_element_["createElement"])("div", Object(external_this_wp_blockEditor_["useBlockProps"])(), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
return Object(external_this_wp_element_["createElement"])("div", Object(external_this_wp_blockEditor_["useBlockProps"])({
className: 'block-library-html__edit'
}), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
className: "components-tab-button",
isPressed: !isPreview,
onClick: switchToHTML
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/js/dist/block-library.min.js

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions wp-includes/js/dist/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -26155,6 +26155,7 @@ function useControlledState(currentState) {




/**
* Internal dependencies
*/
Expand Down Expand Up @@ -26305,6 +26306,7 @@ function UnitControl(_ref, ref) {
};

var inputSuffix = !disableUnits ? Object(external_this_wp_element_["createElement"])(UnitSelectControl, {
"aria-label": Object(external_this_wp_i18n_["__"])('Select unit'),
disabled: disabled,
isTabbable: isUnitSelectTabbable,
options: units,
Expand Down Expand Up @@ -26482,11 +26484,10 @@ function BoxUnitControl(_ref) {
onHoverOff(event, state);
}
});
return Object(external_this_wp_element_["createElement"])(UnitControlWrapper, Object(esm_extends["a" /* default */])({
"aria-label": label
}, bindHoverGesture()), Object(external_this_wp_element_["createElement"])(Tooltip, {
return Object(external_this_wp_element_["createElement"])(UnitControlWrapper, bindHoverGesture(), Object(external_this_wp_element_["createElement"])(Tooltip, {
text: label
}, Object(external_this_wp_element_["createElement"])(box_control_styles_UnitControl, Object(esm_extends["a" /* default */])({
"aria-label": label,
className: "component-box-control__unit-control",
hideHTMLArrows: true,
isFirst: isFirst,
Expand Down Expand Up @@ -26999,16 +27000,17 @@ function LinkedButton(_ref) {
var isLinked = _ref.isLinked,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isLinked"]);

var linkedTooltipText = isLinked ? Object(external_this_wp_i18n_["__"])('Unlink Sides') : Object(external_this_wp_i18n_["__"])('Link Sides');
var label = isLinked ? Object(external_this_wp_i18n_["__"])('Unlink Sides') : Object(external_this_wp_i18n_["__"])('Link Sides');
return Object(external_this_wp_element_["createElement"])(build_module_tooltip["a" /* default */], {
text: linkedTooltipText
text: label
}, Object(external_this_wp_element_["createElement"])("span", null, Object(external_this_wp_element_["createElement"])(build_module_button["a" /* default */], Object(esm_extends["a" /* default */])({}, props, {
className: "component-box-control__linked-button",
isPrimary: isLinked,
isSecondary: !isLinked,
isSmall: true,
icon: isLinked ? library_link["a" /* default */] : link_off["a" /* default */],
iconSize: 16
iconSize: 16,
"aria-label": label
}))));
}

Expand Down Expand Up @@ -27238,6 +27240,7 @@ function useSideAnimation(value) {




function box_control_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function box_control_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { box_control_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { box_control_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
Expand Down Expand Up @@ -27380,7 +27383,9 @@ function BoxControl(_ref) {
className: "component-box-control__header-control-wrapper"
}, Object(external_this_wp_element_["createElement"])(flex_item, null, Object(external_this_wp_element_["createElement"])(BoxControlIcon, {
side: side
})), isLinked && Object(external_this_wp_element_["createElement"])(block, null, Object(external_this_wp_element_["createElement"])(AllInputControl, inputControlProps)), Object(external_this_wp_element_["createElement"])(flex_item, null, Object(external_this_wp_element_["createElement"])(LinkedButton, {
})), isLinked && Object(external_this_wp_element_["createElement"])(block, null, Object(external_this_wp_element_["createElement"])(AllInputControl, Object(esm_extends["a" /* default */])({
"aria-label": label
}, inputControlProps))), Object(external_this_wp_element_["createElement"])(flex_item, null, Object(external_this_wp_element_["createElement"])(LinkedButton, {
onClick: toggleLinked,
isLinked: isLinked
}))), !isLinked && Object(external_this_wp_element_["createElement"])(BoxInputControls, inputControlProps));
Expand Down Expand Up @@ -39102,6 +39107,7 @@ var range_control_ForwardedComponent = Object(external_this_wp_element_["forward

var DEFAULT_FONT_SIZE = 'default';
var CUSTOM_FONT_SIZE = 'custom';
var MAX_FONT_SIZE_DISPLAY = '25px';

function getSelectValueFromFontSize(fontSizes, value) {
if (value) {
Expand Down Expand Up @@ -39130,8 +39136,9 @@ function getSelectOptions(optionsArray, disableCustomFontSizes) {
return {
key: option.slug,
name: option.name,
size: option.size,
style: {
fontSize: option.size
fontSize: "min( ".concat(option.size, ", ").concat(MAX_FONT_SIZE_DISPLAY, " )")
}
};
});
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/js/dist/components.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion wp-includes/js/dist/core-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2477,7 +2477,9 @@ function getQueryParts(query) {
// fields from the response even if we explicitely asked for it.
// Example: Asking for titles in posts without title support.
if (key === '_fields') {
parts.fields = get_normalized_comma_separable(value);
parts.fields = get_normalized_comma_separable(value); // Make sure to normalize value for `stableKey`

value = parts.fields.join();
} // While it could be any deterministic string, for simplicity's
// sake mimic querystring encoding for stable key.
//
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/js/dist/core-data.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6.1-alpha-50059';
$wp_version = '5.6.1-alpha-50061';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 283389a

Please sign in to comment.