@wordpress/edit-post 5.0.1 → 5.0.5

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 (162) hide show
  1. package/README.md +2 -5
  2. package/build/components/header/fullscreen-mode-close/index.js +19 -3
  3. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  4. package/build/components/header/header-toolbar/index.native.js +10 -3
  5. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  6. package/build/components/header/more-menu/index.js +3 -14
  7. package/build/components/header/more-menu/index.js.map +1 -1
  8. package/build/components/header/template-title/index.js +1 -1
  9. package/build/components/header/template-title/index.js.map +1 -1
  10. package/build/components/header/writing-menu/index.js +7 -10
  11. package/build/components/header/writing-menu/index.js.map +1 -1
  12. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  13. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  14. package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
  15. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  16. package/build/components/keyboard-shortcuts/index.js +1 -8
  17. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  18. package/build/components/layout/index.js +3 -5
  19. package/build/components/layout/index.js.map +1 -1
  20. package/build/components/layout/index.native.js +5 -1
  21. package/build/components/layout/index.native.js.map +1 -1
  22. package/build/components/meta-boxes/index.js +37 -20
  23. package/build/components/meta-boxes/index.js.map +1 -1
  24. package/build/components/preferences-modal/index.js +56 -18
  25. package/build/components/preferences-modal/index.js.map +1 -1
  26. package/build/components/secondary-sidebar/inserter-sidebar.js +2 -1
  27. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  28. package/build/components/secondary-sidebar/list-view-sidebar.js +1 -0
  29. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  30. package/build/components/sidebar/plugin-sidebar/index.js +1 -1
  31. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  32. package/build/components/sidebar/post-link/index.js +1 -1
  33. package/build/components/sidebar/post-link/index.js.map +1 -1
  34. package/build/components/sidebar/template/actions.js +6 -1
  35. package/build/components/sidebar/template/actions.js.map +1 -1
  36. package/build/components/sidebar/template/index.js +5 -2
  37. package/build/components/sidebar/template/index.js.map +1 -1
  38. package/build/components/sidebar/template-summary/index.js +2 -1
  39. package/build/components/sidebar/template-summary/index.js.map +1 -1
  40. package/build/components/visual-editor/index.js +6 -4
  41. package/build/components/visual-editor/index.js.map +1 -1
  42. package/build/editor.js +17 -5
  43. package/build/editor.js.map +1 -1
  44. package/build/hooks/validate-multiple-use/index.js +1 -1
  45. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  46. package/build/index.js +28 -12
  47. package/build/index.js.map +1 -1
  48. package/build/plugins/welcome-guide-menu-item/index.js +6 -7
  49. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  50. package/build/store/actions.js +68 -59
  51. package/build/store/actions.js.map +1 -1
  52. package/build/store/defaults.js +0 -9
  53. package/build/store/defaults.js.map +1 -1
  54. package/build/store/reducer.js +20 -11
  55. package/build/store/reducer.js.map +1 -1
  56. package/build/store/selectors.js +24 -10
  57. package/build/store/selectors.js.map +1 -1
  58. package/build-module/components/header/fullscreen-mode-close/index.js +19 -4
  59. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  60. package/build-module/components/header/header-toolbar/index.native.js +11 -4
  61. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  62. package/build-module/components/header/more-menu/index.js +5 -15
  63. package/build-module/components/header/more-menu/index.js.map +1 -1
  64. package/build-module/components/header/template-title/index.js +1 -1
  65. package/build-module/components/header/template-title/index.js.map +1 -1
  66. package/build-module/components/header/writing-menu/index.js +7 -8
  67. package/build-module/components/header/writing-menu/index.js.map +1 -1
  68. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  69. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  70. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -3
  71. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  72. package/build-module/components/keyboard-shortcuts/index.js +1 -8
  73. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  74. package/build-module/components/layout/index.js +4 -6
  75. package/build-module/components/layout/index.js.map +1 -1
  76. package/build-module/components/layout/index.native.js +5 -1
  77. package/build-module/components/layout/index.native.js.map +1 -1
  78. package/build-module/components/meta-boxes/index.js +38 -20
  79. package/build-module/components/meta-boxes/index.js.map +1 -1
  80. package/build-module/components/preferences-modal/index.js +57 -20
  81. package/build-module/components/preferences-modal/index.js.map +1 -1
  82. package/build-module/components/secondary-sidebar/inserter-sidebar.js +2 -1
  83. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  84. package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -0
  85. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  86. package/build-module/components/sidebar/plugin-sidebar/index.js +1 -1
  87. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  88. package/build-module/components/sidebar/post-link/index.js +1 -1
  89. package/build-module/components/sidebar/post-link/index.js.map +1 -1
  90. package/build-module/components/sidebar/template/actions.js +6 -1
  91. package/build-module/components/sidebar/template/actions.js.map +1 -1
  92. package/build-module/components/sidebar/template/index.js +5 -2
  93. package/build-module/components/sidebar/template/index.js.map +1 -1
  94. package/build-module/components/sidebar/template-summary/index.js +2 -1
  95. package/build-module/components/sidebar/template-summary/index.js.map +1 -1
  96. package/build-module/components/visual-editor/index.js +6 -4
  97. package/build-module/components/visual-editor/index.js.map +1 -1
  98. package/build-module/editor.js +17 -6
  99. package/build-module/editor.js.map +1 -1
  100. package/build-module/hooks/validate-multiple-use/index.js +1 -1
  101. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  102. package/build-module/index.js +18 -5
  103. package/build-module/index.js.map +1 -1
  104. package/build-module/plugins/welcome-guide-menu-item/index.js +7 -8
  105. package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
  106. package/build-module/store/actions.js +66 -59
  107. package/build-module/store/actions.js.map +1 -1
  108. package/build-module/store/defaults.js +0 -9
  109. package/build-module/store/defaults.js.map +1 -1
  110. package/build-module/store/reducer.js +20 -11
  111. package/build-module/store/reducer.js.map +1 -1
  112. package/build-module/store/selectors.js +20 -7
  113. package/build-module/store/selectors.js.map +1 -1
  114. package/build-style/style-rtl.css +68 -69
  115. package/build-style/style.css +68 -69
  116. package/package.json +27 -27
  117. package/src/components/header/fullscreen-mode-close/index.js +37 -15
  118. package/src/components/header/fullscreen-mode-close/style.scss +2 -2
  119. package/src/components/header/header-toolbar/index.native.js +8 -2
  120. package/src/components/header/more-menu/index.js +8 -13
  121. package/src/components/header/template-title/index.js +3 -1
  122. package/src/components/header/writing-menu/index.js +7 -8
  123. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +15 -12
  124. package/src/components/keyboard-shortcut-help-modal/index.js +1 -3
  125. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +2 -2
  126. package/src/components/keyboard-shortcuts/index.js +19 -32
  127. package/src/components/layout/index.js +4 -10
  128. package/src/components/layout/index.native.js +7 -1
  129. package/src/components/meta-boxes/index.js +35 -14
  130. package/src/components/preferences-modal/index.js +93 -30
  131. package/src/components/preferences-modal/style.scss +6 -56
  132. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +334 -136
  133. package/src/components/secondary-sidebar/inserter-sidebar.js +1 -0
  134. package/src/components/secondary-sidebar/list-view-sidebar.js +1 -0
  135. package/src/components/sidebar/plugin-sidebar/index.js +1 -1
  136. package/src/components/sidebar/post-link/index.js +5 -1
  137. package/src/components/sidebar/template/actions.js +6 -1
  138. package/src/components/sidebar/template/index.js +5 -3
  139. package/src/components/sidebar/template-summary/index.js +1 -1
  140. package/src/components/sidebar/template-summary/style.scss +2 -1
  141. package/src/components/text-editor/style.scss +12 -22
  142. package/src/components/visual-editor/index.js +16 -10
  143. package/src/components/visual-editor/style.scss +4 -7
  144. package/src/components/welcome-guide/style.scss +5 -0
  145. package/src/editor.js +101 -79
  146. package/src/hooks/validate-multiple-use/index.js +1 -1
  147. package/src/index.js +18 -5
  148. package/src/plugins/welcome-guide-menu-item/index.js +7 -12
  149. package/src/store/actions.js +99 -80
  150. package/src/store/defaults.js +0 -9
  151. package/src/store/reducer.js +17 -10
  152. package/src/store/selectors.js +27 -7
  153. package/src/store/test/actions.js +0 -11
  154. package/src/store/test/reducer.js +0 -12
  155. package/src/store/test/selectors.js +0 -46
  156. package/build/components/header/feature-toggle/index.js +0 -76
  157. package/build/components/header/feature-toggle/index.js.map +0 -1
  158. package/build-module/components/header/feature-toggle/index.js +0 -60
  159. package/build-module/components/header/feature-toggle/index.js.map +0 -1
  160. package/src/components/header/feature-toggle/index.js +0 -61
  161. package/src/components/header/more-menu/test/__snapshots__/index.js.snap +0 -129
  162. 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,361 @@ 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
