@wordpress/edit-post 5.0.1-next.253d9b6e21.0 → 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 +2 -5
- 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/more-menu/index.js +3 -14
- package/build/components/header/more-menu/index.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/header/writing-menu/index.js +7 -10
- package/build/components/header/writing-menu/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 +3 -5
- package/build/components/layout/index.js.map +1 -1
- package/build/components/meta-boxes/index.js +39 -19
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +46 -19
- 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/post-link/index.js +1 -1
- package/build/components/sidebar/post-link/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/components/visual-editor/index.js +6 -4
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/editor.js +9 -5
- package/build/editor.js.map +1 -1
- package/build/index.js +22 -12
- package/build/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js +6 -7
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +68 -59
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +0 -9
- package/build/store/defaults.js.map +1 -1
- package/build/store/reducer.js +20 -11
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +24 -10
- 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/more-menu/index.js +5 -15
- package/build-module/components/header/more-menu/index.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/header/writing-menu/index.js +7 -8
- package/build-module/components/header/writing-menu/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 +4 -6
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/meta-boxes/index.js +40 -19
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +47 -21
- 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/post-link/index.js +1 -1
- package/build-module/components/sidebar/post-link/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/components/visual-editor/index.js +6 -4
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/editor.js +9 -6
- package/build-module/editor.js.map +1 -1
- package/build-module/index.js +13 -5
- package/build-module/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js +7 -8
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +66 -59
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +0 -9
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/reducer.js +20 -11
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +20 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +52 -35
- package/build-style/style.css +52 -35
- package/package.json +27 -27
- package/src/components/header/fullscreen-mode-close/style.scss +2 -2
- package/src/components/header/header-toolbar/index.native.js +8 -2
- package/src/components/header/more-menu/index.js +8 -13
- package/src/components/header/template-title/index.js +3 -1
- package/src/components/header/writing-menu/index.js +7 -8
- 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-shortcut-help-modal/test/__snapshots__/index.js.snap +2 -2
- package/src/components/keyboard-shortcuts/index.js +19 -32
- package/src/components/layout/index.js +4 -10
- package/src/components/meta-boxes/index.js +41 -13
- package/src/components/preferences-modal/index.js +90 -36
- package/src/components/preferences-modal/style.scss +1 -17
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +297 -142
- package/src/components/secondary-sidebar/inserter-sidebar.js +1 -0
- package/src/components/sidebar/plugin-sidebar/index.js +1 -1
- package/src/components/sidebar/post-link/index.js +5 -1
- package/src/components/sidebar/template/actions.js +6 -1
- package/src/components/text-editor/style.scss +12 -22
- package/src/components/visual-editor/index.js +16 -10
- package/src/components/visual-editor/style.scss +3 -5
- package/src/components/welcome-guide/style.scss +5 -0
- package/src/editor.js +88 -79
- package/src/index.js +15 -5
- package/src/plugins/welcome-guide-menu-item/index.js +7 -12
- package/src/store/actions.js +99 -80
- package/src/store/defaults.js +0 -9
- package/src/store/reducer.js +17 -10
- package/src/store/selectors.js +27 -7
- package/src/store/test/actions.js +0 -11
- package/src/store/test/reducer.js +0 -12
- package/src/store/test/selectors.js +0 -46
- package/build/components/header/feature-toggle/index.js +0 -76
- package/build/components/header/feature-toggle/index.js.map +0 -1
- package/build-module/components/header/feature-toggle/index.js +0 -60
- package/build-module/components/header/feature-toggle/index.js.map +0 -1
- package/src/components/header/feature-toggle/index.js +0 -61
- package/src/components/header/more-menu/test/__snapshots__/index.js.snap +0 -129
- package/src/components/header/more-menu/test/index.js +0 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`PreferencesModal should match snapshot when the modal is active large viewports 1`] = `
|
|
4
|
-
<
|
|
4
|
+
<Modal
|
|
5
5
|
className="edit-post-preferences-modal"
|
|
6
6
|
closeLabel="Close"
|
|
7
7
|
onRequestClose={[Function]}
|
|
@@ -30,163 +30,318 @@ exports[`PreferencesModal should match snapshot when the modal is active large v
|
|
|
30
30
|
>
|
|
31
31
|
<Component />
|
|
32
32
|
</TabPanel>
|
|
33
|
-
</
|
|
33
|
+
</Modal>
|
|
34
34
|
`;
|
|
35
35
|
|
|
36
36
|
exports[`PreferencesModal should match snapshot when the modal is active small viewports 1`] = `
|
|
37
|
-
<
|
|
37
|
+
<Modal
|
|
38
38
|
className="edit-post-preferences-modal"
|
|
39
39
|
closeLabel="Close"
|
|
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
|
-
|
|
115
|
-
|
|
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
|
-
|
|
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"
|
|
145
176
|
>
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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"
|
|
205
|
+
/>
|
|
206
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
207
|
+
featureName="focusMode"
|
|
208
|
+
help="Highlights the current block and fades other content."
|
|
209
|
+
label="Spotlight mode"
|
|
210
|
+
/>
|
|
211
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
212
|
+
featureName="showIconLabels"
|
|
213
|
+
help="Shows text instead of icons."
|
|
214
|
+
label="Display button labels"
|
|
154
215
|
/>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
label="
|
|
159
|
-
panelName="post-excerpt"
|
|
216
|
+
<WithSelect(WithDispatch(BaseOption))
|
|
217
|
+
featureName="themeStyles"
|
|
218
|
+
help="Make the editor look like your theme."
|
|
219
|
+
label="Use theme styles"
|
|
160
220
|
/>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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"
|
|
173
260
|
/>
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
label="
|
|
178
|
-
panelName="page-attributes"
|
|
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"
|
|
179
265
|
/>
|
|
180
|
-
</
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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"
|
|
185
277
|
>
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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]}
|
|
305
|
+
/>
|
|
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>
|
|
346
|
+
</Modal>
|
|
192
347
|
`;
|
|
@@ -95,7 +95,11 @@ function PostLink( {
|
|
|
95
95
|
/>
|
|
96
96
|
<p>
|
|
97
97
|
{ __( 'The last part of the URL.' ) }{ ' ' }
|
|
98
|
-
<ExternalLink
|
|
98
|
+
<ExternalLink
|
|
99
|
+
href={ __(
|
|
100
|
+
'https://wordpress.org/support/article/writing-posts/#post-field-descriptions'
|
|
101
|
+
) }
|
|
102
|
+
>
|
|
99
103
|
{ __( 'Read about permalinks' ) }
|
|
100
104
|
</ExternalLink>
|
|
101
105
|
</p>
|
|
@@ -63,6 +63,11 @@ function PostTemplateActions() {
|
|
|
63
63
|
|
|
64
64
|
async function onCreateTemplate( event ) {
|
|
65
65
|
event.preventDefault();
|
|
66
|
+
|
|
67
|
+
if ( isBusy ) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
setIsBusy( true );
|
|
67
72
|
|
|
68
73
|
const newTemplateContent =
|
|
@@ -137,7 +142,7 @@ function PostTemplateActions() {
|
|
|
137
142
|
} }
|
|
138
143
|
overlayClassName="edit-post-template__modal"
|
|
139
144
|
>
|
|
140
|
-
<form onSubmit={
|
|
145
|
+
<form onSubmit={ onCreateTemplate }>
|
|
141
146
|
<Flex align="flex-start" gap={ 8 }>
|
|
142
147
|
<FlexItem>
|
|
143
148
|
<TextControl
|
|
@@ -5,36 +5,26 @@
|
|
|
5
5
|
flex-grow: 1;
|
|
6
6
|
|
|
7
7
|
// Post title.
|
|
8
|
-
.editor-post-title
|
|
8
|
+
.editor-post-title {
|
|
9
9
|
max-width: none;
|
|
10
10
|
line-height: $default-line-height;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
font-size: 2.5em;
|
|
16
|
-
font-weight: normal;
|
|
17
|
-
}
|
|
12
|
+
font-family: $editor-html-font;
|
|
13
|
+
font-size: 2.5em;
|
|
14
|
+
font-weight: normal;
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
.editor-post-title__input {
|
|
21
|
-
border: $border-width solid $gray-600;
|
|
22
|
-
margin-bottom: -$border-width;
|
|
16
|
+
border: $border-width solid $gray-600;
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@include break-small() {
|
|
27
|
-
padding: $grid-unit-30;
|
|
28
|
-
}
|
|
18
|
+
// Same padding as body.
|
|
19
|
+
padding: $grid-unit-20;
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
33
|
-
}
|
|
21
|
+
@include break-small() {
|
|
22
|
+
padding: $grid-unit-30;
|
|
34
23
|
}
|
|
35
24
|
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
&:focus {
|
|
26
|
+
border-color: var(--wp-admin-theme-color);
|
|
27
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
38
28
|
}
|
|
39
29
|
}
|
|
40
30
|
}
|
|
@@ -43,16 +43,10 @@ import { __ } from '@wordpress/i18n';
|
|
|
43
43
|
import BlockInspectorButton from './block-inspector-button';
|
|
44
44
|
import { store as editPostStore } from '../../store';
|
|
45
45
|
|
|
46
|
-
function MaybeIframe( {
|
|
47
|
-
children,
|
|
48
|
-
contentRef,
|
|
49
|
-
isTemplateMode,
|
|
50
|
-
styles,
|
|
51
|
-
style,
|
|
52
|
-
} ) {
|
|
46
|
+
function MaybeIframe( { children, contentRef, shouldIframe, styles, style } ) {
|
|
53
47
|
const ref = useMouseMoveTypingReset();
|
|
54
48
|
|
|
55
|
-
if ( !
|
|
49
|
+
if ( ! shouldIframe ) {
|
|
56
50
|
return (
|
|
57
51
|
<>
|
|
58
52
|
<EditorStyles styles={ styles } />
|
|
@@ -74,6 +68,7 @@ function MaybeIframe( {
|
|
|
74
68
|
ref={ ref }
|
|
75
69
|
contentRef={ contentRef }
|
|
76
70
|
style={ { width: '100%', height: '100%', display: 'block' } }
|
|
71
|
+
name="editor-canvas"
|
|
77
72
|
>
|
|
78
73
|
{ children }
|
|
79
74
|
</Iframe>
|
|
@@ -216,7 +211,11 @@ export default function VisualEditor( { styles } ) {
|
|
|
216
211
|
className={ previewMode }
|
|
217
212
|
>
|
|
218
213
|
<MaybeIframe
|
|
219
|
-
|
|
214
|
+
shouldIframe={
|
|
215
|
+
isTemplateMode ||
|
|
216
|
+
deviceType === 'Tablet' ||
|
|
217
|
+
deviceType === 'Mobile'
|
|
218
|
+
}
|
|
220
219
|
contentRef={ contentRef }
|
|
221
220
|
styles={ styles }
|
|
222
221
|
style={ { paddingBottom } }
|
|
@@ -233,7 +232,14 @@ export default function VisualEditor( { styles } ) {
|
|
|
233
232
|
</div>
|
|
234
233
|
) }
|
|
235
234
|
<RecursionProvider>
|
|
236
|
-
<BlockList
|
|
235
|
+
<BlockList
|
|
236
|
+
className={
|
|
237
|
+
isTemplateMode
|
|
238
|
+
? 'wp-site-blocks'
|
|
239
|
+
: undefined
|
|
240
|
+
}
|
|
241
|
+
__experimentalLayout={ layout }
|
|
242
|
+
/>
|
|
237
243
|
</RecursionProvider>
|
|
238
244
|
</MaybeIframe>
|
|
239
245
|
</motion.div>
|
|
@@ -39,16 +39,14 @@
|
|
|
39
39
|
// We need to have two DOM elements.
|
|
40
40
|
.edit-post-visual-editor__post-title-wrapper {
|
|
41
41
|
.editor-post-title {
|
|
42
|
-
// Add some top margin.
|
|
43
|
-
margin-top: 2em;
|
|
44
|
-
|
|
45
42
|
// Center.
|
|
46
43
|
margin-left: auto;
|
|
47
44
|
margin-right: auto;
|
|
48
45
|
|
|
49
46
|
// Margins between the title and the first block, or appender, do not collapse.
|
|
50
|
-
//
|
|
51
|
-
|
|
47
|
+
// However in that support block gap, the first items in post content do not have a top margin.
|
|
48
|
+
// By leveraging the gap variable, with a fallback of zero, we handle both cases.
|
|
49
|
+
margin-bottom: var(--wp--style--block-gap, 0);
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
|