@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.
Files changed (131) hide show
  1. package/README.md +2 -5
  2. package/build/components/header/header-toolbar/index.native.js +10 -3
  3. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  4. package/build/components/header/more-menu/index.js +3 -14
  5. package/build/components/header/more-menu/index.js.map +1 -1
  6. package/build/components/header/template-title/index.js +1 -1
  7. package/build/components/header/template-title/index.js.map +1 -1
  8. package/build/components/header/writing-menu/index.js +7 -10
  9. package/build/components/header/writing-menu/index.js.map +1 -1
  10. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  11. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  12. package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
  13. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  14. package/build/components/keyboard-shortcuts/index.js +1 -8
  15. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  16. package/build/components/layout/index.js +3 -5
  17. package/build/components/layout/index.js.map +1 -1
  18. package/build/components/meta-boxes/index.js +39 -19
  19. package/build/components/meta-boxes/index.js.map +1 -1
  20. package/build/components/preferences-modal/index.js +46 -19
  21. package/build/components/preferences-modal/index.js.map +1 -1
  22. package/build/components/secondary-sidebar/inserter-sidebar.js +2 -1
  23. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  24. package/build/components/sidebar/plugin-sidebar/index.js +1 -1
  25. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  26. package/build/components/sidebar/post-link/index.js +1 -1
  27. package/build/components/sidebar/post-link/index.js.map +1 -1
  28. package/build/components/sidebar/template/actions.js +6 -1
  29. package/build/components/sidebar/template/actions.js.map +1 -1
  30. package/build/components/visual-editor/index.js +6 -4
  31. package/build/components/visual-editor/index.js.map +1 -1
  32. package/build/editor.js +9 -5
  33. package/build/editor.js.map +1 -1
  34. package/build/index.js +22 -12
  35. package/build/index.js.map +1 -1
  36. package/build/plugins/welcome-guide-menu-item/index.js +6 -7
  37. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  38. package/build/store/actions.js +68 -59
  39. package/build/store/actions.js.map +1 -1
  40. package/build/store/defaults.js +0 -9
  41. package/build/store/defaults.js.map +1 -1
  42. package/build/store/reducer.js +20 -11
  43. package/build/store/reducer.js.map +1 -1
  44. package/build/store/selectors.js +24 -10
  45. package/build/store/selectors.js.map +1 -1
  46. package/build-module/components/header/header-toolbar/index.native.js +11 -4
  47. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  48. package/build-module/components/header/more-menu/index.js +5 -15
  49. package/build-module/components/header/more-menu/index.js.map +1 -1
  50. package/build-module/components/header/template-title/index.js +1 -1
  51. package/build-module/components/header/template-title/index.js.map +1 -1
  52. package/build-module/components/header/writing-menu/index.js +7 -8
  53. package/build-module/components/header/writing-menu/index.js.map +1 -1
  54. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  55. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  56. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -3
  57. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  58. package/build-module/components/keyboard-shortcuts/index.js +1 -8
  59. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  60. package/build-module/components/layout/index.js +4 -6
  61. package/build-module/components/layout/index.js.map +1 -1
  62. package/build-module/components/meta-boxes/index.js +40 -19
  63. package/build-module/components/meta-boxes/index.js.map +1 -1
  64. package/build-module/components/preferences-modal/index.js +47 -21
  65. package/build-module/components/preferences-modal/index.js.map +1 -1
  66. package/build-module/components/secondary-sidebar/inserter-sidebar.js +2 -1
  67. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  68. package/build-module/components/sidebar/plugin-sidebar/index.js +1 -1
  69. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  70. package/build-module/components/sidebar/post-link/index.js +1 -1
  71. package/build-module/components/sidebar/post-link/index.js.map +1 -1
  72. package/build-module/components/sidebar/template/actions.js +6 -1
  73. package/build-module/components/sidebar/template/actions.js.map +1 -1
  74. package/build-module/components/visual-editor/index.js +6 -4
  75. package/build-module/components/visual-editor/index.js.map +1 -1
  76. package/build-module/editor.js +9 -6
  77. package/build-module/editor.js.map +1 -1
  78. package/build-module/index.js +13 -5
  79. package/build-module/index.js.map +1 -1
  80. package/build-module/plugins/welcome-guide-menu-item/index.js +7 -8
  81. package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
  82. package/build-module/store/actions.js +66 -59
  83. package/build-module/store/actions.js.map +1 -1
  84. package/build-module/store/defaults.js +0 -9
  85. package/build-module/store/defaults.js.map +1 -1
  86. package/build-module/store/reducer.js +20 -11
  87. package/build-module/store/reducer.js.map +1 -1
  88. package/build-module/store/selectors.js +20 -7
  89. package/build-module/store/selectors.js.map +1 -1
  90. package/build-style/style-rtl.css +52 -35
  91. package/build-style/style.css +52 -35
  92. package/package.json +27 -27
  93. package/src/components/header/fullscreen-mode-close/style.scss +2 -2
  94. package/src/components/header/header-toolbar/index.native.js +8 -2
  95. package/src/components/header/more-menu/index.js +8 -13
  96. package/src/components/header/template-title/index.js +3 -1
  97. package/src/components/header/writing-menu/index.js +7 -8
  98. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +15 -12
  99. package/src/components/keyboard-shortcut-help-modal/index.js +1 -3
  100. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +2 -2
  101. package/src/components/keyboard-shortcuts/index.js +19 -32
  102. package/src/components/layout/index.js +4 -10
  103. package/src/components/meta-boxes/index.js +41 -13
  104. package/src/components/preferences-modal/index.js +90 -36
  105. package/src/components/preferences-modal/style.scss +1 -17
  106. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +297 -142
  107. package/src/components/secondary-sidebar/inserter-sidebar.js +1 -0
  108. package/src/components/sidebar/plugin-sidebar/index.js +1 -1
  109. package/src/components/sidebar/post-link/index.js +5 -1
  110. package/src/components/sidebar/template/actions.js +6 -1
  111. package/src/components/text-editor/style.scss +12 -22
  112. package/src/components/visual-editor/index.js +16 -10
  113. package/src/components/visual-editor/style.scss +3 -5
  114. package/src/components/welcome-guide/style.scss +5 -0
  115. package/src/editor.js +88 -79
  116. package/src/index.js +15 -5
  117. package/src/plugins/welcome-guide-menu-item/index.js +7 -12
  118. package/src/store/actions.js +99 -80
  119. package/src/store/defaults.js +0 -9
  120. package/src/store/reducer.js +17 -10
  121. package/src/store/selectors.js +27 -7
  122. package/src/store/test/actions.js +0 -11
  123. package/src/store/test/reducer.js +0 -12
  124. package/src/store/test/selectors.js +0 -46
  125. package/build/components/header/feature-toggle/index.js +0 -76
  126. package/build/components/header/feature-toggle/index.js.map +0 -1
  127. package/build-module/components/header/feature-toggle/index.js +0 -60
  128. package/build-module/components/header/feature-toggle/index.js.map +0 -1
  129. package/src/components/header/feature-toggle/index.js +0 -61
  130. package/src/components/header/more-menu/test/__snapshots__/index.js.snap +0 -129
  131. 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