+ <NavigatorProvider
44
+ initialPath="/"
46
45
  >
47
- <NavigationMenu
48
- menu="preferences-menu"
46
+ <NavigatorScreen
47
+ path="/"
49
48
  >
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
49
+ <Card
50
+ isBorderless={true}
51
+ size="small"
52
+ >
53
+ <CardBody>
54
+ <ItemGroup>
55
+ <NavigationButton
56
+ as={
57
+ Object {
58
+ "$$typeof": Symbol(react.forward_ref),
59
+ "__contextSystemKey__": Array [
60
+ "Item",
61
+ ],
62
+ "render": [Function],
63
+ "selector": ".components-item",
64
+ }
65
+ }
66
+ isAction={true}
67
+ key="general"
68
+ path="general"
69
+ >
70
+ <HStack
71
+ justify="space-between"
72
+ >
73
+ <FlexItem>
74
+ <Truncate>
75
+ General
76
+ </Truncate>
77
+ </FlexItem>
78
+ <FlexItem>
79
+ <Icon
80
+ icon={
81
+ <SVG
82
+ viewBox="0 0 24 24"
83
+ xmlns="http://www.w3.org/2000/svg"
84
+ >
85
+ <Path
86
+ d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
87
+ />
88
+ </SVG>
89
+ }
90
+ />
91
+ </FlexItem>
92
+ </HStack>
93
+ </NavigationButton>
94
+ <NavigationButton
95
+ as={
96
+ Object {
97
+ "$$typeof": Symbol(react.forward_ref),
98
+ "__contextSystemKey__": Array [
99
+ "Item",
100
+ ],
101
+ "render": [Function],
102
+ "selector": ".components-item",
103
+ }
104
+ }
105
+ isAction={true}
106
+ key="blocks"
107
+ path="blocks"
108
+ >
109
+ <HStack
110
+ justify="space-between"
111
+ >
112
+ <FlexItem>
113
+ <Truncate>
114
+ Blocks
115
+ </Truncate>
116
+ </FlexItem>
117
+ <FlexItem>
118
+ <Icon
119
+ icon={
120
+ <SVG
121
+ viewBox="0 0 24 24"
122
+ xmlns="http://www.w3.org/2000/svg"
123
+ >
124
+ <Path
125
+ d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
126
+ />
127
+ </SVG>
128
+ }
129
+ />
130
+ </FlexItem>
131
+ </HStack>
132
+ </NavigationButton>
133
+ <NavigationButton
134
+ as={
135
+ Object {
136
+ "$$typeof": Symbol(react.forward_ref),
137
+ "__contextSystemKey__": Array [
138
+ "Item",
139
+ ],
140
+ "render": [Function],
141
+ "selector": ".components-item",
142
+ }
143
+ }
144
+ isAction={true}
145
+ key="panels"
146
+ path="panels"
147
+ >
148
+ <HStack
149
+ justify="space-between"
150
+ >
151
+ <FlexItem>
152
+ <Truncate>
153
+ Panels
154
+ </Truncate>
155
+ </FlexItem>
156
+ <FlexItem>
157
+ <Icon
158
+ icon={
159
+ <SVG
160
+ viewBox="0 0 24 24"
161
+ xmlns="http://www.w3.org/2000/svg"
162
+ >
163
+ <Path
164
+ d="M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
165
+ />
166
+ </SVG>
167
+ }
168
+ />
169
+ </FlexItem>
170
+ </HStack>
171
+ </NavigationButton>
172
+ </ItemGroup>
173
+ </CardBody>
174
+ </Card>
175
+ </NavigatorScreen>
176
+ <NavigatorScreen
67
177
  key="general-menu"
