@wordpress/edit-post 7.24.0 → 7.25.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.
Files changed (143) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/header/header-toolbar/index.js +8 -4
  3. package/build/components/header/header-toolbar/index.js.map +1 -1
  4. package/build/components/header/index.js +13 -11
  5. package/build/components/header/index.js.map +1 -1
  6. package/build/components/header/mode-switcher/index.js +1 -1
  7. package/build/components/header/mode-switcher/index.js.map +1 -1
  8. package/build/components/header/more-menu/index.js +2 -1
  9. package/build/components/header/more-menu/index.js.map +1 -1
  10. package/build/components/header/writing-menu/index.js +13 -12
  11. package/build/components/header/writing-menu/index.js.map +1 -1
  12. package/build/components/layout/index.js +12 -12
  13. package/build/components/layout/index.js.map +1 -1
  14. package/build/components/preferences-modal/index.js +65 -49
  15. package/build/components/preferences-modal/index.js.map +1 -1
  16. package/build/components/sidebar/post-status/index.js +1 -2
  17. package/build/components/sidebar/post-status/index.js.map +1 -1
  18. package/build/components/sidebar/settings-header/index.js +17 -43
  19. package/build/components/sidebar/settings-header/index.js.map +1 -1
  20. package/build/components/sidebar/settings-sidebar/index.js +80 -20
  21. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  22. package/build/components/start-page-options/index.js +3 -3
  23. package/build/components/start-page-options/index.js.map +1 -1
  24. package/build/components/visual-editor/index.js +20 -257
  25. package/build/components/visual-editor/index.js.map +1 -1
  26. package/build/components/welcome-guide/index.js +6 -3
  27. package/build/components/welcome-guide/index.js.map +1 -1
  28. package/build/editor.js +5 -6
  29. package/build/editor.js.map +1 -1
  30. package/build/editor.native.js +1 -2
  31. package/build/editor.native.js.map +1 -1
  32. package/build/index.js +5 -4
  33. package/build/index.js.map +1 -1
  34. package/build/plugins/welcome-guide-menu-item/index.js +2 -6
  35. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  36. package/build/store/actions.js +35 -39
  37. package/build/store/actions.js.map +1 -1
  38. package/build/store/reducer.js +1 -34
  39. package/build/store/reducer.js.map +1 -1
  40. package/build/store/selectors.js +22 -12
  41. package/build/store/selectors.js.map +1 -1
  42. package/build-module/components/header/header-toolbar/index.js +8 -4
  43. package/build-module/components/header/header-toolbar/index.js.map +1 -1
  44. package/build-module/components/header/index.js +15 -13
  45. package/build-module/components/header/index.js.map +1 -1
  46. package/build-module/components/header/mode-switcher/index.js +1 -1
  47. package/build-module/components/header/mode-switcher/index.js.map +1 -1
  48. package/build-module/components/header/more-menu/index.js +2 -1
  49. package/build-module/components/header/more-menu/index.js.map +1 -1
  50. package/build-module/components/header/writing-menu/index.js +14 -13
  51. package/build-module/components/header/writing-menu/index.js.map +1 -1
  52. package/build-module/components/layout/index.js +13 -13
  53. package/build-module/components/layout/index.js.map +1 -1
  54. package/build-module/components/preferences-modal/index.js +65 -49
  55. package/build-module/components/preferences-modal/index.js.map +1 -1
  56. package/build-module/components/sidebar/post-status/index.js +2 -3
  57. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  58. package/build-module/components/sidebar/settings-header/index.js +20 -46
  59. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  60. package/build-module/components/sidebar/settings-sidebar/index.js +80 -21
  61. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  62. package/build-module/components/start-page-options/index.js +3 -3
  63. package/build-module/components/start-page-options/index.js.map +1 -1
  64. package/build-module/components/visual-editor/index.js +24 -261
  65. package/build-module/components/visual-editor/index.js.map +1 -1
  66. package/build-module/components/welcome-guide/index.js +6 -3
  67. package/build-module/components/welcome-guide/index.js.map +1 -1
  68. package/build-module/editor.js +5 -6
  69. package/build-module/editor.js.map +1 -1
  70. package/build-module/editor.native.js +1 -2
  71. package/build-module/editor.native.js.map +1 -1
  72. package/build-module/index.js +3 -2
  73. package/build-module/index.js.map +1 -1
  74. package/build-module/plugins/welcome-guide-menu-item/index.js +2 -6
  75. package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
  76. package/build-module/store/actions.js +31 -36
  77. package/build-module/store/actions.js.map +1 -1
  78. package/build-module/store/reducer.js +1 -33
  79. package/build-module/store/reducer.js.map +1 -1
  80. package/build-module/store/selectors.js +18 -9
  81. package/build-module/store/selectors.js.map +1 -1
  82. package/build-style/style-rtl.css +63 -200
  83. package/build-style/style.css +63 -200
  84. package/package.json +32 -32
  85. package/src/components/header/header-toolbar/index.js +4 -0
  86. package/src/components/header/header-toolbar/style.scss +15 -13
  87. package/src/components/header/index.js +28 -13
  88. package/src/components/header/mode-switcher/index.js +2 -1
  89. package/src/components/header/more-menu/index.js +1 -0
  90. package/src/components/header/style.scss +60 -34
  91. package/src/components/header/writing-menu/index.js +16 -18
  92. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +1 -1
  93. package/src/components/layout/index.js +13 -12
  94. package/src/components/preferences-modal/index.js +109 -96
  95. package/src/components/preferences-modal/test/index.js +1 -52
  96. package/src/components/sidebar/post-status/index.js +2 -2
  97. package/src/components/sidebar/settings-header/index.js +19 -71
  98. package/src/components/sidebar/settings-sidebar/index.js +117 -54
  99. package/src/components/sidebar/style.scss +4 -12
  100. package/src/components/start-page-options/index.js +3 -3
  101. package/src/components/visual-editor/index.js +26 -359
  102. package/src/components/visual-editor/style.scss +0 -15
  103. package/src/components/welcome-guide/index.js +4 -2
  104. package/src/editor.js +7 -7
  105. package/src/editor.native.js +3 -9
  106. package/src/index.js +3 -2
  107. package/src/plugins/welcome-guide-menu-item/index.js +3 -6
  108. package/src/store/actions.js +32 -46
  109. package/src/store/reducer.js +0 -33
  110. package/src/store/selectors.js +23 -9
  111. package/src/store/test/actions.js +0 -28
  112. package/src/style.scss +0 -3
  113. package/src/test/__snapshots__/editor.native.js.snap +21 -0
  114. package/src/test/editor.native.js +90 -56
  115. package/build/components/device-preview/index.js +0 -72
  116. package/build/components/device-preview/index.js.map +0 -1
  117. package/build/components/header/document-actions/index.js +0 -82
  118. package/build/components/header/document-actions/index.js.map +0 -1
  119. package/build/components/sidebar/post-template/create-modal.js +0 -99
  120. package/build/components/sidebar/post-template/create-modal.js.map +0 -1
  121. package/build/components/sidebar/post-template/form.js +0 -110
  122. package/build/components/sidebar/post-template/form.js.map +0 -1
  123. package/build/components/sidebar/post-template/index.js +0 -106
  124. package/build/components/sidebar/post-template/index.js.map +0 -1
  125. package/build-module/components/device-preview/index.js +0 -65
  126. package/build-module/components/device-preview/index.js.map +0 -1
  127. package/build-module/components/header/document-actions/index.js +0 -74
  128. package/build-module/components/header/document-actions/index.js.map +0 -1
  129. package/build-module/components/sidebar/post-template/create-modal.js +0 -92
  130. package/build-module/components/sidebar/post-template/create-modal.js.map +0 -1
  131. package/build-module/components/sidebar/post-template/form.js +0 -102
  132. package/build-module/components/sidebar/post-template/form.js.map +0 -1
  133. package/build-module/components/sidebar/post-template/index.js +0 -98
  134. package/build-module/components/sidebar/post-template/index.js.map +0 -1
  135. package/src/components/device-preview/index.js +0 -73
  136. package/src/components/header/document-actions/index.js +0 -82
  137. package/src/components/header/document-actions/style.scss +0 -64
  138. package/src/components/sidebar/post-template/create-modal.js +0 -140
  139. package/src/components/sidebar/post-template/form.js +0 -141
  140. package/src/components/sidebar/post-template/index.js +0 -120
  141. package/src/components/sidebar/post-template/style.scss +0 -22
  142. package/src/components/sidebar/settings-header/style.scss +0 -74
  143. package/src/components/sidebar/template/style.scss +0 -35
