@wordpress/edit-post 5.0.3 → 5.0.4
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/build/components/header/fullscreen-mode-close/index.js +19 -3
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/layout/index.native.js +5 -1
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/preferences-modal/index.js +18 -7
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +1 -0
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/template-summary/index.js +2 -1
- package/build/components/sidebar/template-summary/index.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js +1 -1
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/index.js +5 -0
- package/build/index.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js +19 -4
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +5 -1
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +19 -8
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -0
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/template-summary/index.js +2 -1
- package/build-module/components/sidebar/template-summary/index.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js +1 -1
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/index.js +4 -0
- package/build-module/index.js.map +1 -1
- package/build-style/style-rtl.css +18 -36
- package/build-style/style.css +18 -36
- package/package.json +21 -21
- package/src/components/header/fullscreen-mode-close/index.js +37 -15
- package/src/components/layout/index.native.js +7 -1
- package/src/components/preferences-modal/index.js +30 -21
- package/src/components/preferences-modal/style.scss +6 -40
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +79 -36
- package/src/components/secondary-sidebar/list-view-sidebar.js +1 -0
- package/src/components/sidebar/template-summary/index.js +1 -1
- package/src/components/sidebar/template-summary/style.scss +2 -1
- package/src/components/visual-editor/style.scss +4 -5
- package/src/hooks/validate-multiple-use/index.js +1 -1
- package/src/index.js +2 -0
package/build-style/style.css
CHANGED
|
@@ -163,12 +163,18 @@
|
|
|
163
163
|
.interface-complementary-area p {
|
|
164
164
|
margin-top: 0;
|
|
165
165
|
}
|
|
166
|
-
.interface-complementary-area h2
|
|
167
|
-
.interface-complementary-area h3 {
|
|
166
|
+
.interface-complementary-area h2 {
|
|
168
167
|
font-size: 13px;
|
|
169
168
|
color: #1e1e1e;
|
|
170
169
|
margin-bottom: 1.5em;
|
|
171
170
|
}
|
|
171
|
+
.interface-complementary-area h3 {
|
|
172
|
+
font-size: 11px;
|
|
173
|
+
text-transform: uppercase;
|
|
174
|
+
font-weight: 500;
|
|
175
|
+
color: #1e1e1e;
|
|
176
|
+
margin-bottom: 1.5em;
|
|
177
|
+
}
|
|
172
178
|
.interface-complementary-area hr {
|
|
173
179
|
border-top: none;
|
|
174
180
|
border-bottom: 1px solid #f0f0f0;
|
|
@@ -1317,38 +1323,9 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1317
1323
|
.edit-post-preferences-modal .components-modal__content::before {
|
|
1318
1324
|
content: none;
|
|
1319
1325
|
}
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
max-height: 100%;
|
|
1324
|
-
overflow-y: auto;
|
|
1325
|
-
color: #000;
|
|
1326
|
-
}
|
|
1327
|
-
.edit-post-preferences-modal .components-navigation > * {
|
|
1328
|
-
padding: 24px 32px;
|
|
1329
|
-
}
|
|
1330
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu {
|
|
1331
|
-
margin: 0;
|
|
1332
|
-
}
|
|
1333
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button {
|
|
1334
|
-
padding: 3px 16px;
|
|
1335
|
-
height: 48px;
|
|
1336
|
-
margin: 0 -16px;
|
|
1337
|
-
width: calc(32px + 100%);
|
|
1338
|
-
}
|
|
1339
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:focus {
|
|
1340
|
-
font-weight: 500;
|
|
1341
|
-
}
|
|
1342
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__menu-title-heading {
|
|
1343
|
-
border-bottom: 1px solid #ddd;
|
|
1344
|
-
padding-left: 0;
|
|
1345
|
-
padding-right: 0;
|
|
1346
|
-
}
|
|
1347
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button {
|
|
1348
|
-
padding-left: 0;
|
|
1349
|
-
}
|
|
1350
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
1351
|
-
width: auto;
|
|
1326
|
+
.edit-post-preferences-modal .components-navigator-provider {
|
|
1327
|
+
height: 100%;
|
|
1328
|
+
}
|
|
1352
1329
|
}
|
|
1353
1330
|
.edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs {
|
|
1354
1331
|
position: absolute;
|
|
@@ -1381,6 +1358,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1381
1358
|
.edit-post-preferences-modal__section-title {
|
|
1382
1359
|
font-size: 0.9rem;
|
|
1383
1360
|
font-weight: 600;
|
|
1361
|
+
margin-top: 0;
|
|
1384
1362
|
}
|
|
1385
1363
|
.edit-post-preferences-modal__option .components-base-control .components-base-control__field {
|
|
1386
1364
|
align-items: center;
|
|
@@ -1678,8 +1656,9 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1678
1656
|
}
|
|
1679
1657
|
|
|
1680
1658
|
h2.edit-post-template-summary__title {
|
|
1681
|
-
margin: 0;
|
|
1682
1659
|
line-height: 24px;
|
|
1660
|
+
margin: 0 0 4px;
|
|
1661
|
+
font-weight: 500;
|
|
1683
1662
|
}
|
|
1684
1663
|
|
|
1685
1664
|
.edit-post-text-editor {
|
|
@@ -1767,10 +1746,13 @@ h2.edit-post-template-summary__title {
|
|
|
1767
1746
|
padding: 6px;
|
|
1768
1747
|
}
|
|
1769
1748
|
|
|
1749
|
+
.edit-post-visual-editor__post-title-wrapper {
|
|
1750
|
+
margin-top: 4rem;
|
|
1751
|
+
margin-bottom: var(--wp--style--block-gap);
|
|
1752
|
+
}
|
|
1770
1753
|
.edit-post-visual-editor__post-title-wrapper .editor-post-title {
|
|
1771
1754
|
margin-left: auto;
|
|
1772
1755
|
margin-right: auto;
|
|
1773
|
-
margin-bottom: var(--wp--style--block-gap, 0);
|
|
1774
1756
|
}
|
|
1775
1757
|
|
|
1776
1758
|
.edit-post-visual-editor__exit-template-mode {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -28,29 +28,29 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.13.10",
|
|
30
30
|
"@wordpress/a11y": "^3.2.3",
|
|
31
|
-
"@wordpress/api-fetch": "^5.2.
|
|
32
|
-
"@wordpress/block-editor": "^7.0.
|
|
33
|
-
"@wordpress/block-library": "^6.0.
|
|
34
|
-
"@wordpress/blocks": "^11.1.
|
|
35
|
-
"@wordpress/components": "^
|
|
36
|
-
"@wordpress/compose": "^5.0.
|
|
37
|
-
"@wordpress/core-data": "^4.0.
|
|
38
|
-
"@wordpress/data": "^6.1.
|
|
39
|
-
"@wordpress/data-controls": "^2.2.
|
|
40
|
-
"@wordpress/editor": "^12.0.
|
|
41
|
-
"@wordpress/element": "^4.0.
|
|
31
|
+
"@wordpress/api-fetch": "^5.2.4",
|
|
32
|
+
"@wordpress/block-editor": "^7.0.4",
|
|
33
|
+
"@wordpress/block-library": "^6.0.2",
|
|
34
|
+
"@wordpress/blocks": "^11.1.2",
|
|
35
|
+
"@wordpress/components": "^19.0.0",
|
|
36
|
+
"@wordpress/compose": "^5.0.4",
|
|
37
|
+
"@wordpress/core-data": "^4.0.4",
|
|
38
|
+
"@wordpress/data": "^6.1.2",
|
|
39
|
+
"@wordpress/data-controls": "^2.2.5",
|
|
40
|
+
"@wordpress/editor": "^12.0.1",
|
|
41
|
+
"@wordpress/element": "^4.0.3",
|
|
42
42
|
"@wordpress/hooks": "^3.2.1",
|
|
43
43
|
"@wordpress/i18n": "^4.2.3",
|
|
44
|
-
"@wordpress/icons": "^6.0.
|
|
45
|
-
"@wordpress/interface": "^4.1.
|
|
46
|
-
"@wordpress/keyboard-shortcuts": "^3.0.
|
|
44
|
+
"@wordpress/icons": "^6.0.1",
|
|
45
|
+
"@wordpress/interface": "^4.1.2",
|
|
46
|
+
"@wordpress/keyboard-shortcuts": "^3.0.4",
|
|
47
47
|
"@wordpress/keycodes": "^3.2.3",
|
|
48
|
-
"@wordpress/media-utils": "^3.0.
|
|
49
|
-
"@wordpress/notices": "^3.2.
|
|
50
|
-
"@wordpress/plugins": "^4.0.
|
|
51
|
-
"@wordpress/primitives": "^3.0.
|
|
48
|
+
"@wordpress/media-utils": "^3.0.3",
|
|
49
|
+
"@wordpress/notices": "^3.2.5",
|
|
50
|
+
"@wordpress/plugins": "^4.0.4",
|
|
51
|
+
"@wordpress/primitives": "^3.0.3",
|
|
52
52
|
"@wordpress/url": "^3.2.3",
|
|
53
|
-
"@wordpress/viewport": "^4.0.
|
|
53
|
+
"@wordpress/viewport": "^4.0.4",
|
|
54
54
|
"@wordpress/warning": "^2.2.2",
|
|
55
55
|
"classnames": "^2.3.1",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "157f4ae53ab98e574af01f72213ae5a9613159ff"
|
|
65
65
|
}
|
|
@@ -7,12 +7,17 @@ import { get } from 'lodash';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { useSelect } from '@wordpress/data';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Button,
|
|
12
|
+
Icon,
|
|
13
|
+
__unstableMotion as motion,
|
|
14
|
+
} from '@wordpress/components';
|
|
11
15
|
import { __ } from '@wordpress/i18n';
|
|
12
16
|
import { addQueryArgs } from '@wordpress/url';
|
|
13
17
|
import { wordpress } from '@wordpress/icons';
|
|
14
18
|
import { store as editorStore } from '@wordpress/editor';
|
|
15
19
|
import { store as coreStore } from '@wordpress/core-data';
|
|
20
|
+
import { useReducedMotion } from '@wordpress/compose';
|
|
16
21
|
|
|
17
22
|
/**
|
|
18
23
|
* Internal dependencies
|
|
@@ -44,15 +49,26 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
|
|
|
44
49
|
[]
|
|
45
50
|
);
|
|
46
51
|
|
|
52
|
+
const disableMotion = useReducedMotion();
|
|
53
|
+
|
|
47
54
|
if ( ! isActive || ! postType ) {
|
|
48
55
|
return null;
|
|
49
56
|
}
|
|
50
57
|
|
|
51
58
|
let buttonIcon = <Icon size="36px" icon={ wordpress } />;
|
|
52
59
|
|
|
60
|
+
const effect = {
|
|
61
|
+
expand: {
|
|
62
|
+
scale: 1.7,
|
|
63
|
+
borderRadius: 0,
|
|
64
|
+
transition: { type: 'tween', duration: '0.2' },
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
53
68
|
if ( siteIconUrl ) {
|
|
54
69
|
buttonIcon = (
|
|
55
|
-
<img
|
|
70
|
+
<motion.img
|
|
71
|
+
variants={ ! disableMotion && effect }
|
|
56
72
|
alt={ __( 'Site Icon' ) }
|
|
57
73
|
className="edit-post-fullscreen-mode-close_site-icon"
|
|
58
74
|
src={ siteIconUrl }
|
|
@@ -70,19 +86,25 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
|
|
|
70
86
|
}
|
|
71
87
|
|
|
72
88
|
return (
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
href
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
<motion.div whileHover="expand">
|
|
90
|
+
<Button
|
|
91
|
+
className="edit-post-fullscreen-mode-close has-icon"
|
|
92
|
+
href={
|
|
93
|
+
href ??
|
|
94
|
+
addQueryArgs( 'edit.php', {
|
|
95
|
+
post_type: postType.slug,
|
|
96
|
+
} )
|
|
97
|
+
}
|
|
98
|
+
label={ get(
|
|
99
|
+
postType,
|
|
100
|
+
[ 'labels', 'view_items' ],
|
|
101
|
+
__( 'Back' )
|
|
102
|
+
) }
|
|
103
|
+
showTooltip={ showTooltip }
|
|
104
|
+
>
|
|
105
|
+
{ buttonIcon }
|
|
106
|
+
</Button>
|
|
107
|
+
</motion.div>
|
|
86
108
|
);
|
|
87
109
|
}
|
|
88
110
|
|
|
@@ -91,7 +91,13 @@ class Layout extends Component {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
renderHTML() {
|
|
94
|
-
|
|
94
|
+
const { globalStyles } = this.props;
|
|
95
|
+
return (
|
|
96
|
+
<HTMLTextInput
|
|
97
|
+
parentHeight={ this.state.rootViewHeight }
|
|
98
|
+
style={ globalStyles }
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
renderVisual() {
|
|
@@ -13,12 +13,14 @@ import {
|
|
|
13
13
|
__experimentalItemGroup as ItemGroup,
|
|
14
14
|
__experimentalItem as Item,
|
|
15
15
|
__experimentalHStack as HStack,
|
|
16
|
+
__experimentalText as Text,
|
|
16
17
|
__experimentalTruncate as Truncate,
|
|
17
18
|
FlexItem,
|
|
18
19
|
Modal,
|
|
19
20
|
TabPanel,
|
|
20
21
|
Button,
|
|
21
22
|
Card,
|
|
23
|
+
CardHeader,
|
|
22
24
|
CardBody,
|
|
23
25
|
} from '@wordpress/components';
|
|
24
26
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
@@ -325,10 +327,10 @@ export default function PreferencesModal() {
|
|
|
325
327
|
);
|
|
326
328
|
} else {
|
|
327
329
|
modalContent = (
|
|
328
|
-
<
|
|
329
|
-
<
|
|
330
|
-
<
|
|
331
|
-
<
|
|
330
|
+
<NavigatorProvider initialPath="/">
|
|
331
|
+
<NavigatorScreen path="/">
|
|
332
|
+
<Card isBorderless size="small">
|
|
333
|
+
<CardBody>
|
|
332
334
|
<ItemGroup>
|
|
333
335
|
{ tabs.map( ( tab ) => {
|
|
334
336
|
return (
|
|
@@ -358,12 +360,21 @@ export default function PreferencesModal() {
|
|
|
358
360
|
);
|
|
359
361
|
} ) }
|
|
360
362
|
</ItemGroup>
|
|
361
|
-
</
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
363
|
+
</CardBody>
|
|
364
|
+
</Card>
|
|
365
|
+
</NavigatorScreen>
|
|
366
|
+
{ sections.map( ( section ) => {
|
|
367
|
+
return (
|
|
368
|
+
<NavigatorScreen
|
|
369
|
+
key={ `${ section.name }-menu` }
|
|
370
|
+
path={ section.name }
|
|
371
|
+
>
|
|
372
|
+
<Card isBorderless size="large">
|
|
373
|
+
<CardHeader
|
|
374
|
+
isBorderless={ false }
|
|
375
|
+
justify="left"
|
|
376
|
+
size="small"
|
|
377
|
+
gap="6"
|
|
367
378
|
>
|
|
368
379
|
<NavigationButton
|
|
369
380
|
path="/"
|
|
@@ -374,17 +385,15 @@ export default function PreferencesModal() {
|
|
|
374
385
|
aria-label={ __(
|
|
375
386
|
'Navigate to the previous view'
|
|
376
387
|
) }
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
</CardBody>
|
|
387
|
-
</Card>
|
|
388
|
+
/>
|
|
389
|
+
<Text size="16">{ section.tabLabel }</Text>
|
|
390
|
+
</CardHeader>
|
|
391
|
+
<CardBody>{ section.content }</CardBody>
|
|
392
|
+
</Card>
|
|
393
|
+
</NavigatorScreen>
|
|
394
|
+
);
|
|
395
|
+
} ) }
|
|
396
|
+
</NavigatorProvider>
|
|
388
397
|
);
|
|
389
398
|
}
|
|
390
399
|
return (
|
|
@@ -14,7 +14,7 @@ $vertical-tabs-width: 160px;
|
|
|
14
14
|
height: 70%;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// Clears spacing to flush fit the
|
|
17
|
+
// Clears spacing to flush fit the navigator component to the modal edges.
|
|
18
18
|
@media (max-width: #{ ($break-medium - 1) }) {
|
|
19
19
|
.components-modal__content {
|
|
20
20
|
padding: 0;
|
|
@@ -23,45 +23,10 @@ $vertical-tabs-width: 160px;
|
|
|
23
23
|
content: none;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
max-height: 100%;
|
|
31
|
-
overflow-y: auto;
|
|
32
|
-
color: $black;
|
|
33
|
-
|
|
34
|
-
> * {
|
|
35
|
-
// Matches spacing cleared from the modal content element.
|
|
36
|
-
padding: $grid-unit-30 $grid-unit-40;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.components-navigation__menu {
|
|
40
|
-
margin: 0;
|
|
41
|
-
|
|
42
|
-
.components-navigation__item {
|
|
43
|
-
& > button {
|
|
44
|
-
padding: 3px $grid-unit-20;
|
|
45
|
-
height: $grid-unit-60;
|
|
46
|
-
// Aligns button text instead of button box.
|
|
47
|
-
margin: 0 #{-$grid-unit-20};
|
|
48
|
-
width: calc(#{$grid-unit-40} + 100%);
|
|
49
|
-
&:focus {
|
|
50
|
-
font-weight: 500;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
.components-navigation__menu-title-heading {
|
|
55
|
-
border-bottom: 1px solid $gray-300;
|
|
56
|
-
padding-left: 0;
|
|
57
|
-
padding-right: 0;
|
|
58
|
-
}
|
|
59
|
-
.components-navigation__back-button {
|
|
60
|
-
padding-left: 0;
|
|
61
|
-
}
|
|
62
|
-
.edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
63
|
-
width: auto;
|
|
64
|
-
}
|
|
26
|
+
// Keep the navigator component from overflowing the modal content area
|
|
27
|
+
// to ensure that sticky position elements stick where intended.
|
|
28
|
+
.components-navigator-provider {
|
|
29
|
+
height: 100%;
|
|
65
30
|
}
|
|
66
31
|
}
|
|
67
32
|
|
|
@@ -102,6 +67,7 @@ $vertical-tabs-width: 160px;
|
|
|
102
67
|
&__section-title {
|
|
103
68
|
font-size: 0.9rem;
|
|
104
69
|
font-weight: 600;
|
|
70
|
+
margin-top: 0;
|
|
105
71
|
}
|
|
106
72
|
|
|
107
73
|
&__option {
|
|
@@ -40,16 +40,17 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
40
40
|
onRequestClose={[Function]}
|
|
41
41
|
title="Preferences"
|
|
42
42
|
>
|
|
43
|
-
<
|
|
44
|
-
|
|
43
|
+
<NavigatorProvider
|
|
44
|
+
initialPath="/"
|
|
45
45
|
>
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
<NavigatorScreen
|
|
47
|
+
path="/"
|
|
48
|
+
>
|
|
49
|
+
<Card
|
|
50
|
+
isBorderless={true}
|
|
51
|
+
size="small"
|
|
49
52
|
>
|
|
50
|
-
<
|
|
51
|
-
path="/"
|
|
52
|
-
>
|
|
53
|
+
<CardBody>
|
|
53
54
|
<ItemGroup>
|
|
54
55
|
<NavigationButton
|
|
55
56
|
as={
|
|
@@ -169,10 +170,22 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
169
170
|
</HStack>
|
|
170
171
|
</NavigationButton>
|
|
171
172
|
</ItemGroup>
|
|
172
|
-
</
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
</CardBody>
|
|
174
|
+
</Card>
|
|
175
|
+
</NavigatorScreen>
|
|
176
|
+
<NavigatorScreen
|
|
177
|
+
key="general-menu"
|
|
178
|
+
path="general"
|
|
179
|
+
>
|
|
180
|
+
<Card
|
|
181
|
+
isBorderless={true}
|
|
182
|
+
size="large"
|
|
183
|
+
>
|
|
184
|
+
<CardHeader
|
|
185
|
+
gap="6"
|
|
186
|
+
isBorderless={false}
|
|
187
|
+
justify="left"
|
|
188
|
+
size="small"
|
|
176
189
|
>
|
|
177
190
|
<NavigationButton
|
|
178
191
|
aria-label="Navigate to the previous view"
|
|
@@ -188,12 +201,14 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
188
201
|
}
|
|
189
202
|
isBack={true}
|
|
190
203
|
path="/"
|
|
204
|
+
/>
|
|
205
|
+
<Text
|
|
206
|
+
size="16"
|
|
191
207
|
>
|
|
192
|
-
Back
|
|
193
|
-
</NavigationButton>
|
|
194
|
-
<h2>
|
|
195
208
|
General
|
|
196
|
-
</
|
|
209
|
+
</Text>
|
|
210
|
+
</CardHeader>
|
|
211
|
+
<CardBody>
|
|
197
212
|
<Section
|
|
198
213
|
description="Customize options related to the block editor interface and editing flow."
|
|
199
214
|
title="Appearance"
|
|
@@ -224,10 +239,22 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
224
239
|
label="Display block breadcrumbs"
|
|
225
240
|
/>
|
|
226
241
|
</Section>
|
|
227
|
-
</
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
242
|
+
</CardBody>
|
|
243
|
+
</Card>
|
|
244
|
+
</NavigatorScreen>
|
|
245
|
+
<NavigatorScreen
|
|
246
|
+
key="blocks-menu"
|
|
247
|
+
path="blocks"
|
|
248
|
+
>
|
|
249
|
+
<Card
|
|
250
|
+
isBorderless={true}
|
|
251
|
+
size="large"
|
|
252
|
+
>
|
|
253
|
+
<CardHeader
|
|
254
|
+
gap="6"
|
|
255
|
+
isBorderless={false}
|
|
256
|
+
justify="left"
|
|
257
|
+
size="small"
|
|
231
258
|
>
|
|
232
259
|
<NavigationButton
|
|
233
260
|
aria-label="Navigate to the previous view"
|
|
@@ -243,12 +270,14 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
243
270
|
}
|
|
244
271
|
isBack={true}
|
|
245
272
|
path="/"
|
|
273
|
+
/>
|
|
274
|
+
<Text
|
|
275
|
+
size="16"
|
|
246
276
|
>
|
|
247
|
-
Back
|
|
248
|
-
</NavigationButton>
|
|
249
|
-
<h2>
|
|
250
277
|
Blocks
|
|
251
|
-
</
|
|
278
|
+
</Text>
|
|
279
|
+
</CardHeader>
|
|
280
|
+
<CardBody>
|
|
252
281
|
<Section
|
|
253
282
|
description="Customize how you interact with blocks in the block library and editing canvas."
|
|
254
283
|
title="Block interactions"
|
|
@@ -270,10 +299,22 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
270
299
|
>
|
|
271
300
|
<WithSelect(BlockManager) />
|
|
272
301
|
</Section>
|
|
273
|
-
</
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
302
|
+
</CardBody>
|
|
303
|
+
</Card>
|
|
304
|
+
</NavigatorScreen>
|
|
305
|
+
<NavigatorScreen
|
|
306
|
+
key="panels-menu"
|
|
307
|
+
path="panels"
|
|
308
|
+
>
|
|
309
|
+
<Card
|
|
310
|
+
isBorderless={true}
|
|
311
|
+
size="large"
|
|
312
|
+
>
|
|
313
|
+
<CardHeader
|
|
314
|
+
gap="6"
|
|
315
|
+
isBorderless={false}
|
|
316
|
+
justify="left"
|
|
317
|
+
size="small"
|
|
277
318
|
>
|
|
278
319
|
<NavigationButton
|
|
279
320
|
aria-label="Navigate to the previous view"
|
|
@@ -289,12 +330,14 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
289
330
|
}
|
|
290
331
|
isBack={true}
|
|
291
332
|
path="/"
|
|
333
|
+
/>
|
|
334
|
+
<Text
|
|
335
|
+
size="16"
|
|
292
336
|
>
|
|
293
|
-
Back
|
|
294
|
-
</NavigationButton>
|
|
295
|
-
<h2>
|
|
296
337
|
Panels
|
|
297
|
-
</
|
|
338
|
+
</Text>
|
|
339
|
+
</CardHeader>
|
|
340
|
+
<CardBody>
|
|
298
341
|
<Section
|
|
299
342
|
description="Choose what displays in the panel."
|
|
300
343
|
title="Document settings"
|
|
@@ -339,9 +382,9 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
|
|
|
339
382
|
description="Add extra areas to the editor."
|
|
340
383
|
title="Additional"
|
|
341
384
|
/>
|
|
342
|
-
</
|
|
343
|
-
</
|
|
344
|
-
</
|
|
345
|
-
</
|
|
385
|
+
</CardBody>
|
|
386
|
+
</Card>
|
|
387
|
+
</NavigatorScreen>
|
|
388
|
+
</NavigatorProvider>
|
|
346
389
|
</Modal>
|
|
347
390
|
`;
|
|
@@ -42,12 +42,11 @@
|
|
|
42
42
|
// Center.
|
|
43
43
|
margin-left: auto;
|
|
44
44
|
margin-right: auto;
|
|
45
|
-
|
|
46
|
-
// Margins between the title and the first block, or appender, do not collapse.
|
|
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);
|
|
50
45
|
}
|
|
46
|
+
|
|
47
|
+
// Add extra margin at the top, to push down the Title area in the post editor.
|
|
48
|
+
margin-top: 4rem;
|
|
49
|
+
margin-bottom: var(--wp--style--block-gap);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
.edit-post-visual-editor__exit-template-mode {
|
|
@@ -108,7 +108,7 @@ const withMultipleValidation = createHigherOrderComponent( ( BlockEdit ) => {
|
|
|
108
108
|
),
|
|
109
109
|
] }
|
|
110
110
|
>
|
|
111
|
-
<strong>{ blockType
|
|
111
|
+
<strong>{ blockType?.title }: </strong>
|
|
112
112
|
{ __( 'This block can only be used once.' ) }
|
|
113
113
|
</Warning>,
|
|
114
114
|
];
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
+
import { store as blocksStore } from '@wordpress/blocks';
|
|
4
5
|
import {
|
|
5
6
|
registerCoreBlocks,
|
|
6
7
|
__experimentalRegisterExperimentalCoreBlocks,
|
|
@@ -97,6 +98,7 @@ export function initializeEditor(
|
|
|
97
98
|
welcomeGuideTemplate: true,
|
|
98
99
|
} );
|
|
99
100
|
|
|
101
|
+
dispatch( blocksStore ).__experimentalReapplyBlockTypeFilters();
|
|
100
102
|
registerCoreBlocks();
|
|
101
103
|
if ( process.env.GUTENBERG_PHASE === 2 ) {
|
|
102
104
|
__experimentalRegisterExperimentalCoreBlocks( {
|