@wordpress/edit-post 7.25.0 → 7.26.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/LICENSE.md +1 -1
- package/build/components/browser-url/index.js +3 -2
- package/build/components/browser-url/index.js.map +1 -1
- package/build/components/header/index.js +25 -25
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js +11 -8
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -20
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +33 -26
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js +3 -1
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/meta-boxes/meta-box-visibility.js +2 -6
- package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build/components/preferences-modal/index.js +25 -8
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/options/enable-feature.js +23 -23
- package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/options/enable-panel.js +3 -6
- package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build/components/sidebar/plugin-document-setting-panel/index.js +3 -3
- package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js +2 -10
- package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +2 -3
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +1 -7
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/editor.js +19 -28
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +3 -10
- package/build/editor.native.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +16 -12
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/use-post-history.js +79 -0
- package/build/hooks/use-post-history.js.map +1 -0
- package/build/index.js +19 -16
- package/build/index.js.map +1 -1
- package/build/index.native.js +7 -1
- package/build/index.native.js.map +1 -1
- package/build/store/actions.js +59 -73
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js +1 -62
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +66 -38
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/browser-url/index.js +3 -2
- package/build-module/components/browser-url/index.js.map +1 -1
- package/build-module/components/header/index.js +25 -25
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +11 -8
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -20
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +33 -25
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +4 -2
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/meta-boxes/meta-box-visibility.js +2 -6
- package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +25 -8
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-feature.js +22 -23
- package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/options/enable-panel.js +3 -7
- package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js +3 -3
- package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +2 -10
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +3 -4
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +2 -8
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/editor.js +19 -28
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +3 -10
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +16 -12
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/use-post-history.js +73 -0
- package/build-module/hooks/use-post-history.js.map +1 -0
- package/build-module/index.js +17 -11
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +7 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/store/actions.js +55 -69
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js +1 -60
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +58 -29
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +13 -284
- package/build-style/style.css +13 -284
- package/package.json +32 -32
- package/src/components/browser-url/index.js +4 -2
- package/src/components/header/index.js +24 -40
- package/src/components/header/style.scss +3 -3
- package/src/components/header/writing-menu/index.js +10 -8
- package/src/components/keyboard-shortcut-help-modal/test/index.js +0 -15
- package/src/components/keyboard-shortcuts/index.js +1 -23
- package/src/components/layout/index.js +18 -27
- package/src/components/layout/index.native.js +9 -1
- package/src/components/meta-boxes/meta-box-visibility.js +2 -8
- package/src/components/preferences-modal/index.js +27 -9
- package/src/components/preferences-modal/options/enable-feature.js +26 -21
- package/src/components/preferences-modal/options/enable-panel.js +3 -7
- package/src/components/preferences-modal/test/__snapshots__/meta-boxes-section.js.snap +187 -175
- package/src/components/sidebar/plugin-document-setting-panel/index.js +3 -3
- package/src/components/sidebar/plugin-sidebar/index.js +1 -9
- package/src/components/sidebar/post-status/index.js +3 -3
- package/src/components/sidebar/settings-sidebar/index.js +15 -13
- package/src/components/text-editor/style.scss +0 -6
- package/src/editor.js +34 -33
- package/src/editor.native.js +2 -17
- package/src/hooks/commands/use-common-commands.js +14 -16
- package/src/hooks/use-post-history.js +73 -0
- package/src/index.js +22 -12
- package/src/index.native.js +8 -1
- package/src/store/actions.js +48 -85
- package/src/store/reducer.js +0 -60
- package/src/store/selectors.js +74 -46
- package/src/store/test/actions.js +10 -103
- package/src/store/test/reducer.js +1 -108
- package/src/store/test/selectors.js +0 -50
- package/src/style.scss +1 -5
- package/src/test/editor.native.js +17 -0
- package/build/components/header/header-toolbar/index.js +0 -160
- package/build/components/header/header-toolbar/index.js.map +0 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +0 -73
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +0 -1
- package/build/components/secondary-sidebar/list-view-outline.js +0 -112
- package/build/components/secondary-sidebar/list-view-outline.js.map +0 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +0 -148
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +0 -1
- package/build/components/sidebar/discussion-panel/index.js +0 -59
- package/build/components/sidebar/discussion-panel/index.js.map +0 -1
- package/build/components/sidebar/featured-image/index.js +0 -70
- package/build/components/sidebar/featured-image/index.js.map +0 -1
- package/build/components/sidebar/last-revision/index.js +0 -21
- package/build/components/sidebar/last-revision/index.js.map +0 -1
- package/build/components/sidebar/page-attributes/index.js +0 -65
- package/build/components/sidebar/page-attributes/index.js.map +0 -1
- package/build/components/sidebar/plugin-post-excerpt/index.js +0 -72
- package/build/components/sidebar/plugin-post-excerpt/index.js.map +0 -1
- package/build/components/sidebar/post-excerpt/index.js +0 -54
- package/build/components/sidebar/post-excerpt/index.js.map +0 -1
- package/build/components/sidebar/post-taxonomies/index.js +0 -30
- package/build/components/sidebar/post-taxonomies/index.js.map +0 -1
- package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +0 -56
- package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +0 -1
- package/build/components/view-link/index.js +0 -53
- package/build/components/view-link/index.js.map +0 -1
- package/build-module/components/header/header-toolbar/index.js +0 -152
- package/build-module/components/header/header-toolbar/index.js.map +0 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +0 -66
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +0 -1
- package/build-module/components/secondary-sidebar/list-view-outline.js +0 -105
- package/build-module/components/secondary-sidebar/list-view-outline.js.map +0 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +0 -140
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +0 -1
- package/build-module/components/sidebar/discussion-panel/index.js +0 -52
- package/build-module/components/sidebar/discussion-panel/index.js.map +0 -1
- package/build-module/components/sidebar/featured-image/index.js +0 -63
- package/build-module/components/sidebar/featured-image/index.js.map +0 -1
- package/build-module/components/sidebar/last-revision/index.js +0 -13
- package/build-module/components/sidebar/last-revision/index.js.map +0 -1
- package/build-module/components/sidebar/page-attributes/index.js +0 -57
- package/build-module/components/sidebar/page-attributes/index.js.map +0 -1
- package/build-module/components/sidebar/plugin-post-excerpt/index.js +0 -64
- package/build-module/components/sidebar/plugin-post-excerpt/index.js.map +0 -1
- package/build-module/components/sidebar/post-excerpt/index.js +0 -47
- package/build-module/components/sidebar/post-excerpt/index.js.map +0 -1
- package/build-module/components/sidebar/post-taxonomies/index.js +0 -21
- package/build-module/components/sidebar/post-taxonomies/index.js.map +0 -1
- package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +0 -48
- package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +0 -1
- package/build-module/components/view-link/index.js +0 -46
- package/build-module/components/view-link/index.js.map +0 -1
- package/src/components/header/header-toolbar/index.js +0 -186
- package/src/components/header/header-toolbar/style.scss +0 -116
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +0 -929
- package/src/components/secondary-sidebar/inserter-sidebar.js +0 -71
- package/src/components/secondary-sidebar/list-view-outline.js +0 -98
- package/src/components/secondary-sidebar/list-view-sidebar.js +0 -170
- package/src/components/secondary-sidebar/style.scss +0 -120
- package/src/components/sidebar/discussion-panel/index.js +0 -62
- package/src/components/sidebar/featured-image/index.js +0 -67
- package/src/components/sidebar/last-revision/index.js +0 -17
- package/src/components/sidebar/last-revision/style.scss +0 -10
- package/src/components/sidebar/page-attributes/index.js +0 -65
- package/src/components/sidebar/plugin-post-excerpt/index.js +0 -61
- package/src/components/sidebar/plugin-post-excerpt/test/index.js +0 -36
- package/src/components/sidebar/post-excerpt/index.js +0 -59
- package/src/components/sidebar/post-taxonomies/index.js +0 -30
- package/src/components/sidebar/post-taxonomies/taxonomy-panel.js +0 -48
- package/src/components/view-link/index.js +0 -48
package/build-style/style.css
CHANGED
|
@@ -569,6 +569,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
569
569
|
color: #757575;
|
|
570
570
|
}
|
|
571
571
|
|
|
572
|
+
.interface-preferences-modal__section:has(.interface-preferences-modal__section-content:empty) {
|
|
573
|
+
display: none;
|
|
574
|
+
}
|
|
575
|
+
|
|
572
576
|
.interface-preferences-modal__option + .interface-preferences-modal__option {
|
|
573
577
|
margin-top: 16px;
|
|
574
578
|
}
|
|
@@ -736,21 +740,21 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
736
740
|
.edit-post-header__dropdown .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon {
|
|
737
741
|
display: block;
|
|
738
742
|
}
|
|
739
|
-
.show-icon-labels.interface-pinned-items .
|
|
743
|
+
.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
740
744
|
.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button,
|
|
741
|
-
.show-icon-labels .edit-post-header .
|
|
745
|
+
.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
742
746
|
.show-icon-labels .edit-post-header .interface-pinned-items .components-button,
|
|
743
|
-
.edit-post-header__dropdown .
|
|
747
|
+
.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
744
748
|
.edit-post-header__dropdown .interface-pinned-items .components-button {
|
|
745
749
|
padding-left: 8px;
|
|
746
750
|
padding-right: 8px;
|
|
747
751
|
}
|
|
748
752
|
@media (min-width: 600px) {
|
|
749
|
-
.show-icon-labels.interface-pinned-items .
|
|
753
|
+
.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
750
754
|
.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button,
|
|
751
|
-
.show-icon-labels .edit-post-header .
|
|
755
|
+
.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
752
756
|
.show-icon-labels .edit-post-header .interface-pinned-items .components-button,
|
|
753
|
-
.edit-post-header__dropdown .
|
|
757
|
+
.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
754
758
|
.edit-post-header__dropdown .interface-pinned-items .components-button {
|
|
755
759
|
padding-left: 12px;
|
|
756
760
|
padding-right: 12px;
|
|
@@ -835,7 +839,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
835
839
|
.is-distraction-free .edit-post-header > .edit-post-header__settings > .edit-post-header__post-preview-button {
|
|
836
840
|
visibility: hidden;
|
|
837
841
|
}
|
|
838
|
-
.is-distraction-free .edit-post-header > .edit-post-header__toolbar .
|
|
842
|
+
.is-distraction-free .edit-post-header > .edit-post-header__toolbar .editor-document-tools__inserter-toggle, .is-distraction-free .edit-post-header > .edit-post-header__toolbar .editor-document-tools__document-overview-toggle, .is-distraction-free .edit-post-header > .edit-post-header__settings > .editor-preview-dropdown, .is-distraction-free .edit-post-header > .edit-post-header__settings > .interface-pinned-items {
|
|
839
843
|
display: none;
|
|
840
844
|
}
|
|
841
845
|
.is-distraction-free .interface-interface-skeleton__header:focus-within {
|
|
@@ -915,114 +919,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
915
919
|
margin-top: -1px;
|
|
916
920
|
}
|
|
917
921
|
|
|
918
|
-
.edit-post-header-toolbar {
|
|
919
|
-
display: inline-flex;
|
|
920
|
-
align-items: center;
|
|
921
|
-
}
|
|
922
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-button {
|
|
923
|
-
display: none;
|
|
924
|
-
}
|
|
925
|
-
@media (min-width: 600px) {
|
|
926
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-button {
|
|
927
|
-
display: inline-flex;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle {
|
|
931
|
-
display: inline-flex;
|
|
932
|
-
}
|
|
933
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle svg {
|
|
934
|
-
transition: transform cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
|
|
935
|
-
}
|
|
936
|
-
@media (prefers-reduced-motion: reduce) {
|
|
937
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle svg {
|
|
938
|
-
transition-duration: 0s;
|
|
939
|
-
transition-delay: 0s;
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle.is-pressed svg {
|
|
943
|
-
transform: rotate(45deg);
|
|
944
|
-
}
|
|
945
|
-
.edit-post-header-toolbar .block-editor-list-view {
|
|
946
|
-
display: none;
|
|
947
|
-
}
|
|
948
|
-
@media (min-width: 600px) {
|
|
949
|
-
.edit-post-header-toolbar .block-editor-list-view {
|
|
950
|
-
display: flex;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-button.has-icon,
|
|
954
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-dropdown > .components-button.has-icon {
|
|
955
|
-
height: 32px;
|
|
956
|
-
min-width: 32px;
|
|
957
|
-
padding: 4px;
|
|
958
|
-
}
|
|
959
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-button.has-icon.is-pressed,
|
|
960
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-dropdown > .components-button.has-icon.is-pressed {
|
|
961
|
-
background: #1e1e1e;
|
|
962
|
-
}
|
|
963
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-button.has-icon:focus:not(:disabled),
|
|
964
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-dropdown > .components-button.has-icon:focus:not(:disabled) {
|
|
965
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 1px #fff;
|
|
966
|
-
outline: 1px solid transparent;
|
|
967
|
-
}
|
|
968
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-button.has-icon::before,
|
|
969
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .components-dropdown > .components-button.has-icon::before {
|
|
970
|
-
display: none;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
@media (min-width: 600px) {
|
|
974
|
-
.edit-post-header.has-reduced-ui .edit-post-header-toolbar__left > * + .components-button,
|
|
975
|
-
.edit-post-header.has-reduced-ui .edit-post-header-toolbar__left > * + .components-dropdown > [aria-expanded=false] {
|
|
976
|
-
transition: opacity 0.1s linear;
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
@media (min-width: 600px) and (prefers-reduced-motion: reduce) {
|
|
980
|
-
.edit-post-header.has-reduced-ui .edit-post-header-toolbar__left > * + .components-button,
|
|
981
|
-
.edit-post-header.has-reduced-ui .edit-post-header-toolbar__left > * + .components-dropdown > [aria-expanded=false] {
|
|
982
|
-
transition-duration: 0s;
|
|
983
|
-
transition-delay: 0s;
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
@media (min-width: 600px) {
|
|
987
|
-
.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header-toolbar__left > * + .components-button, .edit-post-header.has-reduced-ui:not(:hover) .edit-post-header-toolbar__left > * + .components-dropdown > [aria-expanded=false] {
|
|
988
|
-
opacity: 0;
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
.edit-post-header-toolbar__left {
|
|
993
|
-
display: inline-flex;
|
|
994
|
-
align-items: center;
|
|
995
|
-
padding-left: 16px;
|
|
996
|
-
gap: 8px;
|
|
997
|
-
margin-right: 8px;
|
|
998
|
-
}
|
|
999
|
-
@media (min-width: 782px) {
|
|
1000
|
-
.edit-post-header-toolbar__left {
|
|
1001
|
-
padding-left: 20px;
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
@media (min-width: 1280px) {
|
|
1005
|
-
.edit-post-header-toolbar__left {
|
|
1006
|
-
padding-right: 8px;
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
.edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle.has-icon {
|
|
1011
|
-
min-width: 32px;
|
|
1012
|
-
width: 32px;
|
|
1013
|
-
height: 32px;
|
|
1014
|
-
padding: 0;
|
|
1015
|
-
}
|
|
1016
|
-
.show-icon-labels .edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle.has-icon {
|
|
1017
|
-
width: auto;
|
|
1018
|
-
height: 32px;
|
|
1019
|
-
padding: 0 8px;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.show-icon-labels .edit-post-header-toolbar__left > * + * {
|
|
1023
|
-
margin-left: 8px;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
922
|
.edit-post-keyboard-shortcut-help-modal__section {
|
|
1027
923
|
margin: 0 0 2rem 0;
|
|
1028
924
|
}
|
|
@@ -1371,156 +1267,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1371
1267
|
clear: both;
|
|
1372
1268
|
}
|
|
1373
1269
|
|
|
1374
|
-
/**
|
|
1375
|
-
* Note that this CSS file should be in sync with its counterpart in the other editor:
|
|
1376
|
-
* packages/edit-site/src/components/secondary-sidebar/style.scss
|
|
1377
|
-
*/
|
|
1378
|
-
.edit-post-editor__inserter-panel,
|
|
1379
|
-
.edit-post-editor__document-overview-panel {
|
|
1380
|
-
height: 100%;
|
|
1381
|
-
display: flex;
|
|
1382
|
-
flex-direction: column;
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
@media (min-width: 782px) {
|
|
1386
|
-
.edit-post-editor__document-overview-panel {
|
|
1387
|
-
width: 350px;
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
.edit-post-editor__document-overview-panel .edit-post-editor__document-overview-panel__close-button {
|
|
1391
|
-
position: absolute;
|
|
1392
|
-
right: 8px;
|
|
1393
|
-
top: 6px;
|
|
1394
|
-
z-index: 1;
|
|
1395
|
-
background: #fff;
|
|
1396
|
-
}
|
|
1397
|
-
.edit-post-editor__document-overview-panel .components-tab-panel__tabs {
|
|
1398
|
-
border-bottom: 1px solid #ddd;
|
|
1399
|
-
box-sizing: border-box;
|
|
1400
|
-
display: flex;
|
|
1401
|
-
width: 100%;
|
|
1402
|
-
padding-right: 56px;
|
|
1403
|
-
}
|
|
1404
|
-
.edit-post-editor__document-overview-panel .components-tab-panel__tabs .edit-post-sidebar__panel-tab {
|
|
1405
|
-
width: 50%;
|
|
1406
|
-
margin-bottom: -1px;
|
|
1407
|
-
}
|
|
1408
|
-
.edit-post-editor__document-overview-panel .components-tab-panel__tab-content {
|
|
1409
|
-
height: calc(100% - 47px);
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
.edit-post-editor__inserter-panel-header {
|
|
1413
|
-
padding-top: 8px;
|
|
1414
|
-
padding-right: 8px;
|
|
1415
|
-
display: flex;
|
|
1416
|
-
justify-content: flex-end;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
.edit-post-editor__inserter-panel-content {
|
|
1420
|
-
height: calc(100% - 36px - 8px);
|
|
1421
|
-
}
|
|
1422
|
-
@media (min-width: 782px) {
|
|
1423
|
-
.edit-post-editor__inserter-panel-content {
|
|
1424
|
-
height: 100%;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
.edit-post-editor__list-view-panel-content,
|
|
1429
|
-
.edit-post-editor__list-view-container > .document-outline,
|
|
1430
|
-
.edit-post-editor__list-view-empty-headings {
|
|
1431
|
-
height: 100%;
|
|
1432
|
-
scrollbar-width: thin;
|
|
1433
|
-
scrollbar-gutter: stable both-edges;
|
|
1434
|
-
scrollbar-color: transparent transparent;
|
|
1435
|
-
will-change: transform;
|
|
1436
|
-
overflow: auto;
|
|
1437
|
-
scrollbar-gutter: auto;
|
|
1438
|
-
padding: 8px 6px;
|
|
1439
|
-
}
|
|
1440
|
-
.edit-post-editor__list-view-panel-content::-webkit-scrollbar,
|
|
1441
|
-
.edit-post-editor__list-view-container > .document-outline::-webkit-scrollbar,
|
|
1442
|
-
.edit-post-editor__list-view-empty-headings::-webkit-scrollbar {
|
|
1443
|
-
width: 12px;
|
|
1444
|
-
height: 12px;
|
|
1445
|
-
}
|
|
1446
|
-
.edit-post-editor__list-view-panel-content::-webkit-scrollbar-track,
|
|
1447
|
-
.edit-post-editor__list-view-container > .document-outline::-webkit-scrollbar-track,
|
|
1448
|
-
.edit-post-editor__list-view-empty-headings::-webkit-scrollbar-track {
|
|
1449
|
-
background-color: transparent;
|
|
1450
|
-
}
|
|
1451
|
-
.edit-post-editor__list-view-panel-content::-webkit-scrollbar-thumb,
|
|
1452
|
-
.edit-post-editor__list-view-container > .document-outline::-webkit-scrollbar-thumb,
|
|
1453
|
-
.edit-post-editor__list-view-empty-headings::-webkit-scrollbar-thumb {
|
|
1454
|
-
background-color: transparent;
|
|
1455
|
-
border-radius: 8px;
|
|
1456
|
-
border: 3px solid transparent;
|
|
1457
|
-
background-clip: padding-box;
|
|
1458
|
-
}
|
|
1459
|
-
.edit-post-editor__list-view-panel-content:hover::-webkit-scrollbar-thumb, .edit-post-editor__list-view-panel-content:focus::-webkit-scrollbar-thumb, .edit-post-editor__list-view-panel-content:focus-within::-webkit-scrollbar-thumb,
|
|
1460
|
-
.edit-post-editor__list-view-container > .document-outline:hover::-webkit-scrollbar-thumb,
|
|
1461
|
-
.edit-post-editor__list-view-container > .document-outline:focus::-webkit-scrollbar-thumb,
|
|
1462
|
-
.edit-post-editor__list-view-container > .document-outline:focus-within::-webkit-scrollbar-thumb,
|
|
1463
|
-
.edit-post-editor__list-view-empty-headings:hover::-webkit-scrollbar-thumb,
|
|
1464
|
-
.edit-post-editor__list-view-empty-headings:focus::-webkit-scrollbar-thumb,
|
|
1465
|
-
.edit-post-editor__list-view-empty-headings:focus-within::-webkit-scrollbar-thumb {
|
|
1466
|
-
background-color: #949494;
|
|
1467
|
-
}
|
|
1468
|
-
.edit-post-editor__list-view-panel-content:hover, .edit-post-editor__list-view-panel-content:focus, .edit-post-editor__list-view-panel-content:focus-within,
|
|
1469
|
-
.edit-post-editor__list-view-container > .document-outline:hover,
|
|
1470
|
-
.edit-post-editor__list-view-container > .document-outline:focus,
|
|
1471
|
-
.edit-post-editor__list-view-container > .document-outline:focus-within,
|
|
1472
|
-
.edit-post-editor__list-view-empty-headings:hover,
|
|
1473
|
-
.edit-post-editor__list-view-empty-headings:focus,
|
|
1474
|
-
.edit-post-editor__list-view-empty-headings:focus-within {
|
|
1475
|
-
scrollbar-color: #949494 transparent;
|
|
1476
|
-
}
|
|
1477
|
-
@media (hover: none) {
|
|
1478
|
-
.edit-post-editor__list-view-panel-content,
|
|
1479
|
-
.edit-post-editor__list-view-container > .document-outline,
|
|
1480
|
-
.edit-post-editor__list-view-empty-headings {
|
|
1481
|
-
scrollbar-color: #949494 transparent;
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
.edit-post-editor__list-view-empty-headings {
|
|
1486
|
-
text-align: center;
|
|
1487
|
-
color: #757575;
|
|
1488
|
-
}
|
|
1489
|
-
.edit-post-editor__list-view-empty-headings > svg {
|
|
1490
|
-
margin-top: 28px;
|
|
1491
|
-
}
|
|
1492
|
-
.edit-post-editor__list-view-empty-headings > p {
|
|
1493
|
-
padding-left: 32px;
|
|
1494
|
-
padding-right: 32px;
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
.edit-post-editor__list-view-overview {
|
|
1498
|
-
display: flex;
|
|
1499
|
-
flex-direction: column;
|
|
1500
|
-
gap: 8px;
|
|
1501
|
-
border-bottom: 1px solid #ddd;
|
|
1502
|
-
padding: 16px;
|
|
1503
|
-
}
|
|
1504
|
-
.edit-post-editor__list-view-overview > div > span:first-child {
|
|
1505
|
-
width: 90px;
|
|
1506
|
-
display: inline-block;
|
|
1507
|
-
}
|
|
1508
|
-
.edit-post-editor__list-view-overview > div > span {
|
|
1509
|
-
font-size: 12px;
|
|
1510
|
-
line-height: 1.4;
|
|
1511
|
-
color: #757575;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
.edit-post-editor__list-view-container {
|
|
1515
|
-
display: flex;
|
|
1516
|
-
flex-direction: column;
|
|
1517
|
-
height: 100%;
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
.edit-post-editor__document-overview-panel__tab-panel {
|
|
1521
|
-
height: 100%;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
1270
|
.components-panel__header.edit-post-sidebar__panel-tabs {
|
|
1525
1271
|
padding-left: 0;
|
|
1526
1272
|
padding-right: 16px;
|
|
@@ -1540,15 +1286,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1540
1286
|
margin-top: -1px;
|
|
1541
1287
|
}
|
|
1542
1288
|
|
|
1543
|
-
.components-panel__body.is-opened.edit-post-last-revision__panel {
|
|
1544
|
-
padding: 0;
|
|
1545
|
-
height: 48px;
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
.editor-post-last-revision__title.components-button.components-button {
|
|
1549
|
-
padding: 16px;
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
1289
|
.edit-post-post-format {
|
|
1553
1290
|
display: flex;
|
|
1554
1291
|
flex-direction: column;
|
|
@@ -1610,7 +1347,6 @@ h2.edit-post-template-summary__title {
|
|
|
1610
1347
|
}
|
|
1611
1348
|
@media (min-width: 960px) {
|
|
1612
1349
|
.edit-post-text-editor__body {
|
|
1613
|
-
padding: 16px 24px 96px 24px;
|
|
1614
1350
|
padding: 0 24px 24px 24px;
|
|
1615
1351
|
}
|
|
1616
1352
|
}
|
|
@@ -1641,9 +1377,6 @@ h2.edit-post-template-summary__title {
|
|
|
1641
1377
|
font-size: 13px;
|
|
1642
1378
|
color: #1e1e1e;
|
|
1643
1379
|
}
|
|
1644
|
-
.edit-post-text-editor__toolbar .components-button svg {
|
|
1645
|
-
order: 1;
|
|
1646
|
-
}
|
|
1647
1380
|
|
|
1648
1381
|
.edit-post-visual-editor {
|
|
1649
1382
|
position: relative;
|
|
@@ -1794,8 +1527,7 @@ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type {
|
|
|
1794
1527
|
.edit-post-sidebar,
|
|
1795
1528
|
.editor-post-publish-panel,
|
|
1796
1529
|
.components-popover,
|
|
1797
|
-
.components-modal__frame
|
|
1798
|
-
.edit-post-editor__inserter-panel {
|
|
1530
|
+
.components-modal__frame {
|
|
1799
1531
|
box-sizing: border-box;
|
|
1800
1532
|
}
|
|
1801
1533
|
.edit-post-header *,
|
|
@@ -1815,10 +1547,7 @@ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type {
|
|
|
1815
1547
|
.components-popover *::after,
|
|
1816
1548
|
.components-modal__frame *,
|
|
1817
1549
|
.components-modal__frame *::before,
|
|
1818
|
-
.components-modal__frame *::after
|
|
1819
|
-
.edit-post-editor__inserter-panel *,
|
|
1820
|
-
.edit-post-editor__inserter-panel *::before,
|
|
1821
|
-
.edit-post-editor__inserter-panel *::after {
|
|
1550
|
+
.components-modal__frame *::after {
|
|
1822
1551
|
box-sizing: inherit;
|
|
1823
1552
|
}
|
|
1824
1553
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.26.0",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,36 +27,36 @@
|
|
|
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": "^12.
|
|
33
|
-
"@wordpress/block-library": "^8.
|
|
34
|
-
"@wordpress/blocks": "^12.
|
|
35
|
-
"@wordpress/commands": "^0.
|
|
36
|
-
"@wordpress/components": "^25.
|
|
37
|
-
"@wordpress/compose": "^6.
|
|
38
|
-
"@wordpress/core-commands": "^0.
|
|
39
|
-
"@wordpress/core-data": "^6.
|
|
40
|
-
"@wordpress/data": "^9.
|
|
41
|
-
"@wordpress/deprecated": "^3.
|
|
42
|
-
"@wordpress/dom": "^3.
|
|
43
|
-
"@wordpress/editor": "^13.
|
|
44
|
-
"@wordpress/element": "^5.
|
|
45
|
-
"@wordpress/hooks": "^3.
|
|
46
|
-
"@wordpress/i18n": "^4.
|
|
47
|
-
"@wordpress/icons": "^9.
|
|
48
|
-
"@wordpress/interface": "^5.
|
|
49
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
50
|
-
"@wordpress/keycodes": "^3.
|
|
51
|
-
"@wordpress/media-utils": "^4.
|
|
52
|
-
"@wordpress/notices": "^4.
|
|
53
|
-
"@wordpress/plugins": "^6.
|
|
54
|
-
"@wordpress/preferences": "^3.
|
|
55
|
-
"@wordpress/private-apis": "^0.
|
|
56
|
-
"@wordpress/url": "^3.
|
|
57
|
-
"@wordpress/viewport": "^5.
|
|
58
|
-
"@wordpress/warning": "^2.
|
|
59
|
-
"@wordpress/widgets": "^3.
|
|
30
|
+
"@wordpress/a11y": "^3.49.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.46.0",
|
|
32
|
+
"@wordpress/block-editor": "^12.17.0",
|
|
33
|
+
"@wordpress/block-library": "^8.26.0",
|
|
34
|
+
"@wordpress/blocks": "^12.26.0",
|
|
35
|
+
"@wordpress/commands": "^0.20.0",
|
|
36
|
+
"@wordpress/components": "^25.15.0",
|
|
37
|
+
"@wordpress/compose": "^6.26.0",
|
|
38
|
+
"@wordpress/core-commands": "^0.18.0",
|
|
39
|
+
"@wordpress/core-data": "^6.26.0",
|
|
40
|
+
"@wordpress/data": "^9.19.0",
|
|
41
|
+
"@wordpress/deprecated": "^3.49.0",
|
|
42
|
+
"@wordpress/dom": "^3.49.0",
|
|
43
|
+
"@wordpress/editor": "^13.26.0",
|
|
44
|
+
"@wordpress/element": "^5.26.0",
|
|
45
|
+
"@wordpress/hooks": "^3.49.0",
|
|
46
|
+
"@wordpress/i18n": "^4.49.0",
|
|
47
|
+
"@wordpress/icons": "^9.40.0",
|
|
48
|
+
"@wordpress/interface": "^5.26.0",
|
|
49
|
+
"@wordpress/keyboard-shortcuts": "^4.26.0",
|
|
50
|
+
"@wordpress/keycodes": "^3.49.0",
|
|
51
|
+
"@wordpress/media-utils": "^4.40.0",
|
|
52
|
+
"@wordpress/notices": "^4.17.0",
|
|
53
|
+
"@wordpress/plugins": "^6.17.0",
|
|
54
|
+
"@wordpress/preferences": "^3.26.0",
|
|
55
|
+
"@wordpress/private-apis": "^0.31.0",
|
|
56
|
+
"@wordpress/url": "^3.50.0",
|
|
57
|
+
"@wordpress/viewport": "^5.26.0",
|
|
58
|
+
"@wordpress/warning": "^2.49.0",
|
|
59
|
+
"@wordpress/widgets": "^3.26.0",
|
|
60
60
|
"classnames": "^2.3.1",
|
|
61
61
|
"memize": "^2.1.0",
|
|
62
62
|
"rememo": "^4.0.2"
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "5e6f9caa205d3bfdbac131952b7bf9c6ec60569b"
|
|
72
72
|
}
|
|
@@ -43,7 +43,8 @@ export class BrowserURL extends Component {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
componentDidUpdate( prevProps ) {
|
|
46
|
-
const { postId, postStatus, postType, isSavingPost } =
|
|
46
|
+
const { postId, postStatus, postType, isSavingPost, hasHistory } =
|
|
47
|
+
this.props;
|
|
47
48
|
const { historyId } = this.state;
|
|
48
49
|
|
|
49
50
|
// Posts are still dirty while saving so wait for saving to finish
|
|
@@ -56,7 +57,8 @@ export class BrowserURL extends Component {
|
|
|
56
57
|
if (
|
|
57
58
|
( postId !== prevProps.postId || postId !== historyId ) &&
|
|
58
59
|
postStatus !== 'auto-draft' &&
|
|
59
|
-
postId
|
|
60
|
+
postId &&
|
|
61
|
+
! hasHistory
|
|
60
62
|
) {
|
|
61
63
|
this.setBrowserURL( postId );
|
|
62
64
|
}
|
|
@@ -34,15 +34,14 @@ import { store as preferencesStore } from '@wordpress/preferences';
|
|
|
34
34
|
* Internal dependencies
|
|
35
35
|
*/
|
|
36
36
|
import FullscreenModeClose from './fullscreen-mode-close';
|
|
37
|
-
import HeaderToolbar from './header-toolbar';
|
|
38
37
|
import MoreMenu from './more-menu';
|
|
39
38
|
import PostPublishButtonOrToggle from './post-publish-button-or-toggle';
|
|
40
|
-
import ViewLink from '../view-link';
|
|
41
39
|
import MainDashboardButton from './main-dashboard-button';
|
|
42
40
|
import { store as editPostStore } from '../../store';
|
|
43
41
|
import { unlock } from '../../lock-unlock';
|
|
44
42
|
|
|
45
|
-
const { PreviewDropdown } =
|
|
43
|
+
const { DocumentTools, PostViewLink, PreviewDropdown } =
|
|
44
|
+
unlock( editorPrivateApis );
|
|
46
45
|
|
|
47
46
|
const slideY = {
|
|
48
47
|
hidden: { y: '-50px' },
|
|
@@ -56,48 +55,47 @@ const slideX = {
|
|
|
56
55
|
hover: { x: 0, transition: { type: 'tween', delay: 0.2 } },
|
|
57
56
|
};
|
|
58
57
|
|
|
59
|
-
function Header( {
|
|
60
|
-
setEntitiesSavedStatesCallback,
|
|
61
|
-
setListViewToggleElement,
|
|
62
|
-
} ) {
|
|
58
|
+
function Header( { setEntitiesSavedStatesCallback } ) {
|
|
63
59
|
const isWideViewport = useViewportMatch( 'large' );
|
|
64
60
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
65
61
|
const blockToolbarRef = useRef();
|
|
66
62
|
const {
|
|
67
|
-
|
|
63
|
+
isTextEditor,
|
|
64
|
+
hasBlockSelection,
|
|
68
65
|
hasActiveMetaboxes,
|
|
69
66
|
hasFixedToolbar,
|
|
70
67
|
isEditingTemplate,
|
|
71
68
|
isPublishSidebarOpened,
|
|
72
69
|
showIconLabels,
|
|
70
|
+
hasHistory,
|
|
73
71
|
} = useSelect( ( select ) => {
|
|
74
72
|
const { get: getPreference } = select( preferencesStore );
|
|
73
|
+
const { getEditorMode } = select( editPostStore );
|
|
75
74
|
|
|
76
75
|
return {
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
isTextEditor: getEditorMode() === 'text',
|
|
77
|
+
hasBlockSelection:
|
|
78
|
+
!! select( blockEditorStore ).getBlockSelectionStart(),
|
|
79
79
|
hasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),
|
|
80
|
+
hasHistory: !! select( editorStore ).getEditorSettings().goBack,
|
|
80
81
|
isEditingTemplate:
|
|
81
82
|
select( editorStore ).getRenderingMode() === 'template-only',
|
|
82
83
|
isPublishSidebarOpened:
|
|
83
84
|
select( editPostStore ).isPublishSidebarOpened(),
|
|
84
|
-
hasFixedToolbar: getPreference( 'core
|
|
85
|
-
showIconLabels:
|
|
86
|
-
select( editPostStore ).isFeatureActive( 'showIconLabels' ),
|
|
85
|
+
hasFixedToolbar: getPreference( 'core', 'fixedToolbar' ),
|
|
86
|
+
showIconLabels: getPreference( 'core', 'showIconLabels' ),
|
|
87
87
|
};
|
|
88
88
|
}, [] );
|
|
89
89
|
|
|
90
90
|
const [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =
|
|
91
91
|
useState( true );
|
|
92
92
|
|
|
93
|
-
const hasBlockSelected = !! blockSelectionStart;
|
|
94
|
-
|
|
95
93
|
useEffect( () => {
|
|
96
94
|
// If we have a new block selection, show the block tools
|
|
97
|
-
if (
|
|
95
|
+
if ( hasBlockSelection ) {
|
|
98
96
|
setIsBlockToolsCollapsed( false );
|
|
99
97
|
}
|
|
100
|
-
}, [
|
|
98
|
+
}, [ hasBlockSelection ] );
|
|
101
99
|
|
|
102
100
|
return (
|
|
103
101
|
<div className="edit-post-header">
|
|
@@ -114,10 +112,7 @@ function Header( {
|
|
|
114
112
|
transition={ { type: 'tween', delay: 0.8 } }
|
|
115
113
|
className="edit-post-header__toolbar"
|
|
116
114
|
>
|
|
117
|
-
<
|
|
118
|
-
hasFixedToolbar={ hasFixedToolbar }
|
|
119
|
-
setListViewToggleElement={ setListViewToggleElement }
|
|
120
|
-
/>
|
|
115
|
+
<DocumentTools disableBlockTools={ isTextEditor } />
|
|
121
116
|
{ hasFixedToolbar && isLargeViewport && (
|
|
122
117
|
<>
|
|
123
118
|
<div
|
|
@@ -136,7 +131,7 @@ function Header( {
|
|
|
136
131
|
ref={ blockToolbarRef }
|
|
137
132
|
name="block-toolbar"
|
|
138
133
|
/>
|
|
139
|
-
{ isEditingTemplate &&
|
|
134
|
+
{ isEditingTemplate && hasBlockSelection && (
|
|
140
135
|
<Button
|
|
141
136
|
className="edit-post-header__block-tools-toggle"
|
|
142
137
|
icon={ isBlockToolsCollapsed ? next : previous }
|
|
@@ -158,13 +153,13 @@ function Header( {
|
|
|
158
153
|
className={ classnames( 'edit-post-header__center', {
|
|
159
154
|
'is-collapsed':
|
|
160
155
|
isEditingTemplate &&
|
|
161
|
-
|
|
156
|
+
hasBlockSelection &&
|
|
162
157
|
! isBlockToolsCollapsed &&
|
|
163
158
|
hasFixedToolbar &&
|
|
164
159
|
isLargeViewport,
|
|
165
160
|
} ) }
|
|
166
161
|
>
|
|
167
|
-
{ isEditingTemplate && <DocumentBar /> }
|
|
162
|
+
{ ( isEditingTemplate || hasHistory ) && <DocumentBar /> }
|
|
168
163
|
</div>
|
|
169
164
|
</motion.div>
|
|
170
165
|
<motion.div
|
|
@@ -178,20 +173,14 @@ function Header( {
|
|
|
178
173
|
// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.
|
|
179
174
|
// We track that DOM node to return focus to the PostPublishButtonOrToggle
|
|
180
175
|
// when the publish sidebar has been closed.
|
|
181
|
-
<PostSavedState
|
|
182
|
-
forceIsDirty={ hasActiveMetaboxes }
|
|
183
|
-
showIconLabels={ showIconLabels }
|
|
184
|
-
/>
|
|
176
|
+
<PostSavedState forceIsDirty={ hasActiveMetaboxes } />
|
|
185
177
|
) }
|
|
186
|
-
<PreviewDropdown
|
|
187
|
-
showIconLabels={ showIconLabels }
|
|
188
|
-
forceIsAutosaveable={ hasActiveMetaboxes }
|
|
189
|
-
/>
|
|
178
|
+
<PreviewDropdown forceIsAutosaveable={ hasActiveMetaboxes } />
|
|
190
179
|
<PostPreviewButton
|
|
191
180
|
className="edit-post-header__post-preview-button"
|
|
192
181
|
forceIsAutosaveable={ hasActiveMetaboxes }
|
|
193
182
|
/>
|
|
194
|
-
<
|
|
183
|
+
<PostViewLink />
|
|
195
184
|
<PostPublishButtonOrToggle
|
|
196
185
|
forceIsDirty={ hasActiveMetaboxes }
|
|
197
186
|
setEntitiesSavedStatesCallback={
|
|
@@ -199,14 +188,9 @@ function Header( {
|
|
|
199
188
|
}
|
|
200
189
|
/>
|
|
201
190
|
{ ( isWideViewport || ! showIconLabels ) && (
|
|
202
|
-
|
|
203
|
-
<PinnedItems.Slot scope="core/edit-post" />
|
|
204
|
-
<MoreMenu showIconLabels={ showIconLabels } />
|
|
205
|
-
</>
|
|
206
|
-
) }
|
|
207
|
-
{ showIconLabels && ! isWideViewport && (
|
|
208
|
-
<MoreMenu showIconLabels={ showIconLabels } />
|
|
191
|
+
<PinnedItems.Slot scope="core/edit-post" />
|
|
209
192
|
) }
|
|
193
|
+
<MoreMenu showIconLabels={ showIconLabels } />
|
|
210
194
|
</motion.div>
|
|
211
195
|
</div>
|
|
212
196
|
);
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
.components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon {
|
|
175
175
|
display: block;
|
|
176
176
|
}
|
|
177
|
-
.
|
|
177
|
+
.editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
178
178
|
.interface-pinned-items .components-button {
|
|
179
179
|
padding-left: $grid-unit;
|
|
180
180
|
padding-right: $grid-unit;
|
|
@@ -275,8 +275,8 @@
|
|
|
275
275
|
visibility: hidden;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
& > .edit-post-header__toolbar .
|
|
279
|
-
& > .edit-post-header__toolbar .
|
|
278
|
+
& > .edit-post-header__toolbar .editor-document-tools__inserter-toggle,
|
|
279
|
+
& > .edit-post-header__toolbar .editor-document-tools__document-overview-toggle,
|
|
280
280
|
& > .edit-post-header__settings > .editor-preview-dropdown,
|
|
281
281
|
& > .edit-post-header__settings > .interface-pinned-items {
|
|
282
282
|
display: none;
|