@wordpress/edit-post 5.0.2 → 5.0.3
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/README.md +1 -1
- package/build/components/header/header-toolbar/index.native.js +10 -3
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/template-title/index.js +1 -1
- package/build/components/header/template-title/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -8
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +1 -3
- package/build/components/layout/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +44 -17
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +2 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar/template/actions.js +6 -1
- package/build/components/sidebar/template/actions.js.map +1 -1
- package/build/editor.js +5 -3
- package/build/editor.js.map +1 -1
- package/build/store/selectors.js +5 -3
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +11 -4
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/template-title/index.js +1 -1
- package/build-module/components/header/template-title/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -8
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +2 -4
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +45 -19
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +2 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/template/actions.js +6 -1
- package/build-module/components/sidebar/template/actions.js.map +1 -1
- package/build-module/editor.js +4 -3
- package/build-module/editor.js.map +1 -1
- package/build-module/store/selectors.js +5 -3
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +13 -18
- package/build-style/style.css +13 -18
- package/package.json +27 -27
- package/src/components/header/header-toolbar/index.native.js +8 -2
- package/src/components/header/template-title/index.js +3 -1
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +15 -12
- package/src/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/src/components/keyboard-shortcuts/index.js +19 -32
- package/src/components/layout/index.js +2 -6
- package/src/components/preferences-modal/index.js +88 -32
- package/src/components/preferences-modal/style.scss +1 -17
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +294 -137
- package/src/components/secondary-sidebar/inserter-sidebar.js +1 -0
- package/src/components/sidebar/plugin-sidebar/index.js +1 -1
- package/src/components/sidebar/template/actions.js +6 -1
- package/src/components/welcome-guide/style.scss +5 -0
- package/src/editor.js +83 -76
- package/src/store/selectors.js +7 -3
|
@@ -7,13 +7,21 @@ import { get } from 'lodash';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
__experimentalNavigatorProvider as NavigatorProvider,
|
|
11
|
+
__experimentalNavigatorScreen as NavigatorScreen,
|
|
12
|
+
__experimentalUseNavigator as useNavigator,
|
|
13
|
+
__experimentalItemGroup as ItemGroup,
|
|
14
|
+
__experimentalItem as Item,
|
|
15
|
+
__experimentalHStack as HStack,
|
|
16
|
+
__experimentalTruncate as Truncate,
|
|
17
|
+
FlexItem,
|
|
13
18
|
Modal,
|
|
14
19
|
TabPanel,
|
|
20
|
+
Button,
|
|
21
|
+
Card,
|
|
22
|
+
CardBody,
|
|
15
23
|
} from '@wordpress/components';
|
|
16
|
-
import { __ } from '@wordpress/i18n';
|
|
24
|
+
import { isRTL, __ } from '@wordpress/i18n';
|
|
17
25
|
import { useViewportMatch } from '@wordpress/compose';
|
|
18
26
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
19
27
|
import { useMemo, useCallback, useState } from '@wordpress/element';
|
|
@@ -26,6 +34,7 @@ import {
|
|
|
26
34
|
store as editorStore,
|
|
27
35
|
} from '@wordpress/editor';
|
|
28
36
|
import { store as coreStore } from '@wordpress/core-data';
|
|
37
|
+
import { chevronLeft, chevronRight, Icon } from '@wordpress/icons';
|
|
29
38
|
|
|
30
39
|
/**
|
|
31
40
|
* Internal dependencies
|
|
@@ -44,6 +53,21 @@ import BlockManager from '../block-manager';
|
|
|
44
53
|
const MODAL_NAME = 'edit-post/preferences';
|
|
45
54
|
const PREFERENCES_MENU = 'preferences-menu';
|
|
46
55
|
|
|
56
|
+
function NavigationButton( {
|
|
57
|
+
as: Tag = Button,
|
|
58
|
+
path,
|
|
59
|
+
isBack = false,
|
|
60
|
+
...props
|
|
61
|
+
} ) {
|
|
62
|
+
const navigator = useNavigator();
|
|
63
|
+
return (
|
|
64
|
+
<Tag
|
|
65
|
+
onClick={ () => navigator.push( path, { isBack } ) }
|
|
66
|
+
{ ...props }
|
|
67
|
+
/>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
47
71
|
export default function PreferencesModal() {
|
|
48
72
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
49
73
|
const { closeModal } = useDispatch( editPostStore );
|
|
@@ -301,34 +325,66 @@ export default function PreferencesModal() {
|
|
|
301
325
|
);
|
|
302
326
|
} else {
|
|
303
327
|
modalContent = (
|
|
304
|
-
<
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
328
|
+
<Card isBorderless>
|
|
329
|
+
<CardBody>
|
|
330
|
+
<NavigatorProvider initialPath="/">
|
|
331
|
+
<NavigatorScreen path="/">
|
|
332
|
+
<ItemGroup>
|
|
333
|
+
{ tabs.map( ( tab ) => {
|
|
334
|
+
return (
|
|
335
|
+
<NavigationButton
|
|
336
|
+
key={ tab.name }
|
|
337
|
+
path={ tab.name }
|
|
338
|
+
as={ Item }
|
|
339
|
+
isAction
|
|
340
|
+
>
|
|
341
|
+
<HStack justify="space-between">
|
|
342
|
+
<FlexItem>
|
|
343
|
+
<Truncate>
|
|
344
|
+
{ tab.title }
|
|
345
|
+
</Truncate>
|
|
346
|
+
</FlexItem>
|
|
347
|
+
<FlexItem>
|
|
348
|
+
<Icon
|
|
349
|
+
icon={
|
|
350
|
+
isRTL()
|
|
351
|
+
? chevronLeft
|
|
352
|
+
: chevronRight
|
|
353
|
+
}
|
|
354
|
+
/>
|
|
355
|
+
</FlexItem>
|
|
356
|
+
</HStack>
|
|
357
|
+
</NavigationButton>
|
|
358
|
+
);
|
|
359
|
+
} ) }
|
|
360
|
+
</ItemGroup>
|
|
361
|
+
</NavigatorScreen>
|
|
362
|
+
{ sections.map( ( section ) => {
|
|
363
|
+
return (
|
|
364
|
+
<NavigatorScreen
|
|
365
|
+
key={ `${ section.name }-menu` }
|
|
366
|
+
path={ section.name }
|
|
367
|
+
>
|
|
368
|
+
<NavigationButton
|
|
369
|
+
path="/"
|
|
370
|
+
icon={
|
|
371
|
+
isRTL() ? chevronRight : chevronLeft
|
|
372
|
+
}
|
|
373
|
+
isBack
|
|
374
|
+
aria-label={ __(
|
|
375
|
+
'Navigate to the previous view'
|
|
376
|
+
) }
|
|
377
|
+
>
|
|
378
|
+
{ __( 'Back' ) }
|
|
379
|
+
</NavigationButton>
|
|
380
|
+
<h2>{ section.tabLabel }</h2>
|
|
381
|
+
{ section.content }
|
|
382
|
+
</NavigatorScreen>
|
|
383
|
+
);
|
|
384
|
+
} ) }
|
|
385
|
+
</NavigatorProvider>
|
|
386
|
+
</CardBody>
|
|
387
|
+
</Card>
|
|
332
388
|
);
|
|
333
389
|
}
|
|
334
390
|
return (
|
|
@@ -26,10 +26,10 @@ $vertical-tabs-width: 160px;
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.components-navigation {
|
|
29
|
-
background-color: $white;
|
|
30
29
|
padding: 0;
|
|
31
30
|
max-height: 100%;
|
|
32
31
|
overflow-y: auto;
|
|
32
|
+
color: $black;
|
|
33
33
|
|
|
34
34
|
> * {
|
|
35
35
|
// Matches spacing cleared from the modal content element.
|
|
@@ -38,42 +38,26 @@ $vertical-tabs-width: 160px;
|
|
|
38
38
|
|
|
39
39
|
.components-navigation__menu {
|
|
40
40
|
margin: 0;
|
|
41
|
-
color: $gray-900;
|
|
42
41
|
|
|
43
42
|
.components-navigation__item {
|
|
44
|
-
color: $gray-900; // The inheritance of some items is quite strong, so we have to duplicate this one.
|
|
45
|
-
|
|
46
43
|
& > button {
|
|
47
|
-
color: inherit;
|
|
48
44
|
padding: 3px $grid-unit-20;
|
|
49
45
|
height: $grid-unit-60;
|
|
50
46
|
// Aligns button text instead of button box.
|
|
51
47
|
margin: 0 #{-$grid-unit-20};
|
|
52
48
|
width: calc(#{$grid-unit-40} + 100%);
|
|
53
49
|
&:focus {
|
|
54
|
-
background: $gray-100;
|
|
55
50
|
font-weight: 500;
|
|
56
51
|
}
|
|
57
|
-
&:hover {
|
|
58
|
-
color: var(--wp-admin-theme-color);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
.components-toggle-control__label {
|
|
62
|
-
color: inherit;
|
|
63
52
|
}
|
|
64
53
|
}
|
|
65
54
|
.components-navigation__menu-title-heading {
|
|
66
|
-
color: inherit;
|
|
67
55
|
border-bottom: 1px solid $gray-300;
|
|
68
56
|
padding-left: 0;
|
|
69
57
|
padding-right: 0;
|
|
70
58
|
}
|
|
71
59
|
.components-navigation__back-button {
|
|
72
|
-
color: inherit;
|
|
73
60
|
padding-left: 0;
|
|
74
|
-
&:hover {
|
|
75
|
-
color: var(--wp-admin-theme-color);
|
|
76
|
-
}
|
|
77
61
|
}
|
|
78
62
|
.edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
79
63
|
width: auto;
|
|
@@ -40,151 +40,308 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
40
40
|
onRequestClose={[Function]}
|
|
41
41
|
title="Preferences"
|
|
42
42
|
>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
onActivateMenu={[Function]}
|
|
43
|
+
<Card
|
|
44
|
+
isBorderless={true}
|
|
46
45
|
>
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
title="General"
|
|
54
|
-
/>
|
|
55
|
-
<NavigationItem
|
|
56
|
-
key="blocks"
|
|
57
|
-
navigateToMenu="blocks"
|
|
58
|
-
title="Blocks"
|
|
59
|
-
/>
|
|
60
|
-
<NavigationItem
|
|
61
|
-
key="panels"
|
|
62
|
-
navigateToMenu="panels"
|
|
63
|
-
title="Panels"
|
|
64
|
-
/>
|
|
65
|
-
</NavigationMenu>
|
|
66
|
-
<NavigationMenu
|
|
67
|
-
key="general-menu"
|
|
68
|
-
menu="general"
|
|
69
|
-
parentMenu="preferences-menu"
|
|
70
|
-
title="General"
|
|
71
|
-
>
|
|
72
|
-
<NavigationItem>
|
|
73
|
-
<Section
|
|
74
|
-
description="Customize options related to the block editor interface and editing flow."
|
|
75
|
-
title="Appearance"
|
|
46
|
+
<CardBody>
|
|
47
|
+
<NavigatorProvider
|
|
48
|
+
initialPath="/"
|
|
49
|
+
>
|
|
50
|
+
<NavigatorScreen
|
|
51
|
+
path="/"
|
|
76
52
|
>
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
53
|
+
<ItemGroup>
|
|
54
|
+
<NavigationButton
|
|
55
|
+
as={
|
|
56
|
+
Object {
|
|
57
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
58
|
+
"__contextSystemKey__": Array [
|
|
59
|
+
"Item",
|
|
60
|
+
],
|
|
61
|
+
"render": [Function],
|
|
62
|
+
"selector": ".components-item",
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
isAction={true}
|
|
66
|
+
key="general"
|
|
67
|
+
path="general"
|
|
68
|
+
>
|
|
69
|
+
<HStack
|
|
70
|
+
justify="space-between"
|
|
71
|
+
>
|
|
72
|
+
<FlexItem>
|
|
73
|
+
<Truncate>
|
|
74
|
+
General
|
|
75
|
+
</Truncate>
|
|
76
|
+
</FlexItem>
|
|
77
|
+
<FlexItem>
|
|
78
|
+
<Icon
|
|
79
|
+
icon={
|
|
80
|
+
<SVG
|
|
81
|
+
viewBox="0 0 24 24"
|
|
82
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
83
|
+
>
|
|
84
|
+
<Path
|
|
85
|
+
d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
|
|
86
|
+
/>
|
|
87
|
+
</SVG>
|
|
88
|
+
}
|
|
89
|
+
/>
|
|
90
|
+
</FlexItem>
|
|
91
|
+
</HStack>
|
|
92
|
+
</NavigationButton>
|
|
93
|
+
<NavigationButton
|
|
94
|
+
as={
|
|
95
|
+
Object {
|
|
96
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
97
|
+
"__contextSystemKey__": Array [
|
|
98
|
+
"Item",
|
|
99
|
+
],
|
|
100
|
+
"render": [Function],
|
|
101
|
+
"selector": ".components-item",
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
isAction={true}
|
|
105
|
+
key="blocks"
|
|
106
|
+
path="blocks"
|
|
107
|
+
>
|
|
108
|
+
<HStack
|
|
109
|
+
justify="space-between"
|
|
110
|
+
>
|
|
111
|
+
<FlexItem>
|
|
112
|
+
<Truncate>
|
|
113
|
+
Blocks
|
|
114
|
+
</Truncate>
|
|
115
|
+
</FlexItem>
|
|
116
|
+
<FlexItem>
|
|
117
|
+
<Icon
|
|
118
|
+
icon={
|
|
119
|
+
<SVG
|
|
120
|
+
viewBox="0 0 24 24"
|
|
121
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
122
|
+
>
|
|
123
|
+
<Path
|
|
124
|
+
d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
|
|
125
|
+
/>
|
|
126
|
+
</SVG>
|
|
127
|
+
}
|
|
128
|
+
/>
|
|
129
|
+
</FlexItem>
|
|
130
|
+
</HStack>
|
|
131
|
+
</NavigationButton>
|
|
132
|
+
<NavigationButton
|
|
133
|
+
as={
|
|
134
|
+
Object {
|
|
135
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
136
|
+
"__contextSystemKey__": Array [
|
|
137
|
+
"Item",
|
|
138
|
+
],
|
|
139
|
+
"render": [Function],
|
|
140
|
+
"selector": ".components-item",
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
isAction={true}
|
|
144
|
+
key="panels"
|
|
145
|
+
path="panels"
|
|
146
|
+
>
|
|
147
|
+
<HStack
|
|
148
|
+
justify="space-between"
|
|
149
|
+
>
|
|
150
|
+
<FlexItem>
|
|
151
|
+
<Truncate>
|
|
152
|
+
Panels
|
|
153
|
+
</Truncate>
|
|
154
|
+
</FlexItem>
|
|
155
|
+
<FlexItem>
|
|
156
|
+
<Icon
|
|
157
|
+
icon={
|
|
158
|
+
<SVG
|
|
159
|
+
viewBox="0 0 24 24"
|
|
160
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
161
|
+
>
|
|
162
|
+
<Path
|
|
163
|
+
d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
|
|
164
|
+
/>
|
|
165
|
+
</SVG>
|
|
166
|
+
}
|
|
167
|
+
/>
|
|
168
|
+
</FlexItem>
|
|
169
|
+
</HStack>
|
|
170
|
+
</NavigationButton>
|
|
171
|
+
</ItemGroup>
|
|
172
|
+
</NavigatorScreen>
|
|
173
|
+
<NavigatorScreen
|
|
174
|
+
key="general-menu"
|
|
175
|
+
path="general"
|
|
115
176
|
>
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
title="Document settings"
|
|
145
|
-
>
|
|
146
|
-
<EnablePluginDocumentSettingPanelOptionSlot />
|
|
147
|
-
<WithSelect(PostTaxonomies)
|
|
148
|
-
taxonomyWrapper={[Function]}
|
|
149
|
-
/>
|
|
150
|
-
<PostFeaturedImageCheck>
|
|
151
|
-
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
152
|
-
label="Featured image"
|
|
153
|
-
panelName="featured-image"
|
|
177
|
+
<NavigationButton
|
|
178
|
+
aria-label="Navigate to the previous view"
|
|
179
|
+
icon={
|
|
180
|
+
<SVG
|
|
181
|
+
viewBox="0 0 24 24"
|
|
182
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
183
|
+
>
|
|
184
|
+
<Path
|
|
185
|
+
d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
|
|
186
|
+
/>
|
|
187
|
+
</SVG>
|
|
188
|
+
}
|
|
189
|
+
isBack={true}
|
|
190
|
+
path="/"
|
|
191
|
+
>
|
|
192
|
+
Back
|
|
193
|
+
</NavigationButton>
|
|
194
|
+
<h2>
|
|
195
|
+
General
|
|
196
|
+
</h2>
|
|
197
|
+
<Section
|
|
198
|
+
description="Customize options related to the block editor interface and editing flow."
|
|
199
|
+
title="Appearance"
|
|
200
|
+
>
|
|
201
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
202
|
+
featureName="reducedUI"
|
|
203
|
+
help="Compacts options and outlines in the toolbar."
|
|
204
|
+
label="Reduce the interface"
|
|
154
205
|
/>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
label="
|
|
159
|
-
panelName="post-excerpt"
|
|
206
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
207
|
+
featureName="focusMode"
|
|
208
|
+
help="Highlights the current block and fades other content."
|
|
209
|
+
label="Spotlight mode"
|
|
160
210
|
/>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
211
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
212
|
+
featureName="showIconLabels"
|
|
213
|
+
help="Shows text instead of icons."
|
|
214
|
+
label="Display button labels"
|
|
215
|
+
/>
|
|
216
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
217
|
+
featureName="themeStyles"
|
|
218
|
+
help="Make the editor look like your theme."
|
|
219
|
+
label="Use theme styles"
|
|
220
|
+
/>
|
|
221
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
222
|
+
featureName="showBlockBreadcrumbs"
|
|
223
|
+
help="Shows block breadcrumbs at the bottom of the editor."
|
|
224
|
+
label="Display block breadcrumbs"
|
|
225
|
+
/>
|
|
226
|
+
</Section>
|
|
227
|
+
</NavigatorScreen>
|
|
228
|
+
<NavigatorScreen
|
|
229
|
+
key="blocks-menu"
|
|
230
|
+
path="blocks"
|
|
231
|
+
>
|
|
232
|
+
<NavigationButton
|
|
233
|
+
aria-label="Navigate to the previous view"
|
|
234
|
+
icon={
|
|
235
|
+
<SVG
|
|
236
|
+
viewBox="0 0 24 24"
|
|
237
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
238
|
+
>
|
|
239
|
+
<Path
|
|
240
|
+
d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
|
|
241
|
+
/>
|
|
242
|
+
</SVG>
|
|
168
243
|
}
|
|
244
|
+
isBack={true}
|
|
245
|
+
path="/"
|
|
246
|
+
>
|
|
247
|
+
Back
|
|
248
|
+
</NavigationButton>
|
|
249
|
+
<h2>
|
|
250
|
+
Blocks
|
|
251
|
+
</h2>
|
|
252
|
+
<Section
|
|
253
|
+
description="Customize how you interact with blocks in the block library and editing canvas."
|
|
254
|
+
title="Block interactions"
|
|
169
255
|
>
|
|
170
|
-
<WithSelect(
|
|
171
|
-
|
|
172
|
-
|
|
256
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
257
|
+
featureName="mostUsedBlocks"
|
|
258
|
+
help="Places the most frequent blocks in the block library."
|
|
259
|
+
label="Show most used blocks"
|
|
260
|
+
/>
|
|
261
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
262
|
+
featureName="keepCaretInsideBlock"
|
|
263
|
+
help="Aids screen readers by stopping text caret from leaving blocks."
|
|
264
|
+
label="Contain text cursor inside block"
|
|
173
265
|
/>
|
|
174
|
-
</
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
266
|
+
</Section>
|
|
267
|
+
<Section
|
|
268
|
+
description="Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."
|
|
269
|
+
title="Visible blocks"
|
|
270
|
+
>
|
|
271
|
+
<WithSelect(BlockManager) />
|
|
272
|
+
</Section>
|
|
273
|
+
</NavigatorScreen>
|
|
274
|
+
<NavigatorScreen
|
|
275
|
+
key="panels-menu"
|
|
276
|
+
path="panels"
|
|
277
|
+
>
|
|
278
|
+
<NavigationButton
|
|
279
|
+
aria-label="Navigate to the previous view"
|
|
280
|
+
icon={
|
|
281
|
+
<SVG
|
|
282
|
+
viewBox="0 0 24 24"
|
|
283
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
284
|
+
>
|
|
285
|
+
<Path
|
|
286
|
+
d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
|
|
287
|
+
/>
|
|
288
|
+
</SVG>
|
|
289
|
+
}
|
|
290
|
+
isBack={true}
|
|
291
|
+
path="/"
|
|
292
|
+
>
|
|
293
|
+
Back
|
|
294
|
+
</NavigationButton>
|
|
295
|
+
<h2>
|
|
296
|
+
Panels
|
|
297
|
+
</h2>
|
|
298
|
+
<Section
|
|
299
|
+
description="Choose what displays in the panel."
|
|
300
|
+
title="Document settings"
|
|
301
|
+
>
|
|
302
|
+
<EnablePluginDocumentSettingPanelOptionSlot />
|
|
303
|
+
<WithSelect(PostTaxonomies)
|
|
304
|
+
taxonomyWrapper={[Function]}
|
|
179
305
|
/>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
306
|
+
<PostFeaturedImageCheck>
|
|
307
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
308
|
+
label="Featured image"
|
|
309
|
+
panelName="featured-image"
|
|
310
|
+
/>
|
|
311
|
+
</PostFeaturedImageCheck>
|
|
312
|
+
<PostExcerptCheck>
|
|
313
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
314
|
+
label="Excerpt"
|
|
315
|
+
panelName="post-excerpt"
|
|
316
|
+
/>
|
|
317
|
+
</PostExcerptCheck>
|
|
318
|
+
<WithSelect(PostTypeSupportCheck)
|
|
319
|
+
supportKeys={
|
|
320
|
+
Array [
|
|
321
|
+
"comments",
|
|
322
|
+
"trackbacks",
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
>
|
|
326
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
327
|
+
label="Discussion"
|
|
328
|
+
panelName="discussion-panel"
|
|
329
|
+
/>
|
|
330
|
+
</WithSelect(PostTypeSupportCheck)>
|
|
331
|
+
<PageAttributesCheck>
|
|
332
|
+
<WithSelect(IfCondition(WithDispatch(BaseOption)))
|
|
333
|
+
label="Page attributes"
|
|
334
|
+
panelName="page-attributes"
|
|
335
|
+
/>
|
|
336
|
+
</PageAttributesCheck>
|
|
337
|
+
</Section>
|
|
338
|
+
<WithSelect(MetaBoxesSection)
|
|
339
|
+
description="Add extra areas to the editor."
|
|
340
|
+
title="Additional"
|
|
341
|
+
/>
|
|
342
|
+
</NavigatorScreen>
|
|
343
|
+
</NavigatorProvider>
|
|
344
|
+
</CardBody>
|
|
345
|
+
</Card>
|
|
189
346
|
</Modal>
|
|
190
347
|
`;
|