@wordpress/edit-post 7.3.2 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/header/header-toolbar/index.js +6 -3
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/index.js +1 -8
- package/build/components/header/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +6 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +48 -3
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/editor.js +3 -3
- package/build/editor.js.map +1 -1
- package/build/{experiments.js → private-apis.js} +3 -3
- package/build/private-apis.js.map +1 -0
- package/build-module/components/header/header-toolbar/index.js +6 -3
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/index.js +1 -7
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +6 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +46 -4
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/editor.js +4 -4
- package/build-module/editor.js.map +1 -1
- package/build-module/{experiments.js → private-apis.js} +2 -2
- package/build-module/private-apis.js.map +1 -0
- package/package.json +30 -29
- package/src/components/header/header-toolbar/index.js +6 -3
- package/src/components/header/index.js +1 -8
- package/src/components/keyboard-shortcut-help-modal/config.js +1 -1
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +780 -778
- package/src/components/keyboard-shortcuts/index.js +6 -3
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +481 -477
- package/src/components/secondary-sidebar/list-view-sidebar.js +58 -1
- package/src/editor.js +4 -3
- package/src/{experiments.js → private-apis.js} +1 -1
- package/build/experiments.js.map +0 -1
- package/build-module/experiments.js.map +0 -1
|
@@ -91,10 +91,13 @@ function HeaderToolbar() {
|
|
|
91
91
|
/>
|
|
92
92
|
</>
|
|
93
93
|
);
|
|
94
|
-
const
|
|
94
|
+
const toggleInserter = useCallback( () => {
|
|
95
95
|
if ( isInserterOpened ) {
|
|
96
|
-
// Focusing the inserter button
|
|
96
|
+
// Focusing the inserter button should close the inserter popover.
|
|
97
|
+
// However, there are some cases it won't close when the focus is lost.
|
|
98
|
+
// See https://github.com/WordPress/gutenberg/issues/43090 for more details.
|
|
97
99
|
inserterButton.current.focus();
|
|
100
|
+
setIsInserterOpened( false );
|
|
98
101
|
} else {
|
|
99
102
|
setIsInserterOpened( true );
|
|
100
103
|
}
|
|
@@ -120,7 +123,7 @@ function HeaderToolbar() {
|
|
|
120
123
|
variant="primary"
|
|
121
124
|
isPressed={ isInserterOpened }
|
|
122
125
|
onMouseDown={ preventDefault }
|
|
123
|
-
onClick={
|
|
126
|
+
onClick={ toggleInserter }
|
|
124
127
|
disabled={ ! isInserterEnabled }
|
|
125
128
|
icon={ plus }
|
|
126
129
|
label={ showIconLabels ? shortLabel : longLabel }
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import classnames from 'classnames';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -48,8 +43,6 @@ function Header( { setEntitiesSavedStatesCallback } ) {
|
|
|
48
43
|
|
|
49
44
|
const isDistractionFree = isDistractionFreeMode && isLargeViewport;
|
|
50
45
|
|
|
51
|
-
const classes = classnames( 'edit-post-header' );
|
|
52
|
-
|
|
53
46
|
const slideY = {
|
|
54
47
|
hidden: isDistractionFree ? { y: '-50' } : { y: 0 },
|
|
55
48
|
hover: { y: 0, transition: { type: 'tween', delay: 0.2 } },
|
|
@@ -61,7 +54,7 @@ function Header( { setEntitiesSavedStatesCallback } ) {
|
|
|
61
54
|
};
|
|
62
55
|
|
|
63
56
|
return (
|
|
64
|
-
<div className=
|
|
57
|
+
<div className="edit-post-header">
|
|
65
58
|
<MainDashboardButton.Slot>
|
|
66
59
|
<motion.div
|
|
67
60
|
variants={ slideX }
|
|
@@ -22,7 +22,7 @@ export const textFormattingShortcuts = [
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
keyCombination: { character: '[[' },
|
|
25
|
-
description: __( 'Insert a link to a post or page' ),
|
|
25
|
+
description: __( 'Insert a link to a post or page.' ),
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
keyCombination: { modifier: 'primary', character: 'u' },
|