@@ -468,7 +468,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
468
468
 
469
469
  .interface-pinned-items {
470
470
  display: flex;
471
- gap: 4px;
471
+ gap: 8px;
472
472
  margin-right: -4px;
473
473
  }
474
474
  .interface-pinned-items .components-button {
@@ -616,11 +616,37 @@ body.is-fullscreen-mode .interface-interface-skeleton {
616
616
  display: block;
617
617
  }
618
618
  }
619
- .edit-post-header__toolbar .block-editor-block-contextual-toolbar.is-fixed {
620
- border: none;
621
- }
622
619
  .edit-post-header__toolbar .selected-block-tools-wrapper {
623
620
  overflow-x: hidden;
621
+ display: flex;
622
+ }
623
+ .edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-contextual-toolbar {
624
+ border-bottom: 0;
625
+ }
626
+ .edit-post-header__toolbar .selected-block-tools-wrapper::after {
627
+ content: "";
628
+ width: 1px;
629
+ margin-top: 12px;
630
+ margin-bottom: 12px;
631
+ background-color: #ddd;
632
+ margin-left: 8px;
633
+ }
634
+ .edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group,
635
+ .edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar {
636
+ border-right: none;
637
+ }
638
+ .edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group::after,
639
+ .edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar::after {
640
+ content: "";
641
+ width: 1px;
642
+ margin-top: 12px;
643
+ margin-bottom: 12px;
644
+ background-color: #ddd;
645
+ margin-left: 8px;
646
+ }
647
+ .edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group .components-toolbar-group.components-toolbar-group::after,
648
+ .edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar .components-toolbar-group.components-toolbar-group::after {
649
+ display: none;
624
650
  }