- <WithInstanceId(Modal)
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
- </WithInstanceId(Modal)>
33
+ </Modal>
34
34
  `;
35
35
 
36
36
  exports[`PreferencesModal should match snapshot when the modal is active small viewports 1`] = `
37
- <WithInstanceId(Modal)
37
+ <Modal
38
38
  className="edit-post-preferences-modal"
39
39
  closeLabel="Close"
40
40
  onRequestClose={[Function]}
41
41
  title="Preferences"
42
42
  >
43
- <Navigation
44
- activeMenu="preferences-menu"
45
- onActivateMenu={[Function]}
43
+ <Card
44
+ isBorderless={true}
46
45
  >
47
- <NavigationMenu
48
- menu="preferences-menu"
49
- >
50
- <NavigationItem
51
- key="general"
52
- navigateToMenu="general"
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
- <WithSelect(WithDispatch(BaseOption))
78
- featureName="reducedUI"
79
- help="Compacts options and outlines in the toolbar."
80
- label="Reduce the interface"
81
- />
82
- <WithSelect(WithDispatch(BaseOption))
83
- featureName="focusMode"
84
- help="Highlights the current block and fades other content."
85
- label="Spotlight mode"
86
- />
87
- <WithSelect(WithDispatch(BaseOption))
88
- featureName="showIconLabels"
89
- help="Shows text instead of icons."
90
- label="Display button labels"
91
- />
92
- <WithSelect(WithDispatch(BaseOption))
93
- featureName="themeStyles"
94
- help="Make the editor look like your theme."
95
- label="Use theme styles"
96
- />
97
- <WithSelect(WithDispatch(BaseOption))
98
- featureName="showBlockBreadcrumbs"
99
- help="Shows block breadcrumbs at the bottom of the editor."
100
- label="Display block breadcrumbs"
101
- />
102
- </Section>
103
- </NavigationItem>
104
- </NavigationMenu>
105
- <NavigationMenu
106
- key="blocks-menu"
107
- menu="blocks"
108
- parentMenu="preferences-menu"
109
- title="Blocks"
110
- >
111
- <NavigationItem>
112
- <Section
113
- description="Customize how you interact with blocks in the block library and editing canvas."
114
- title="Block interactions"
115
- >
116
- <WithSelect(WithDispatch(BaseOption))
117
- featureName="mostUsedBlocks"
118
- help="Places the most frequent blocks in the block library."
119
- label="Show most used blocks"
120
- />
121
- <WithSelect(WithDispatch(BaseOption))
122
- featureName="keepCaretInsideBlock"
123
- help="Aids screen readers by stopping text caret from leaving blocks."
124
- label="Contain text cursor inside block"
125
- />
126
- </Section>
127
- <Section
128
- description="Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."
129
- title="Visible blocks"
130
- >
131
- <WithSelect(BlockManager) />
132
- </Section>
133
- </NavigationItem>
134
- </NavigationMenu>
135
- <NavigationMenu
136
- key="panels-menu"
137
- menu="panels"
138
- parentMenu="preferences-menu"
139
- title="Panels"
140
- >
141
- <NavigationItem>
142
- <Section
143
- description="Choose what displays in the panel."
144
- title="Document settings"
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
- <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"
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
- </PostFeaturedImageCheck>
156
- <PostExcerptCheck>
157
- <WithSelect(IfCondition(WithDispatch(BaseOption)))
158
- label="Excerpt"
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
- </PostExcerptCheck>
162
- <WithSelect(PostTypeSupportCheck)
163
- supportKeys={
164
- Array [
165
- "comments",
166
- "trackbacks",
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(IfCondition(WithDispatch(BaseOption)))
171
- label="Discussion"
172
- panelName="discussion-panel"
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
- </WithSelect(PostTypeSupportCheck)>
175
- <PageAttributesCheck>
176
- <WithSelect(IfCondition(WithDispatch(BaseOption)))
177
- label="Page attributes"
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
- </PageAttributesCheck>
181
- </Section>
182
- <Section
183
- description="Add extra areas to the editor."
184
- title="Additional"
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
- <WithSelect(MetaBoxesSection) />
187
- </Section>
188
- </NavigationItem>
189
- </NavigationMenu>
190
- </Navigation>
191
- </WithInstanceId(Modal)>
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
  `;
@@ -53,6 +53,7 @@ export default function InserterSidebar() {
53
53
  __experimentalInsertionIndex={
54
54
  insertionPoint.insertionIndex
55
55
  }
56
+ __experimentalFilterValue={ insertionPoint.filterValue }
56
57
  />
57
58
  </div>
58
59
  </div>
@@ -88,7 +88,7 @@ export default function PluginSidebarEditPost( { className, ...props } ) {
88
88
  'showIconLabels'
89
89
  ),
90
90
  };
91
- } );
91
+ }, [] );
92
92
  return (
93
93
  <ComplementaryArea
94
94
  panelClassName={ className }
@@ -95,7 +95,11 @@ function PostLink( {
95
95
  />
96
96
  <p>
97
97
  { __( 'The last part of the URL.' ) }{ ' ' }
98
- <ExternalLink href="https://wordpress.org/support/article/writing-posts/#post-field-descriptions">
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={ isBusy ? undefined : onCreateTemplate }>
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.editor-post-title__block {
8
+ .editor-post-title {
9
9
  max-width: none;
10
10
  line-height: $default-line-height;
11
11
 
12
- // This needs specificity to change the title block appearance on the code editor.
13
- .editor-post-title__input.editor-post-title__input.editor-post-title__input {
14
- font-family: $editor-html-font;
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
- // Always show outlines in code editor
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
- // Same padding as body.
25
- padding: $grid-unit-20;
26
- @include break-small() {
27
- padding: $grid-unit-30;
28
- }
18
+ // Same padding as body.
19
+ padding: $grid-unit-20;
29
20
 
30
- &:focus {
31
- border-color: var(--wp-admin-theme-color);
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
- @include break-small() {
37
- padding: 0;
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 ( ! isTemplateMode ) {
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
- isTemplateMode={ isTemplateMode }
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 __experimentalLayout={ layout } />
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
- // By explicitly setting this to zero, we avoid "double margin".
51
- margin-bottom: 0;
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
 
@@ -4,6 +4,11 @@
4
4
  &__image {
5
5
  background: #00a0d2;
6
6
  margin: 0 0 $grid-unit-20;
7
+ > img {
8
+ display: block;
9
+ max-width: 100%;
10
+ object-fit: cover;
11
+ }
7
12
  }
8
13
 
9
14
  &__heading {