68
- menu="general"
69
- parentMenu="preferences-menu"
70
- title="General"
178
+ path="general"
71
179
  >
72
- <NavigationItem>
73
- <Section
74
- description="Customize options related to the block editor interface and editing flow."
75
- title="Appearance"
180
+ <Card
181
+ isBorderless={true}
182
+ size="large"
183
+ >
184
+ <CardHeader
185
+ gap="6"
186
+ isBorderless={false}
187
+ justify="left"
188
+ size="small"
76
189
  >
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"
190
+ <NavigationButton
191
+ aria-label="Navigate to the previous view"
192
+ icon={
193
+ <SVG
194
+ viewBox="0 0 24 24"
195
+ xmlns="http://www.w3.org/2000/svg"
196
+ >
197
+ <Path
198
+ d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
199
+ />
200
+ </SVG>
201
+ }
202
+ isBack={true}
203
+ path="/"
101
204
  />
102
- </Section>
103
- </NavigationItem>
104
- </NavigationMenu>
105
- <NavigationMenu
205
+ <Text
206
+ size="16"
207
+ >
208
+ General
209
+ </Text>
210
+ </CardHeader>
211
+ <CardBody>
212
+ <Section
213
+ description="Customize options related to the block editor interface and editing flow."
214
+ title="Appearance"
215
+ >
216
+ <WithSelect(WithDispatch(BaseOption))
217
+ featureName="reducedUI"
218
+ help="Compacts options and outlines in the toolbar."
219
+ label="Reduce the interface"
220
+ />
221
+ <WithSelect(WithDispatch(BaseOption))
222
+ featureName="focusMode"
223
+ help="Highlights the current block and fades other content."
224
+ label="Spotlight mode"
225
+ />
226
+ <WithSelect(WithDispatch(BaseOption))
227
+ featureName="showIconLabels"
228
+ help="Shows text instead of icons."
229
+ label="Display button labels"
230
+ />
231
+ <WithSelect(WithDispatch(BaseOption))
232
+ featureName="themeStyles"
233
+ help="Make the editor look like your theme."
234
+ label="Use theme styles"
235
+ />
236
+ <WithSelect(WithDispatch(BaseOption))
237
+ featureName="showBlockBreadcrumbs"
238
+ help="Shows block breadcrumbs at the bottom of the editor."
239
+ label="Display block breadcrumbs"
240
+ />
241
+ </Section>
242
+ </CardBody>
243
+ </Card>
244
+ </NavigatorScreen>
245
+ <NavigatorScreen
106
246
  key="blocks-menu"