625
651
  .edit-post-header__toolbar .selected-block-tools-wrapper.is-collapsed {
626
652
  display: none;
@@ -647,39 +673,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
647
673
  align-items: center;
648
674
  flex-wrap: nowrap;
649
675
  padding-right: 4px;
650
- gap: 4px;
676
+ gap: 8px;
651
677
  }
652
678
  @media (min-width: 600px) {
653
679
  .edit-post-header__settings {
654
680
  padding-right: 10px;
655
681
  }
656
682
  }
657
- @media (min-width: 600px) {
658
- .edit-post-header__settings {
659
- gap: 8px;
660
- }
661
- }
662
-
663
- .edit-post-header-preview__grouping-external {
664
- display: flex;
665
- position: relative;
666
- padding-bottom: 0;
667
- }
668
-
669
- .edit-post-header-preview__button-external {
670
- padding-left: 8px;
671
- margin-right: auto;
672
- width: 100%;
673
- display: flex;
674
- justify-content: flex-start;
675
- }
676
- .edit-post-header-preview__button-external svg {
677
- margin-left: auto;
678
- }
679
-
680
- .edit-post-post-preview-dropdown .components-popover__content {
681
- padding-bottom: 0;
682
- }
683
683
 
684
684
  /**
685
685
  * Show icon labels.
@@ -765,6 +765,18 @@ body.is-fullscreen-mode .interface-interface-skeleton {
765
765
  content: none;
766
766
  }
767
767
 
768
+ .show-icon-labels .edit-post-header__toolbar .block-editor-block-mover {
769
+ border-left: none;
770
+ }
771
+ .show-icon-labels .edit-post-header__toolbar .block-editor-block-mover::before {
772
+ content: "";
773
+ width: 1px;
774
+ margin-top: 12px;
775
+ margin-bottom: 12px;
776
+ background-color: #ddd;
777
+ margin-left: 8px;
778
+ }
779
+
768
780
  .edit-post-header__dropdown .components-menu-item__button.components-menu-item__button,
769
781
  .edit-post-header__dropdown .components-button.editor-history__undo,
770
782
  .edit-post-header__dropdown .components-button.editor-history__redo,
@@ -803,6 +815,12 @@ body.is-fullscreen-mode .interface-interface-skeleton {
803
815
  margin-right: 8px;
804
816
  }
805
817
 
818
+ @media (min-width: 600px) {
819
+ .edit-post-header__post-preview-button {
820
+ display: none;
821
+ }
822
+ }
823
+
806
824
  .is-distraction-free .interface-interface-skeleton__header {
807
825
  border-bottom: none;
808
826
  }
@@ -814,10 +832,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
814
832
  position: absolute;
815
833
  width: 100%;
816
834
  }
817
- .is-distraction-free .edit-post-header > .edit-post-header__settings > .editor-post-preview {
835
+ .is-distraction-free .edit-post-header > .edit-post-header__settings > .edit-post-header__post-preview-button {
818
836
  visibility: hidden;
819
837
  }
820
- .is-distraction-free .edit-post-header > .edit-post-header__toolbar .edit-post-header-toolbar__inserter-toggle, .is-distraction-free .edit-post-header > .edit-post-header__toolbar .edit-post-header-toolbar__document-overview-toggle, .is-distraction-free .edit-post-header > .edit-post-header__settings > .block-editor-post-preview__dropdown, .is-distraction-free .edit-post-header > .edit-post-header__settings > .interface-pinned-items {
838
+ .is-distraction-free .edit-post-header > .edit-post-header__toolbar .edit-post-header-toolbar__inserter-toggle, .is-distraction-free .edit-post-header > .edit-post-header__toolbar .edit-post-header-toolbar__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 {
821
839
  display: none;
822
840
  }
823
841
  .is-distraction-free .interface-interface-skeleton__header:focus-within {
@@ -934,9 +952,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
934
952
  }
935
953
  .edit-post-header-toolbar .edit-post-header-toolbar__left > .components-button.has-icon,
936
954
  .edit-post-header-toolbar .edit-post-header-toolbar__left > .components-dropdown > .components-button.has-icon {
937
- height: 36px;
938
- min-width: 36px;
939
- padding: 6px;
955
+ height: 32px;
956
+ min-width: 32px;
957
+ padding: 4px;
940
958
  }
941
959
  .edit-post-header-toolbar .edit-post-header-toolbar__left > .components-button.has-icon.is-pressed,
942
960
  .edit-post-header-toolbar .edit-post-header-toolbar__left > .components-dropdown > .components-button.has-icon.is-pressed {
@@ -974,12 +992,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
974
992
  .edit-post-header-toolbar__left {
975
993
  display: inline-flex;
976
994
  align-items: center;
977
- padding-left: 8px;
995
+ padding-left: 16px;
996
+ gap: 8px;
978
997
  margin-right: 8px;
979
998
  }
980
- @media (min-width: 600px) {
999
+ @media (min-width: 782px) {
981
1000
  .edit-post-header-toolbar__left {
982
- padding-left: 24px;
1001
+ padding-left: 20px;
983
1002
  }
984
1003
  }
985
1004
  @media (min-width: 1280px) {
@@ -989,7 +1008,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
989
1008
  }
990
1009
 
991
1010
  .edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle.has-icon {
992
- margin-right: 8px;
993
1011
  min-width: 32px;
994
1012
  width: 32px;
995
1013
  height: 32px;
@@ -997,7 +1015,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
997
1015
  }
998
1016
  .show-icon-labels .edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle.has-icon {
999
1017
  width: auto;
1000
- height: 36px;
1018
+ height: 32px;
1001
1019
  padding: 0 8px;
1002
1020
  }
1003
1021
 
@@ -1005,60 +1023,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1005
1023
  margin-left: 8px;
1006
1024
  }
1007
1025
 
1008
- .edit-post-document-actions {
1009
- display: flex;
1010
- align-items: center;
1011
- gap: 8px;
1012
- height: 36px;
1013
- justify-content: space-between;
1014
- min-width: 0;
1015
- background: #f0f0f0;
1016
- border-radius: 4px;
1017
- width: min(100%, 450px);
1018
- }
1019
- .edit-post-document-actions .components-button:hover {
1020
- color: var(--wp-block-synced-color);
1021
- background: #e0e0e0;
1022
- }
1023
-
1024
- .edit-post-document-actions__command {
1025
- flex-grow: 1;
1026
- color: var(--wp-block-synced-color);
1027
- overflow: hidden;
1028
- }
1029
-
1030
- .edit-post-document-actions__title {
1031
- flex-grow: 1;
1032
- color: var(--wp-block-synced-color);
1033
- overflow: hidden;
1034
- }
1035
- .edit-post-document-actions__title:hover {
1036
- color: var(--wp-block-synced-color);
1037
- }
1038
- .edit-post-document-actions__title .block-editor-block-icon {
1039
- flex-shrink: 0;
1040
- }
1041
- .edit-post-document-actions__title h1 {
1042
- white-space: nowrap;
1043
- overflow: hidden;
1044
- text-overflow: ellipsis;
1045
- color: var(--wp-block-synced-color);
1046
- }
1047
-
1048
- .edit-post-document-actions__shortcut {
1049
- color: #2f2f2f;
1050
- }
1051
-
1052
- .edit-post-document-actions__back.components-button.has-icon.has-text {
1053
- min-width: 36px;
1054
- flex-shrink: 0;
1055
- color: #757575;
1056
- gap: 0;
1057
- }
1058
- .edit-post-document-actions__back.components-button.has-icon.has-text:hover {
1059
- color: currentColor;
1060
- }
1061
-
1062
1026
  .edit-post-keyboard-shortcut-help-modal__section {
1063
1027
  margin: 0 0 2rem 0;
1064
1028
  }
@@ -1558,21 +1522,10 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1558
1522
  }
1559
1523
 
1560
1524
  .components-panel__header.edit-post-sidebar__panel-tabs {
1561
- justify-content: flex-start;
1562
1525
  padding-left: 0;
1563
1526
  padding-right: 16px;
1564
- border-top: 0;
1565
- margin-top: 0;
1566
- }
1567
- .components-panel__header.edit-post-sidebar__panel-tabs ul {
1568
- display: flex;
1569
- }
1570
- .components-panel__header.edit-post-sidebar__panel-tabs li {
1571
- margin: 0;
1572
1527
  }
1573
1528
  .components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon {
1574
- display: none;
1575
- margin: 0 0 0 auto;
1576
1529
  padding: 0;
1577
1530
  min-width: 24px;
1578
1531
  height: 24px;
@@ -1583,6 +1536,10 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1583
1536
  }
1584
1537
  }
1585
1538
 
1539
+ .edit-post-sidebar__panel {
1540
+ margin-top: -1px;
1541
+ }
1542
+
1586
1543
  .components-panel__body.is-opened.edit-post-last-revision__panel {
1587
1544
  padding: 0;
1588
1545
  height: 48px;
@@ -1604,96 +1561,11 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1604
1561
  align-items: stretch;
1605
1562
  }
1606
1563
 
1607
- .components-button.edit-post-post-template__toggle {
1608
- display: inline-block;
1609
- width: 100%;
1610
- overflow: hidden;
1611
- text-overflow: ellipsis;
1612
- }
1613
-
1614
- .edit-post-post-template__dialog {
1615
- z-index: 99999;
1616
- }
1617
-
1618
- .edit-post-post-template__form {
1619
- min-width: 248px;
1620
- margin: 8px;
1621
- }
1622
-
1623
- @media (min-width: 782px) {
1624
- .edit-post-post-template__create-form {
1625
- width: 320px;
1626
- }
1627
- }
1628
-
1629
1564
  .edit-post-post-visibility__dialog .editor-post-visibility {
1630
1565
  min-width: 248px;
1631
1566
  margin: 8px;
1632
1567
  }
1633
1568
 
1634
- .components-button.edit-post-sidebar__panel-tab {
1635
- position: relative;
1636
- border-radius: 0;
1637
- height: 48px;
1638
- background: transparent;
1639
- border: none;
1640
- box-shadow: none;
1641
- cursor: pointer;
1642
- padding: 3px 16px;
1643
- margin-left: 0;
1644
- font-weight: 500;
1645
- }
1646
- .components-button.edit-post-sidebar__panel-tab:focus:not(:disabled) {
1647
- position: relative;
1648
- box-shadow: none;
1649
- outline: none;
1650
- }
1651
- .components-button.edit-post-sidebar__panel-tab::after {
1652
- content: "";
1653
- position: absolute;
1654
- right: 0;
1655
- bottom: 0;
1656
- left: 0;
1657
- pointer-events: none;
1658
- background: var(--wp-admin-theme-color);
1659
- height: calc(0 * var(--wp-admin-border-width-focus));
1660
- border-radius: 0;
1661
- transition: all 0.1s linear;
1662
- }
1663
- @media (prefers-reduced-motion: reduce) {
1664
- .components-button.edit-post-sidebar__panel-tab::after {
1665
- transition-duration: 0s;
1666
- transition-delay: 0s;
1667
- }
1668
- }
1669
- .components-button.edit-post-sidebar__panel-tab.is-active::after {
1670
- height: calc(1 * var(--wp-admin-border-width-focus));
1671
- outline: 2px solid transparent;
1672
- outline-offset: -1px;
1673
- }
1674
- .components-button.edit-post-sidebar__panel-tab::before {
1675
- content: "";
1676
- position: absolute;
1677
- top: 12px;
1678
- right: 12px;
1679
- bottom: 12px;
1680
- left: 12px;
1681
- pointer-events: none;
1682
- box-shadow: 0 0 0 0 transparent;
1683
- border-radius: 2px;
1684
- transition: all 0.1s linear;
1685
- }
1686
- @media (prefers-reduced-motion: reduce) {
1687
- .components-button.edit-post-sidebar__panel-tab::before {
1688
- transition-duration: 0s;
1689
- transition-delay: 0s;
1690
- }
1691
- }
1692
- .components-button.edit-post-sidebar__panel-tab:focus-visible::before {
1693
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
1694
- outline: 2px solid transparent;
1695
- }
1696
-
1697
1569
  h2.edit-post-template-summary__title {
1698
1570
  line-height: 24px;
1699
1571
  margin: 0 0 4px;
@@ -1792,15 +1664,6 @@ h2.edit-post-template-summary__title {
1792
1664
  padding: 6px;
1793
1665
  }
1794
1666
 
1795
- .edit-post-visual-editor__post-title-wrapper {
1796
- margin-top: 4rem;
1797
- margin-bottom: var(--wp--style--block-gap);
1798
- }
1799
- .edit-post-visual-editor__post-title-wrapper .editor-post-title {
1800
- margin-left: auto;
1801
- margin-right: auto;
1802
- }
1803
-
1804
1667
  .edit-post-visual-editor__content-area {
1805
1668
  width: 100%;
1806
1669
  height: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "7.24.0",
3
+ "version": "7.25.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.47.0",
31
- "@wordpress/api-fetch": "^6.44.0",
32
- "@wordpress/block-editor": "^12.15.0",
33
- "@wordpress/block-library": "^8.24.0",
34
- "@wordpress/blocks": "^12.24.0",
35
- "@wordpress/commands": "^0.18.0",
36
- "@wordpress/components": "^25.13.0",
37
- "@wordpress/compose": "^6.24.0",
38
- "@wordpress/core-commands": "^0.16.0",
39
- "@wordpress/core-data": "^6.24.0",
40
- "@wordpress/data": "^9.17.0",
41
- "@wordpress/deprecated": "^3.47.0",
42
- "@wordpress/dom": "^3.47.0",
43
- "@wordpress/editor": "^13.24.0",
44
- "@wordpress/element": "^5.24.0",
45
- "@wordpress/hooks": "^3.47.0",
46
- "@wordpress/i18n": "^4.47.0",
47
- "@wordpress/icons": "^9.38.0",
48
- "@wordpress/interface": "^5.24.0",
49
- "@wordpress/keyboard-shortcuts": "^4.24.0",
50
- "@wordpress/keycodes": "^3.47.0",
51
- "@wordpress/media-utils": "^4.38.0",
52
- "@wordpress/notices": "^4.15.0",
53
- "@wordpress/plugins": "^6.15.0",
54
- "@wordpress/preferences": "^3.24.0",
55
- "@wordpress/private-apis": "^0.29.0",
56
- "@wordpress/url": "^3.48.0",
57
- "@wordpress/viewport": "^5.24.0",
58
- "@wordpress/warning": "^2.47.0",
59
- "@wordpress/widgets": "^3.24.0",
30
+ "@wordpress/a11y": "^3.48.0",
31
+ "@wordpress/api-fetch": "^6.45.0",
32
+ "@wordpress/block-editor": "^12.16.0",
33
+ "@wordpress/block-library": "^8.25.0",
34
+ "@wordpress/blocks": "^12.25.0",
35
+ "@wordpress/commands": "^0.19.0",
36
+ "@wordpress/components": "^25.14.0",
37
+ "@wordpress/compose": "^6.25.0",
38
+ "@wordpress/core-commands": "^0.17.0",
39
+ "@wordpress/core-data": "^6.25.0",
40
+ "@wordpress/data": "^9.18.0",
41
+ "@wordpress/deprecated": "^3.48.0",
42
+ "@wordpress/dom": "^3.48.0",
43
+ "@wordpress/editor": "^13.25.0",
44
+ "@wordpress/element": "^5.25.0",
45
+ "@wordpress/hooks": "^3.48.0",
46
+ "@wordpress/i18n": "^4.48.0",
47
+ "@wordpress/icons": "^9.39.0",
48
+ "@wordpress/interface": "^5.25.0",
49
+ "@wordpress/keyboard-shortcuts": "^4.25.0",
50
+ "@wordpress/keycodes": "^3.48.0",
51
+ "@wordpress/media-utils": "^4.39.0",
52
+ "@wordpress/notices": "^4.16.0",
53
+ "@wordpress/plugins": "^6.16.0",
54
+ "@wordpress/preferences": "^3.25.0",
55
+ "@wordpress/private-apis": "^0.30.0",
56
+ "@wordpress/url": "^3.49.0",
57
+ "@wordpress/viewport": "^5.25.0",
58
+ "@wordpress/warning": "^2.48.0",
59
+ "@wordpress/widgets": "^3.25.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": "d98dff8ea96f29cfea045bf964269f46f040d539"
71
+ "gitHead": "fcf61b4beff747222c2c81d09d757ca1a0abd925"
72
72
  }
@@ -105,6 +105,7 @@ function HeaderToolbar( { hasFixedToolbar, setListViewToggleElement } ) {
105
105
  variant={ showIconLabels ? 'tertiary' : undefined }
106
106
  aria-expanded={ isListViewOpen }
107
107
  ref={ setListViewToggleElement }
108
+ size="compact"
108
109
  />
109
110
  </>
110
111
  );
@@ -159,17 +160,20 @@ function HeaderToolbar( { hasFixedToolbar, setListViewToggleElement } ) {
159
160
  showIconLabels ? 'tertiary' : undefined
160
161
  }
161
162
  disabled={ isTextModeEnabled }
163
+ size="compact"
162
164
  />
163
165
  ) }
164
166
  <ToolbarItem
165
167
  as={ EditorHistoryUndo }
166
168
  showTooltip={ ! showIconLabels }
167
169
  variant={ showIconLabels ? 'tertiary' : undefined }
170
+ size="compact"
168
171
  />
169
172
  <ToolbarItem
170
173
  as={ EditorHistoryRedo }
171
174
  showTooltip={ ! showIconLabels }
172
175
  variant={ showIconLabels ? 'tertiary' : undefined }
176
+ size="compact"
173
177
  />
174
178
  { overflowItems }
175
179
  </>
@@ -39,9 +39,12 @@
39
39
  // here to the original button styles
40
40
  .edit-post-header-toolbar__left > .components-button.has-icon,
41
41
  .edit-post-header-toolbar__left > .components-dropdown > .components-button.has-icon {
42
- height: $button-size;
43
- min-width: $button-size;
44
- padding: 6px;
42
+ // @todo: override toolbar group inherited paddings from components/block-tools/style.scss.
43
+ // This is best fixed by making the mover control area a proper single toolbar group.
44
+ // It needs specificity due to style inherited from .components-accessible-toolbar .components-button.has-icon.has-icon.
45
+ height: $button-size-compact;
46
+ min-width: $button-size-compact;
47
+ padding: 4px;
45
48
 
46
49
  &.is-pressed {
47
50
  background: $gray-900;
@@ -49,7 +52,7 @@
49
52
 
50
53
  &:focus:not(:disabled) {
51
54
  box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 $border-width $white;
52
- outline: 1px solid transparent;
55
+ outline: $border-width solid transparent;
53
56
  }
54
57
 
55
58
  &::before {
@@ -79,14 +82,15 @@
79
82
  .edit-post-header-toolbar__left {
80
83
  display: inline-flex;
81
84
  align-items: center;
82
- padding-left: $grid-unit-10;
85
+ padding-left: $grid-unit-20;
86
+ gap: $grid-unit-10;
83
87
 
84
88
  // Some plugins add buttons here despite best practices.
85
89
  // Push them a bit rightwards to fit the top toolbar.
86
90
  margin-right: $grid-unit-10;
87
91
 
88
- @include break-small() {
89
- padding-left: $grid-unit-30;
92
+ @include break-medium() {
93
+ padding-left: $grid-unit-50 * 0.5;
90
94
  }
91
95
 
92
96
  @include break-wide() {
@@ -95,16 +99,14 @@
95
99
  }
96
100
 
97
101
  .edit-post-header-toolbar .edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle.has-icon {
98
- margin-right: $grid-unit-10;
99
- // Special dimensions for this button.
100
- min-width: 32px;
101
- width: 32px;
102
- height: 32px;
102
+ min-width: $button-size-compact;
103
+ width: $button-size-compact;
104
+ height: $button-size-compact;
103
105
  padding: 0;
104
106
 
105
107
  .show-icon-labels & {
106
108
  width: auto;
107
- height: 36px;
109
+ height: $button-size-compact;
108
110
  padding: 0 $grid-unit-10;
109
111
  }
110
112
  }
@@ -7,10 +7,16 @@ import classnames from 'classnames';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import {
10
- privateApis as blockEditorPrivateApis,
10
+ BlockToolbar,
11
11
  store as blockEditorStore,
12
12
  } from '@wordpress/block-editor';
13
- import { PostSavedState, PostPreviewButton } from '@wordpress/editor';
13
+ import {
14
+ PostSavedState,
15
+ PostPreviewButton,
16
+ store as editorStore,
17
+ DocumentBar,
18
+ privateApis as editorPrivateApis,
19
+ } from '@wordpress/editor';
14
20
  import { useEffect, useRef, useState } from '@wordpress/element';
15
21
  import { useSelect } from '@wordpress/data';
16
22
  import { __ } from '@wordpress/i18n';
@@ -31,14 +37,12 @@ import FullscreenModeClose from './fullscreen-mode-close';
31
37
  import HeaderToolbar from './header-toolbar';
32
38
  import MoreMenu from './more-menu';
33
39
  import PostPublishButtonOrToggle from './post-publish-button-or-toggle';
34
- import { default as DevicePreview } from '../device-preview';
35
40
  import ViewLink from '../view-link';
36
41
  import MainDashboardButton from './main-dashboard-button';
37
42
  import { store as editPostStore } from '../../store';
38
- import DocumentActions from './document-actions';
39
43
  import { unlock } from '../../lock-unlock';
40
44
 
41
- const { BlockContextualToolbar } = unlock( blockEditorPrivateApis );
45
+ const { PreviewDropdown } = unlock( editorPrivateApis );
42
46
 
43
47
  const slideY = {
44
48
  hidden: { y: '-50px' },
@@ -73,7 +77,8 @@ function Header( {
73
77
  blockSelectionStart:
74
78
  select( blockEditorStore ).getBlockSelectionStart(),
75
79
  hasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),
76
- isEditingTemplate: select( editPostStore ).isEditingTemplate(),
80
+ isEditingTemplate:
81
+ select( editorStore ).getRenderingMode() === 'template-only',
77
82
  isPublishSidebarOpened:
78
83
  select( editPostStore ).isPublishSidebarOpened(),
79
84
  hasFixedToolbar: getPreference( 'core/edit-post', 'fixedToolbar' ),
@@ -119,11 +124,13 @@ function Header( {
119
124
  className={ classnames(
120
125
  'selected-block-tools-wrapper',
121
126
  {
122
- 'is-collapsed': isBlockToolsCollapsed,
127
+ 'is-collapsed':
128
+ isEditingTemplate &&
129
+ isBlockToolsCollapsed,
123
130
  }
124
131
  ) }
125
132
  >
126
- <BlockContextualToolbar isFixed />
133
+ <BlockToolbar hideDragHandle />
127
134
  </div>
128
135
  <Popover.Slot
129
136
  ref={ blockToolbarRef }
@@ -150,12 +157,14 @@ function Header( {
150
157
  <div
151
158
  className={ classnames( 'edit-post-header__center', {
152
159
  'is-collapsed':
160
+ isEditingTemplate &&
161
+ hasBlockSelected &&
153
162
  ! isBlockToolsCollapsed &&
154
- isLargeViewport &&
155
- isEditingTemplate,
163
+ hasFixedToolbar &&
164
+ isLargeViewport,
156
165
  } ) }
157
166
  >
158
- { isEditingTemplate && <DocumentActions /> }
167
+ { isEditingTemplate && <DocumentBar /> }
159
168
  </div>
160
169
  </motion.div>
161
170
  <motion.div
@@ -174,8 +183,14 @@ function Header( {
174
183
  showIconLabels={ showIconLabels }
175
184
  />
176
185
  ) }
177
- <DevicePreview />
178
- <PostPreviewButton forceIsAutosaveable={ hasActiveMetaboxes } />
186
+ <PreviewDropdown
187
+ showIconLabels={ showIconLabels }
188
+ forceIsAutosaveable={ hasActiveMetaboxes }
189
+ />
190
+ <PostPreviewButton
191
+ className="edit-post-header__post-preview-button"
192
+ forceIsAutosaveable={ hasActiveMetaboxes }
193
+ />
179
194
  <ViewLink />
180
195
  <PostPublishButtonOrToggle
181
196
  forceIsDirty={ hasActiveMetaboxes }
@@ -44,7 +44,8 @@ function ModeSwitcher() {
44
44
  select( editorStore ).getEditorSettings().richEditingEnabled,
45
45
  isCodeEditingEnabled:
46
46
  select( editorStore ).getEditorSettings().codeEditingEnabled,
47
- isEditingTemplate: select( editPostStore ).isEditingTemplate(),
47
+ isEditingTemplate:
48
+ select( editorStore ).getRenderingMode() === 'template-only',
48
49
  mode: select( editPostStore ).getEditorMode(),
49
50
  } ),
50
51
  []
@@ -26,6 +26,7 @@ const MoreMenu = ( { showIconLabels } ) => {
26
26
  toggleProps={ {
27
27
  showTooltip: ! showIconLabels,
28
28
  ...( showIconLabels && { variant: 'tertiary' } ),
29
+ size: 'compact',
29
30
  } }
30
31
  >
31
32
  { ( { onClose } ) => (