@wordpress/edit-post 6.19.0 → 7.0.0
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/CHANGELOG.md +6 -0
- package/build/components/block-manager/index.js +3 -10
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/header/index.js +2 -2
- package/build/components/header/index.js.map +1 -1
- package/build/components/layout/index.js +2 -1
- package/build/components/layout/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +1 -1
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-template/index.js +2 -4
- package/build/components/sidebar/post-template/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +7 -7
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/editor.native.js +8 -2
- package/build/editor.native.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js +1 -7
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/plugins/index.js +3 -1
- package/build/plugins/index.js.map +1 -1
- package/build/plugins/navigation-list-view-menu-item.js +48 -0
- package/build/plugins/navigation-list-view-menu-item.js.map +1 -0
- package/build-module/components/block-manager/index.js +3 -9
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/header/index.js +2 -2
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/layout/index.js +2 -1
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +2 -2
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +1 -1
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-template/index.js +2 -4
- package/build-module/components/sidebar/post-template/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +5 -5
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/editor.native.js +7 -2
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js +1 -6
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/plugins/index.js +2 -1
- package/build-module/plugins/index.js.map +1 -1
- package/build-module/plugins/navigation-list-view-menu-item.js +40 -0
- package/build-module/plugins/navigation-list-view-menu-item.js.map +1 -0
- package/build-style/classic-rtl.css +14 -0
- package/build-style/classic.css +14 -0
- package/build-style/style-rtl.css +67 -33
- package/build-style/style.css +67 -33
- package/package.json +29 -29
- package/src/components/block-manager/index.js +6 -10
- package/src/components/header/index.js +3 -3
- package/src/components/layout/index.js +3 -1
- package/src/components/preferences-modal/meta-boxes-section.js +2 -3
- package/src/components/preferences-modal/options/test/__snapshots__/enable-custom-fields.js.snap +56 -4
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +39 -14
- package/src/components/preferences-modal/test/__snapshots__/meta-boxes-section.js.snap +51 -6
- package/src/components/sidebar/post-schedule/style.scss +2 -1
- package/src/components/sidebar/post-status/index.js +1 -1
- package/src/components/sidebar/post-template/index.js +8 -3
- package/src/components/sidebar/post-template/style.scss +2 -0
- package/src/components/sidebar/post-url/style.scss +3 -0
- package/src/components/sidebar/post-visibility/style.scss +2 -0
- package/src/components/sidebar/settings-header/style.scss +47 -34
- package/src/components/sidebar/settings-sidebar/index.js +5 -5
- package/src/components/visual-editor/test/index.native.js +20 -9
- package/src/editor.native.js +14 -11
- package/src/hooks/validate-multiple-use/index.js +1 -7
- package/src/plugins/index.js +2 -0
- package/src/plugins/navigation-list-view-menu-item.js +56 -0
package/build-style/style.css
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a hex value into the rgb equivalent.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
5
|
+
* @return {string} comma separated rgb values
|
|
6
|
+
*/
|
|
1
7
|
/**
|
|
2
8
|
* Colors
|
|
3
9
|
*/
|
|
@@ -11,6 +17,12 @@
|
|
|
11
17
|
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
12
18
|
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
13
19
|
*/
|
|
20
|
+
/**
|
|
21
|
+
* Converts a hex value into the rgb equivalent.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
24
|
+
* @return {string} comma separated rgb values
|
|
25
|
+
*/
|
|
14
26
|
/**
|
|
15
27
|
* Colors
|
|
16
28
|
*/
|
|
@@ -82,6 +94,8 @@
|
|
|
82
94
|
--wp-admin-theme-color-darker-20: #005a87;
|
|
83
95
|
--wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
|
|
84
96
|
--wp-admin-border-width-focus: 2px;
|
|
97
|
+
--wp-block-synced-color: #7a00df;
|
|
98
|
+
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
85
99
|
}
|
|
86
100
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
87
101
|
:root {
|
|
@@ -308,6 +322,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
308
322
|
}
|
|
309
323
|
.interface-interface-skeleton__content .interface-navigable-region__stacker {
|
|
310
324
|
flex-grow: 1;
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: column;
|
|
311
327
|
}
|
|
312
328
|
|
|
313
329
|
.interface-interface-skeleton__secondary-sidebar,
|
|
@@ -343,6 +359,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
343
359
|
}
|
|
344
360
|
}
|
|
345
361
|
|
|
362
|
+
.interface-interface-skeleton__secondary-sidebar .interface-navigable-region__stacker {
|
|
363
|
+
height: 100%;
|
|
364
|
+
}
|
|
346
365
|
@media (min-width: 782px) {
|
|
347
366
|
.interface-interface-skeleton__secondary-sidebar {
|
|
348
367
|
border-right: 1px solid #e0e0e0;
|
|
@@ -400,12 +419,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
400
419
|
bottom: 0;
|
|
401
420
|
}
|
|
402
421
|
|
|
403
|
-
@media (min-width: 782px) {
|
|
404
|
-
.interface-interface-skeleton.has-footer .interface-interface-skeleton__drawer {
|
|
405
|
-
height: calc(100% - 25px);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
422
|
.interface-more-menu-dropdown {
|
|
410
423
|
margin-left: -4px;
|
|
411
424
|
}
|
|
@@ -829,7 +842,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
829
842
|
width: 36px;
|
|
830
843
|
height: 36px;
|
|
831
844
|
border-radius: 2px;
|
|
832
|
-
object-fit: cover;
|
|
845
|
+
-o-object-fit: cover;
|
|
846
|
+
object-fit: cover;
|
|
833
847
|
margin-top: -1px;
|
|
834
848
|
}
|
|
835
849
|
|
|
@@ -1521,12 +1535,12 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1521
1535
|
display: block;
|
|
1522
1536
|
width: 45%;
|
|
1523
1537
|
flex-shrink: 0;
|
|
1538
|
+
padding: 6px 0;
|
|
1524
1539
|
}
|
|
1525
1540
|
|
|
1526
1541
|
.components-button.edit-post-post-schedule__toggle {
|
|
1527
1542
|
text-align: left;
|
|
1528
1543
|
white-space: normal;
|
|
1529
|
-
height: auto;
|
|
1530
1544
|
}
|
|
1531
1545
|
.components-button.edit-post-post-schedule__toggle span {
|
|
1532
1546
|
width: 0;
|
|
@@ -1555,6 +1569,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1555
1569
|
.edit-post-post-template span {
|
|
1556
1570
|
display: block;
|
|
1557
1571
|
width: 45%;
|
|
1572
|
+
padding: 6px 0;
|
|
1558
1573
|
}
|
|
1559
1574
|
|
|
1560
1575
|
.edit-post-post-template__dropdown {
|
|
@@ -1586,11 +1601,13 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1586
1601
|
.edit-post-post-url {
|
|
1587
1602
|
width: 100%;
|
|
1588
1603
|
justify-content: flex-start;
|
|
1604
|
+
align-items: flex-start;
|
|
1589
1605
|
}
|
|
1590
1606
|
.edit-post-post-url span {
|
|
1591
1607
|
display: block;
|
|
1592
1608
|
width: 45%;
|
|
1593
1609
|
flex-shrink: 0;
|
|
1610
|
+
padding: 6px 0;
|
|
1594
1611
|
}
|
|
1595
1612
|
|
|
1596
1613
|
.components-button.edit-post-post-url__toggle {
|
|
@@ -1612,6 +1629,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1612
1629
|
.edit-post-post-visibility span {
|
|
1613
1630
|
display: block;
|
|
1614
1631
|
width: 45%;
|
|
1632
|
+
padding: 6px 0;
|
|
1615
1633
|
}
|
|
1616
1634
|
|
|
1617
1635
|
.edit-post-post-visibility__dialog .editor-post-visibility {
|
|
@@ -1620,47 +1638,62 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1620
1638
|
}
|
|
1621
1639
|
|
|
1622
1640
|
.components-button.edit-post-sidebar__panel-tab {
|
|
1641
|
+
position: relative;
|
|
1623
1642
|
border-radius: 0;
|
|
1624
1643
|
height: 48px;
|
|
1625
1644
|
background: transparent;
|
|
1626
1645
|
border: none;
|
|
1627
1646
|
box-shadow: none;
|
|
1628
1647
|
cursor: pointer;
|
|
1629
|
-
|
|
1630
|
-
padding: 3px 15px;
|
|
1648
|
+
padding: 3px 16px;
|
|
1631
1649
|
margin-left: 0;
|
|
1632
1650
|
font-weight: 500;
|
|
1633
1651
|
}
|
|
1634
|
-
.components-button.edit-post-sidebar__panel-tab
|
|
1635
|
-
content: attr(data-label);
|
|
1636
|
-
display: block;
|
|
1637
|
-
font-weight: 600;
|
|
1638
|
-
height: 0;
|
|
1639
|
-
overflow: hidden;
|
|
1640
|
-
speak: none;
|
|
1641
|
-
visibility: hidden;
|
|
1642
|
-
}
|
|
1643
|
-
.components-button.edit-post-sidebar__panel-tab.is-active {
|
|
1644
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
|
|
1652
|
+
.components-button.edit-post-sidebar__panel-tab:focus:not(:disabled) {
|
|
1645
1653
|
position: relative;
|
|
1646
|
-
|
|
1654
|
+
box-shadow: none;
|
|
1647
1655
|
}
|
|
1648
|
-
.components-button.edit-post-sidebar__panel-tab
|
|
1656
|
+
.components-button.edit-post-sidebar__panel-tab::after {
|
|
1649
1657
|
content: "";
|
|
1650
1658
|
position: absolute;
|
|
1651
|
-
top: 0;
|
|
1652
|
-
bottom: 1px;
|
|
1653
1659
|
right: 0;
|
|
1660
|
+
bottom: 0;
|
|
1654
1661
|
left: 0;
|
|
1655
|
-
|
|
1662
|
+
pointer-events: none;
|
|
1663
|
+
background: var(--wp-admin-theme-color);
|
|
1664
|
+
height: calc(0 * var(--wp-admin-border-width-focus));
|
|
1665
|
+
border-radius: 0;
|
|
1666
|
+
transition: all 0.1s linear;
|
|
1656
1667
|
}
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1668
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1669
|
+
.components-button.edit-post-sidebar__panel-tab::after {
|
|
1670
|
+
transition-duration: 0s;
|
|
1671
|
+
transition-delay: 0s;
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
.components-button.edit-post-sidebar__panel-tab.is-active::after {
|
|
1675
|
+
height: calc(1 * var(--wp-admin-border-width-focus));
|
|
1676
|
+
}
|
|
1677
|
+
.components-button.edit-post-sidebar__panel-tab::before {
|
|
1678
|
+
content: "";
|
|
1679
|
+
position: absolute;
|
|
1680
|
+
top: 12px;
|
|
1681
|
+
right: 12px;
|
|
1682
|
+
bottom: 12px;
|
|
1683
|
+
left: 12px;
|
|
1684
|
+
pointer-events: none;
|
|
1685
|
+
box-shadow: 0 0 0 0 transparent;
|
|
1686
|
+
border-radius: 2px;
|
|
1687
|
+
transition: all 0.1s linear;
|
|
1661
1688
|
}
|
|
1662
|
-
|
|
1663
|
-
|
|
1689
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1690
|
+
.components-button.edit-post-sidebar__panel-tab::before {
|
|
1691
|
+
transition-duration: 0s;
|
|
1692
|
+
transition-delay: 0s;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
.components-button.edit-post-sidebar__panel-tab:focus-visible::before {
|
|
1696
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1664
1697
|
}
|
|
1665
1698
|
|
|
1666
1699
|
h2.edit-post-template-summary__title {
|
|
@@ -1795,7 +1828,8 @@ h2.edit-post-template-summary__title {
|
|
|
1795
1828
|
.edit-template-welcome-guide__image > img {
|
|
1796
1829
|
display: block;
|
|
1797
1830
|
max-width: 100%;
|
|
1798
|
-
object-fit: cover;
|
|
1831
|
+
-o-object-fit: cover;
|
|
1832
|
+
object-fit: cover;
|
|
1799
1833
|
}
|
|
1800
1834
|
.edit-post-welcome-guide__heading,
|
|
1801
1835
|
.edit-template-welcome-guide__heading {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,42 +27,42 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/a11y": "^3.
|
|
31
|
-
"@wordpress/api-fetch": "^6.
|
|
32
|
-
"@wordpress/block-editor": "^
|
|
33
|
-
"@wordpress/block-library": "^
|
|
34
|
-
"@wordpress/blocks": "^
|
|
35
|
-
"@wordpress/components": "^
|
|
36
|
-
"@wordpress/compose": "^
|
|
37
|
-
"@wordpress/core-data": "^
|
|
38
|
-
"@wordpress/data": "^
|
|
39
|
-
"@wordpress/deprecated": "^3.
|
|
40
|
-
"@wordpress/editor": "^
|
|
41
|
-
"@wordpress/element": "^
|
|
42
|
-
"@wordpress/hooks": "^3.
|
|
43
|
-
"@wordpress/i18n": "^4.
|
|
44
|
-
"@wordpress/icons": "^9.
|
|
45
|
-
"@wordpress/interface": "^
|
|
46
|
-
"@wordpress/keyboard-shortcuts": "^
|
|
47
|
-
"@wordpress/keycodes": "^3.
|
|
48
|
-
"@wordpress/media-utils": "^4.
|
|
49
|
-
"@wordpress/notices": "^3.
|
|
50
|
-
"@wordpress/plugins": "^
|
|
51
|
-
"@wordpress/preferences": "^
|
|
52
|
-
"@wordpress/url": "^3.
|
|
53
|
-
"@wordpress/viewport": "^
|
|
54
|
-
"@wordpress/warning": "^2.
|
|
30
|
+
"@wordpress/a11y": "^3.23.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.20.0",
|
|
32
|
+
"@wordpress/block-editor": "^11.0.0",
|
|
33
|
+
"@wordpress/block-library": "^8.0.0",
|
|
34
|
+
"@wordpress/blocks": "^12.0.0",
|
|
35
|
+
"@wordpress/components": "^23.0.0",
|
|
36
|
+
"@wordpress/compose": "^6.0.0",
|
|
37
|
+
"@wordpress/core-data": "^6.0.0",
|
|
38
|
+
"@wordpress/data": "^8.0.0",
|
|
39
|
+
"@wordpress/deprecated": "^3.23.0",
|
|
40
|
+
"@wordpress/editor": "^13.0.0",
|
|
41
|
+
"@wordpress/element": "^5.0.0",
|
|
42
|
+
"@wordpress/hooks": "^3.23.0",
|
|
43
|
+
"@wordpress/i18n": "^4.23.0",
|
|
44
|
+
"@wordpress/icons": "^9.14.0",
|
|
45
|
+
"@wordpress/interface": "^5.0.0",
|
|
46
|
+
"@wordpress/keyboard-shortcuts": "^4.0.0",
|
|
47
|
+
"@wordpress/keycodes": "^3.23.0",
|
|
48
|
+
"@wordpress/media-utils": "^4.14.0",
|
|
49
|
+
"@wordpress/notices": "^3.23.0",
|
|
50
|
+
"@wordpress/plugins": "^5.0.0",
|
|
51
|
+
"@wordpress/preferences": "^3.0.0",
|
|
52
|
+
"@wordpress/url": "^3.24.0",
|
|
53
|
+
"@wordpress/viewport": "^5.0.0",
|
|
54
|
+
"@wordpress/warning": "^2.23.0",
|
|
55
55
|
"classnames": "^2.3.1",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
57
57
|
"memize": "^1.1.0",
|
|
58
58
|
"rememo": "^4.0.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"react": "^
|
|
62
|
-
"react-dom": "^
|
|
61
|
+
"react": "^18.0.0",
|
|
62
|
+
"react-dom": "^18.0.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "1eb65aabe6738097f4c062e78f69ae8f05879848"
|
|
68
68
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { filter } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -71,6 +66,7 @@ function BlockManager( {
|
|
|
71
66
|
</div>
|
|
72
67
|
) }
|
|
73
68
|
<SearchControl
|
|
69
|
+
__nextHasNoMarginBottom
|
|
74
70
|
label={ __( 'Search for a block' ) }
|
|
75
71
|
placeholder={ __( 'Search for a block' ) }
|
|
76
72
|
value={ search }
|
|
@@ -92,15 +88,15 @@ function BlockManager( {
|
|
|
92
88
|
<BlockManagerCategory
|
|
93
89
|
key={ category.slug }
|
|
94
90
|
title={ category.title }
|
|
95
|
-
blockTypes={ filter(
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
blockTypes={ blockTypes.filter(
|
|
92
|
+
( blockType ) =>
|
|
93
|
+
blockType.category === category.slug
|
|
94
|
+
) }
|
|
98
95
|
/>
|
|
99
96
|
) ) }
|
|
100
97
|
<BlockManagerCategory
|
|
101
98
|
title={ __( 'Uncategorized' ) }
|
|
102
|
-
blockTypes={ filter(
|
|
103
|
-
blockTypes,
|
|
99
|
+
blockTypes={ blockTypes.filter(
|
|
104
100
|
( { category } ) => ! category
|
|
105
101
|
) }
|
|
106
102
|
/>
|
|
@@ -25,6 +25,7 @@ import { store as editPostStore } from '../../store';
|
|
|
25
25
|
import TemplateTitle from './template-title';
|
|
26
26
|
|
|
27
27
|
function Header( { setEntitiesSavedStatesCallback } ) {
|
|
28
|
+
const isLargeViewport = useViewportMatch( 'large' );
|
|
28
29
|
const {
|
|
29
30
|
hasActiveMetaboxes,
|
|
30
31
|
isPublishSidebarOpened,
|
|
@@ -40,13 +41,12 @@ function Header( { setEntitiesSavedStatesCallback } ) {
|
|
|
40
41
|
showIconLabels:
|
|
41
42
|
select( editPostStore ).isFeatureActive( 'showIconLabels' ),
|
|
42
43
|
isDistractionFree:
|
|
43
|
-
select( editPostStore ).isFeatureActive( 'distractionFree' )
|
|
44
|
+
select( editPostStore ).isFeatureActive( 'distractionFree' ) &&
|
|
45
|
+
isLargeViewport,
|
|
44
46
|
} ),
|
|
45
47
|
[]
|
|
46
48
|
);
|
|
47
49
|
|
|
48
|
-
const isLargeViewport = useViewportMatch( 'large' );
|
|
49
|
-
|
|
50
50
|
const classes = classnames( 'edit-post-header' );
|
|
51
51
|
|
|
52
52
|
const slideY = {
|
|
@@ -66,6 +66,7 @@ const interfaceLabels = {
|
|
|
66
66
|
function Layout( { styles } ) {
|
|
67
67
|
const isMobileViewport = useViewportMatch( 'medium', '<' );
|
|
68
68
|
const isHugeViewport = useViewportMatch( 'huge', '>=' );
|
|
69
|
+
const isLargeViewport = useViewportMatch( 'large' );
|
|
69
70
|
const { openGeneralSidebar, closeGeneralSidebar, setIsInserterOpened } =
|
|
70
71
|
useDispatch( editPostStore );
|
|
71
72
|
const { createErrorNotice } = useDispatch( noticesStore );
|
|
@@ -116,7 +117,8 @@ function Layout( { styles } ) {
|
|
|
116
117
|
showIconLabels:
|
|
117
118
|
select( editPostStore ).isFeatureActive( 'showIconLabels' ),
|
|
118
119
|
isDistractionFree:
|
|
119
|
-
select( editPostStore ).isFeatureActive( 'distractionFree' )
|
|
120
|
+
select( editPostStore ).isFeatureActive( 'distractionFree' ) &&
|
|
121
|
+
isLargeViewport,
|
|
120
122
|
showBlockBreadcrumbs: select( editPostStore ).isFeatureActive(
|
|
121
123
|
'showBlockBreadcrumbs'
|
|
122
124
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { map } from 'lodash';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -23,8 +23,7 @@ export function MetaBoxesSection( {
|
|
|
23
23
|
...sectionProps
|
|
24
24
|
} ) {
|
|
25
25
|
// The 'Custom Fields' meta box is a special case that we handle separately.
|
|
26
|
-
const thirdPartyMetaBoxes = filter(
|
|
27
|
-
metaBoxes,
|
|
26
|
+
const thirdPartyMetaBoxes = metaBoxes.filter(
|
|
28
27
|
( { id } ) => id !== 'postcustom'
|
|
29
28
|
);
|
|
30
29
|
|
package/src/components/preferences-modal/options/test/__snapshots__/enable-custom-fields.js.snap
CHANGED
|
@@ -41,6 +41,17 @@ exports[`EnableCustomFieldsOption renders a checked checkbox and a confirmation
|
|
|
41
41
|
min-width: 0;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
.emotion-6 {
|
|
45
|
+
display: block;
|
|
46
|
+
max-height: 100%;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
min-height: 0;
|
|
49
|
+
min-width: 0;
|
|
50
|
+
-webkit-flex: 1;
|
|
51
|
+
-ms-flex: 1;
|
|
52
|
+
flex: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
44
55
|
<div>
|
|
45
56
|
<div
|
|
46
57
|
class="interface-preferences-modal__option"
|
|
@@ -72,7 +83,9 @@ exports[`EnableCustomFieldsOption renders a checked checkbox and a confirmation
|
|
|
72
83
|
/>
|
|
73
84
|
</span>
|
|
74
85
|
<label
|
|
75
|
-
class="components-toggle-control__label"
|
|
86
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
87
|
+
data-wp-c16t="true"
|
|
88
|
+
data-wp-component="FlexBlock"
|
|
76
89
|
for="inspector-toggle-control-3"
|
|
77
90
|
/>
|
|
78
91
|
</div>
|
|
@@ -134,6 +147,17 @@ exports[`EnableCustomFieldsOption renders a checked checkbox when custom fields
|
|
|
134
147
|
min-width: 0;
|
|
135
148
|
}
|
|
136
149
|
|
|
150
|
+
.emotion-6 {
|
|
151
|
+
display: block;
|
|
152
|
+
max-height: 100%;
|
|
153
|
+
max-width: 100%;
|
|
154
|
+
min-height: 0;
|
|
155
|
+
min-width: 0;
|
|
156
|
+
-webkit-flex: 1;
|
|
157
|
+
-ms-flex: 1;
|
|
158
|
+
flex: 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
137
161
|
<div>
|
|
138
162
|
<div
|
|
139
163
|
class="interface-preferences-modal__option"
|
|
@@ -166,7 +190,9 @@ exports[`EnableCustomFieldsOption renders a checked checkbox when custom fields
|
|
|
166
190
|
/>
|
|
167
191
|
</span>
|
|
168
192
|
<label
|
|
169
|
-
class="components-toggle-control__label"
|
|
193
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
194
|
+
data-wp-c16t="true"
|
|
195
|
+
data-wp-component="FlexBlock"
|
|
170
196
|
for="inspector-toggle-control-0"
|
|
171
197
|
/>
|
|
172
198
|
</div>
|
|
@@ -217,6 +243,17 @@ exports[`EnableCustomFieldsOption renders an unchecked checkbox and a confirmati
|
|
|
217
243
|
min-width: 0;
|
|
218
244
|
}
|
|
219
245
|
|
|
246
|
+
.emotion-6 {
|
|
247
|
+
display: block;
|
|
248
|
+
max-height: 100%;
|
|
249
|
+
max-width: 100%;
|
|
250
|
+
min-height: 0;
|
|
251
|
+
min-width: 0;
|
|
252
|
+
-webkit-flex: 1;
|
|
253
|
+
-ms-flex: 1;
|
|
254
|
+
flex: 1;
|
|
255
|
+
}
|
|
256
|
+
|
|
220
257
|
<div>
|
|
221
258
|
<div
|
|
222
259
|
class="interface-preferences-modal__option"
|
|
@@ -249,7 +286,9 @@ exports[`EnableCustomFieldsOption renders an unchecked checkbox and a confirmati
|
|
|
249
286
|
/>
|
|
250
287
|
</span>
|
|
251
288
|
<label
|
|
252
|
-
class="components-toggle-control__label"
|
|
289
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
290
|
+
data-wp-c16t="true"
|
|
291
|
+
data-wp-component="FlexBlock"
|
|
253
292
|
for="inspector-toggle-control-2"
|
|
254
293
|
/>
|
|
255
294
|
</div>
|
|
@@ -311,6 +350,17 @@ exports[`EnableCustomFieldsOption renders an unchecked checkbox when custom fiel
|
|
|
311
350
|
min-width: 0;
|
|
312
351
|
}
|
|
313
352
|
|
|
353
|
+
.emotion-6 {
|
|
354
|
+
display: block;
|
|
355
|
+
max-height: 100%;
|
|
356
|
+
max-width: 100%;
|
|
357
|
+
min-height: 0;
|
|
358
|
+
min-width: 0;
|
|
359
|
+
-webkit-flex: 1;
|
|
360
|
+
-ms-flex: 1;
|
|
361
|
+
flex: 1;
|
|
362
|
+
}
|
|
363
|
+
|
|
314
364
|
<div>
|
|
315
365
|
<div
|
|
316
366
|
class="interface-preferences-modal__option"
|
|
@@ -342,7 +392,9 @@ exports[`EnableCustomFieldsOption renders an unchecked checkbox when custom fiel
|
|
|
342
392
|
/>
|
|
343
393
|
</span>
|
|
344
394
|
<label
|
|
345
|
-
class="components-toggle-control__label"
|
|
395
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
396
|
+
data-wp-c16t="true"
|
|
397
|
+
data-wp-component="FlexBlock"
|
|
346
398
|
for="inspector-toggle-control-1"
|
|
347
399
|
/>
|
|
348
400
|
</div>
|
|
@@ -42,6 +42,17 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.emotion-6 {
|
|
45
|
+
display: block;
|
|
46
|
+
max-height: 100%;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
min-height: 0;
|
|
49
|
+
min-width: 0;
|
|
50
|
+
-webkit-flex: 1;
|
|
51
|
+
-ms-flex: 1;
|
|
52
|
+
flex: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.emotion-8 {
|
|
45
56
|
margin-top: calc(4px * 2);
|
|
46
57
|
margin-bottom: 0;
|
|
47
58
|
font-size: 12px;
|
|
@@ -186,7 +197,9 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
186
197
|
/>
|
|
187
198
|
</span>
|
|
188
199
|
<label
|
|
189
|
-
class="components-toggle-control__label"
|
|
200
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
201
|
+
data-wp-c16t="true"
|
|
202
|
+
data-wp-component="FlexBlock"
|
|
190
203
|
for="inspector-toggle-control-0"
|
|
191
204
|
>
|
|
192
205
|
Include pre-publish checklist
|
|
@@ -194,7 +207,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
194
207
|
</div>
|
|
195
208
|
</div>
|
|
196
209
|
<p
|
|
197
|
-
class="components-base-control__help emotion-
|
|
210
|
+
class="components-base-control__help emotion-8 emotion-9"
|
|
198
211
|
id="inspector-toggle-control-0__help"
|
|
199
212
|
>
|
|
200
213
|
Review settings, such as visibility and tags.
|
|
@@ -250,7 +263,9 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
250
263
|
/>
|
|
251
264
|
</span>
|
|
252
265
|
<label
|
|
253
|
-
class="components-toggle-control__label"
|
|
266
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
267
|
+
data-wp-c16t="true"
|
|
268
|
+
data-wp-component="FlexBlock"
|
|
254
269
|
for="inspector-toggle-control-1"
|
|
255
270
|
>
|
|
256
271
|
Distraction free
|
|
@@ -258,7 +273,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
258
273
|
</div>
|
|
259
274
|
</div>
|
|
260
275
|
<p
|
|
261
|
-
class="components-base-control__help emotion-
|
|
276
|
+
class="components-base-control__help emotion-8 emotion-9"
|
|
262
277
|
id="inspector-toggle-control-1__help"
|
|
263
278
|
>
|
|
264
279
|
Reduce visual distractions by hiding the toolbar and other elements to focus on writing.
|
|
@@ -296,7 +311,9 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
296
311
|
/>
|
|
297
312
|
</span>
|
|
298
313
|
<label
|
|
299
|
-
class="components-toggle-control__label"
|
|
314
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
315
|
+
data-wp-c16t="true"
|
|
316
|
+
data-wp-component="FlexBlock"
|
|
300
317
|
for="inspector-toggle-control-2"
|
|
301
318
|
>
|
|
302
319
|
Spotlight mode
|
|
@@ -304,7 +321,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
304
321
|
</div>
|
|
305
322
|
</div>
|
|
306
323
|
<p
|
|
307
|
-
class="components-base-control__help emotion-
|
|
324
|
+
class="components-base-control__help emotion-8 emotion-9"
|
|
308
325
|
id="inspector-toggle-control-2__help"
|
|
309
326
|
>
|
|
310
327
|
Highlights the current block and fades other content.
|
|
@@ -342,7 +359,9 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
342
359
|
/>
|
|
343
360
|
</span>
|
|
344
361
|
<label
|
|
345
|
-
class="components-toggle-control__label"
|
|
362
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
363
|
+
data-wp-c16t="true"
|
|
364
|
+
data-wp-component="FlexBlock"
|
|
346
365
|
for="inspector-toggle-control-3"
|
|
347
366
|
>
|
|
348
367
|
Show button text labels
|
|
@@ -350,7 +369,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
350
369
|
</div>
|
|
351
370
|
</div>
|
|
352
371
|
<p
|
|
353
|
-
class="components-base-control__help emotion-
|
|
372
|
+
class="components-base-control__help emotion-8 emotion-9"
|
|
354
373
|
id="inspector-toggle-control-3__help"
|
|
355
374
|
>
|
|
356
375
|
Show text instead of icons on buttons.
|
|
@@ -388,7 +407,9 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
388
407
|
/>
|
|
389
408
|
</span>
|
|
390
409
|
<label
|
|
391
|
-
class="components-toggle-control__label"
|
|
410
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
411
|
+
data-wp-c16t="true"
|
|
412
|
+
data-wp-component="FlexBlock"
|
|
392
413
|
for="inspector-toggle-control-4"
|
|
393
414
|
>
|
|
394
415
|
Always open list view
|
|
@@ -396,7 +417,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
396
417
|
</div>
|
|
397
418
|
</div>
|
|
398
419
|
<p
|
|
399
|
-
class="components-base-control__help emotion-
|
|
420
|
+
class="components-base-control__help emotion-8 emotion-9"
|
|
400
421
|
id="inspector-toggle-control-4__help"
|
|
401
422
|
>
|
|
402
423
|
Opens the block list view sidebar by default.
|
|
@@ -434,7 +455,9 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
434
455
|
/>
|
|
435
456
|
</span>
|
|
436
457
|
<label
|
|
437
|
-
class="components-toggle-control__label"
|
|
458
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
459
|
+
data-wp-c16t="true"
|
|
460
|
+
data-wp-component="FlexBlock"
|
|
438
461
|
for="inspector-toggle-control-5"
|
|
439
462
|
>
|
|
440
463
|
Use theme styles
|
|
@@ -442,7 +465,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
442
465
|
</div>
|
|
443
466
|
</div>
|
|
444
467
|
<p
|
|
445
|
-
class="components-base-control__help emotion-
|
|
468
|
+
class="components-base-control__help emotion-8 emotion-9"
|
|
446
469
|
id="inspector-toggle-control-5__help"
|
|
447
470
|
>
|
|
448
471
|
Make the editor look like your theme.
|
|
@@ -480,7 +503,9 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
480
503
|
/>
|
|
481
504
|
</span>
|
|
482
505
|
<label
|
|
483
|
-
class="components-toggle-control__label"
|
|
506
|
+
class="components-flex-item components-flex-block components-toggle-control__label emotion-6 emotion-5"
|
|
507
|
+
data-wp-c16t="true"
|
|
508
|
+
data-wp-component="FlexBlock"
|
|
484
509
|
for="inspector-toggle-control-6"
|
|
485
510
|
>
|
|
486
511
|
Display block breadcrumbs
|
|
@@ -488,7 +513,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
|
|
|
488
513
|
</div>
|
|
489
514
|
</div>
|
|
490
515
|
<p
|
|
491
|
-
class="components-base-control__help emotion-
|
|
516
|
+
class="components-base-control__help emotion-8 emotion-9"
|
|
492
517
|
id="inspector-toggle-control-6__help"
|
|
493
518
|
>
|
|
494
519
|
Shows block breadcrumbs at the bottom of the editor.
|