107
- menu="blocks"
108
- parentMenu="preferences-menu"
109
- title="Blocks"
247
+ path="blocks"
110
248
  >
111
- <NavigationItem>
112
- <Section
113
- description="Customize how you interact with blocks in the block library and editing canvas."
114
- title="Block interactions"
249
+ <Card
250
+ isBorderless={true}
251
+ size="large"
252
+ >
253
+ <CardHeader
254
+ gap="6"
255
+ isBorderless={false}
256
+ justify="left"
257
+ size="small"
115
258
  >
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"
259
+ <NavigationButton
260
+ aria-label="Navigate to the previous view"
261
+ icon={
262
+ <SVG
263
+ viewBox="0 0 24 24"
264
+ xmlns="http://www.w3.org/2000/svg"
265
+ >
266
+ <Path
267
+ d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
268
+ />
269
+ </SVG>
270
+ }
271
+ isBack={true}
272
+ path="/"
125
273
  />
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
274
+ <Text
275
+ size="16"
276
+ >
277
+ Blocks
278
+ </Text>
279
+ </CardHeader>
280
+ <CardBody>
281
+ <Section
282
+ description="Customize how you interact with blocks in the block library and editing canvas."
283
+ title="Block interactions"
284
+ >
285
+ <WithSelect(WithDispatch(BaseOption))
286
+ featureName="mostUsedBlocks"
287
+ help="Places the most frequent blocks in the block library."
288
+ label="Show most used blocks"
289
+ />
290
+ <WithSelect(WithDispatch(BaseOption))
291
+ featureName="keepCaretInsideBlock"
292
+ help="Aids screen readers by stopping text caret from leaving blocks."
293
+ label="Contain text cursor inside block"
294
+ />
295
+ </Section>
296
+ <Section
297
+ description="Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."
298
+ title="Visible blocks"
299
+ >
300
+ <WithSelect(BlockManager) />
301
+ </Section>
302
+ </CardBody>
303
+ </Card>
304
+ </NavigatorScreen>
305
+ <NavigatorScreen
136
306
  key="panels-menu"
137
- menu="panels"
138
- parentMenu="preferences-menu"
139
- title="Panels"
307
+ path="panels"
140
308
  >
141
- <NavigationItem>
142
- <Section
143
- description="Choose what displays in the panel."
144
- title="Document settings"
309
+ <Card
310
+ isBorderless={true}
311
+ size="large"
312
+ >
313
+ <CardHeader
314
+ gap="6"
315
+ isBorderless={false}
316
+ justify="left"
317
+ size="small"
145
318
  >
146
- <EnablePluginDocumentSettingPanelOptionSlot />
147
- <WithSelect(PostTaxonomies)
148
- taxonomyWrapper={[Function]}
149
- />
150
- <PostFeaturedImageCheck>
151
- <WithSelect(IfCondition(WithDispatch(BaseOption)))
152
- label="Featured image"
153
- panelName="featured-image"
154
- />
155
- </PostFeaturedImageCheck>
156
- <PostExcerptCheck>
157
- <WithSelect(IfCondition(WithDispatch(BaseOption)))
158
- label="Excerpt"
159
- panelName="post-excerpt"
160
- />
161
- </PostExcerptCheck>
162
- <WithSelect(PostTypeSupportCheck)
163
- supportKeys={
164
- Array [
165
- "comments",
166
- "trackbacks",
167
- ]
319
+ <NavigationButton
320
+ aria-label="Navigate to the previous view"
321
+ icon={
322
+ <SVG
323
+ viewBox="0 0 24 24"
324
+ xmlns="http://www.w3.org/2000/svg"
325
+ >
326
+ <Path
327
+ d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
328
+ />
329
+ </SVG>
168
330
  }
331
+ isBack={true}
332
+ path="/"
333
+ />
334
+ <Text
335
+ size="16"
169
336
  >
170
- <WithSelect(IfCondition(WithDispatch(BaseOption)))
171
- label="Discussion"
172
- panelName="discussion-panel"
173
- />
174
- </WithSelect(PostTypeSupportCheck)>
175
- <PageAttributesCheck>
176
- <WithSelect(IfCondition(WithDispatch(BaseOption)))
177
- label="Page attributes"
178
- panelName="page-attributes"
337
+ Panels
338
+ </Text>
339
+ </CardHeader>
340
+ <CardBody>
341
+ <Section
342
+ description="Choose what displays in the panel."
343
+ title="Document settings"
344
+ >
345
+ <EnablePluginDocumentSettingPanelOptionSlot />
346
+ <WithSelect(PostTaxonomies)
347
+ taxonomyWrapper={[Function]}
179
348
  />
180
- </PageAttributesCheck>
181
- </Section>
182
- <Section
183
- description="Add extra areas to the editor."
184
- title="Additional"
185
- >
186
- <WithSelect(MetaBoxesSection) />
187
- </Section>
188
- </NavigationItem>
189
- </NavigationMenu>
190
- </Navigation>
191
- </WithInstanceId(Modal)>
349
+ <PostFeaturedImageCheck>
350
+ <WithSelect(IfCondition(WithDispatch(BaseOption)))
351
+ label="Featured image"
352
+ panelName="featured-image"
353
+ />
354
+ </PostFeaturedImageCheck>
355
+ <PostExcerptCheck>
356
+ <WithSelect(IfCondition(WithDispatch(BaseOption)))
357
+ label="Excerpt"
358
+ panelName="post-excerpt"
359
+ />
360
+ </PostExcerptCheck>
361
+ <WithSelect(PostTypeSupportCheck)
362
+ supportKeys={
363
+ Array [
364
+ "comments",
365
+ "trackbacks",
366
+ ]
367
+ }
368
+ >
369
+ <WithSelect(IfCondition(WithDispatch(BaseOption)))
370
+ label="Discussion"
371
+ panelName="discussion-panel"
372
+ />
373
+ </WithSelect(PostTypeSupportCheck)>
374
+ <PageAttributesCheck>
375
+ <WithSelect(IfCondition(WithDispatch(BaseOption)))
376
+ label="Page attributes"
377
+ panelName="page-attributes"
378
+ />
379
+ </PageAttributesCheck>
380
+ </Section>
381
+ <WithSelect(MetaBoxesSection)
382
+ description="Add extra areas to the editor."
383
+ title="Additional"
384
+ />
385
+ </CardBody>
386
+ </Card>
387
+ </NavigatorScreen>
388
+ </NavigatorProvider>
389
+ </Modal>
192
390
  `;
@@ -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>
@@ -65,6 +65,7 @@ export default function ListViewSidebar() {
65
65
  <ListView
66
66
  onSelect={ selectEditorBlock }
67
67
  showNestedBlocks
68
+ __experimentalFeatures
68
69
  __experimentalPersistentListViewFeatures
69
70
  />
70
71
  </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
@@ -47,13 +47,15 @@ export function TemplatePanel() {
47
47
  getCurrentPostType,
48
48
  } = select( editorStore );
49
49
  const { getPostType, getEntityRecords, canUser } = select( coreStore );
50
- const _isViewable =
51
- getPostType( getCurrentPostType() )?.viewable ?? false;
50
+ const currentPostType = getCurrentPostType();
51
+ const _isViewable = getPostType( currentPostType )?.viewable ?? false;
52
52
  const _supportsTemplateMode =
53
53
  select( editorStore ).getEditorSettings().supportsTemplateMode &&
54
54
  _isViewable;
55
55
 
56
- const wpTemplates = getEntityRecords( 'postType', 'wp_template' );
56
+ const wpTemplates = getEntityRecords( 'postType', 'wp_template', {
57
+ post_type: currentPostType,
58
+ } );
57
59
 
58
60
  const newAvailableTemplates = fromPairs(
59
61
  ( wpTemplates || [] ).map( ( { slug, title } ) => [
@@ -22,7 +22,7 @@ function TemplateSummary() {
22
22
 
23
23
  return (
24
24
  <PanelBody>
25
- <Flex align="flex-start">
25
+ <Flex align="flex-start" gap="3">
26
26
  <FlexItem>
27
27
  <Icon icon={ layout } />
28
28
  </FlexItem>
@@ -1,4 +1,5 @@
1
1
  h2.edit-post-template-summary__title {
2
- margin: 0;
3
2
  line-height: $icon-size;
3
+ margin: 0 0 $grid-unit-05;
4
+ font-weight: 500;
4
5
  }
@@ -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
  }