@wordpress/edit-post 5.0.1 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +2 -5
  2. package/build/components/header/fullscreen-mode-close/index.js +19 -3
  3. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  4. package/build/components/header/header-toolbar/index.native.js +10 -3
  5. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  6. package/build/components/header/more-menu/index.js +3 -14
  7. package/build/components/header/more-menu/index.js.map +1 -1
  8. package/build/components/header/template-title/index.js +1 -1
  9. package/build/components/header/template-title/index.js.map +1 -1
  10. package/build/components/header/writing-menu/index.js +7 -10
  11. package/build/components/header/writing-menu/index.js.map +1 -1
  12. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  13. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  14. package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
  15. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  16. package/build/components/keyboard-shortcuts/index.js +1 -8
  17. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  18. package/build/components/layout/index.js +3 -5
  19. package/build/components/layout/index.js.map +1 -1
  20. package/build/components/layout/index.native.js +5 -1
  21. package/build/components/layout/index.native.js.map +1 -1
  22. package/build/components/meta-boxes/index.js +37 -20
  23. package/build/components/meta-boxes/index.js.map +1 -1
  24. package/build/components/preferences-modal/index.js +56 -18
  25. package/build/components/preferences-modal/index.js.map +1 -1
  26. package/build/components/secondary-sidebar/inserter-sidebar.js +2 -1
  27. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  28. package/build/components/secondary-sidebar/list-view-sidebar.js +1 -0
  29. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  30. package/build/components/sidebar/plugin-sidebar/index.js +1 -1
  31. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  32. package/build/components/sidebar/post-link/index.js +1 -1
  33. package/build/components/sidebar/post-link/index.js.map +1 -1
  34. package/build/components/sidebar/template/actions.js +6 -1
  35. package/build/components/sidebar/template/actions.js.map +1 -1
  36. package/build/components/sidebar/template/index.js +5 -2
  37. package/build/components/sidebar/template/index.js.map +1 -1
  38. package/build/components/sidebar/template-summary/index.js +2 -1
  39. package/build/components/sidebar/template-summary/index.js.map +1 -1
  40. package/build/components/visual-editor/index.js +6 -4
  41. package/build/components/visual-editor/index.js.map +1 -1
  42. package/build/editor.js +17 -5
  43. package/build/editor.js.map +1 -1
  44. package/build/hooks/validate-multiple-use/index.js +1 -1
  45. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  46. package/build/index.js +28 -12
  47. package/build/index.js.map +1 -1
  48. package/build/plugins/welcome-guide-menu-item/index.js +6 -7
  49. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  50. package/build/store/actions.js +68 -59
  51. package/build/store/actions.js.map +1 -1
  52. package/build/store/defaults.js +0 -9
  53. package/build/store/defaults.js.map +1 -1
  54. package/build/store/reducer.js +20 -11
  55. package/build/store/reducer.js.map +1 -1
  56. package/build/store/selectors.js +24 -10
  57. package/build/store/selectors.js.map +1 -1
  58. package/build-module/components/header/fullscreen-mode-close/index.js +19 -4
  59. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  60. package/build-module/components/header/header-toolbar/index.native.js +11 -4
  61. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  62. package/build-module/components/header/more-menu/index.js +5 -15
  63. package/build-module/components/header/more-menu/index.js.map +1 -1
  64. package/build-module/components/header/template-title/index.js +1 -1
  65. package/build-module/components/header/template-title/index.js.map +1 -1
  66. package/build-module/components/header/writing-menu/index.js +7 -8
  67. package/build-module/components/header/writing-menu/index.js.map +1 -1
  68. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  69. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  70. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -3
  71. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  72. package/build-module/components/keyboard-shortcuts/index.js +1 -8
  73. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  74. package/build-module/components/layout/index.js +4 -6
  75. package/build-module/components/layout/index.js.map +1 -1
  76. package/build-module/components/layout/index.native.js +5 -1
  77. package/build-module/components/layout/index.native.js.map +1 -1
  78. package/build-module/components/meta-boxes/index.js +38 -20
  79. package/build-module/components/meta-boxes/index.js.map +1 -1
  80. package/build-module/components/preferences-modal/index.js +57 -20
  81. package/build-module/components/preferences-modal/index.js.map +1 -1
  82. package/build-module/components/secondary-sidebar/inserter-sidebar.js +2 -1
  83. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  84. package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -0
  85. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  86. package/build-module/components/sidebar/plugin-sidebar/index.js +1 -1
  87. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  88. package/build-module/components/sidebar/post-link/index.js +1 -1
  89. package/build-module/components/sidebar/post-link/index.js.map +1 -1
  90. package/build-module/components/sidebar/template/actions.js +6 -1
  91. package/build-module/components/sidebar/template/actions.js.map +1 -1
  92. package/build-module/components/sidebar/template/index.js +5 -2
  93. package/build-module/components/sidebar/template/index.js.map +1 -1
  94. package/build-module/components/sidebar/template-summary/index.js +2 -1
  95. package/build-module/components/sidebar/template-summary/index.js.map +1 -1
  96. package/build-module/components/visual-editor/index.js +6 -4
  97. package/build-module/components/visual-editor/index.js.map +1 -1
  98. package/build-module/editor.js +17 -6
  99. package/build-module/editor.js.map +1 -1
  100. package/build-module/hooks/validate-multiple-use/index.js +1 -1
  101. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  102. package/build-module/index.js +18 -5
  103. package/build-module/index.js.map +1 -1
  104. package/build-module/plugins/welcome-guide-menu-item/index.js +7 -8
  105. package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
  106. package/build-module/store/actions.js +66 -59
  107. package/build-module/store/actions.js.map +1 -1
  108. package/build-module/store/defaults.js +0 -9
  109. package/build-module/store/defaults.js.map +1 -1
  110. package/build-module/store/reducer.js +20 -11
  111. package/build-module/store/reducer.js.map +1 -1
  112. package/build-module/store/selectors.js +20 -7
  113. package/build-module/store/selectors.js.map +1 -1
  114. package/build-style/style-rtl.css +68 -69
  115. package/build-style/style.css +68 -69
  116. package/package.json +27 -27
  117. package/src/components/header/fullscreen-mode-close/index.js +37 -15
  118. package/src/components/header/fullscreen-mode-close/style.scss +2 -2
  119. package/src/components/header/header-toolbar/index.native.js +8 -2
  120. package/src/components/header/more-menu/index.js +8 -13
  121. package/src/components/header/template-title/index.js +3 -1
  122. package/src/components/header/writing-menu/index.js +7 -8
  123. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +15 -12
  124. package/src/components/keyboard-shortcut-help-modal/index.js +1 -3
  125. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +2 -2
  126. package/src/components/keyboard-shortcuts/index.js +19 -32
  127. package/src/components/layout/index.js +4 -10
  128. package/src/components/layout/index.native.js +7 -1
  129. package/src/components/meta-boxes/index.js +35 -14
  130. package/src/components/preferences-modal/index.js +93 -30
  131. package/src/components/preferences-modal/style.scss +6 -56
  132. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +334 -136
  133. package/src/components/secondary-sidebar/inserter-sidebar.js +1 -0
  134. package/src/components/secondary-sidebar/list-view-sidebar.js +1 -0
  135. package/src/components/sidebar/plugin-sidebar/index.js +1 -1
  136. package/src/components/sidebar/post-link/index.js +5 -1
  137. package/src/components/sidebar/template/actions.js +6 -1
  138. package/src/components/sidebar/template/index.js +5 -3
  139. package/src/components/sidebar/template-summary/index.js +1 -1
  140. package/src/components/sidebar/template-summary/style.scss +2 -1
  141. package/src/components/text-editor/style.scss +12 -22
  142. package/src/components/visual-editor/index.js +16 -10
  143. package/src/components/visual-editor/style.scss +4 -7
  144. package/src/components/welcome-guide/style.scss +5 -0
  145. package/src/editor.js +101 -79
  146. package/src/hooks/validate-multiple-use/index.js +1 -1
  147. package/src/index.js +18 -5
  148. package/src/plugins/welcome-guide-menu-item/index.js +7 -12
  149. package/src/store/actions.js +99 -80
  150. package/src/store/defaults.js +0 -9
  151. package/src/store/reducer.js +17 -10
  152. package/src/store/selectors.js +27 -7
  153. package/src/store/test/actions.js +0 -11
  154. package/src/store/test/reducer.js +0 -12
  155. package/src/store/test/selectors.js +0 -46
  156. package/build/components/header/feature-toggle/index.js +0 -76
  157. package/build/components/header/feature-toggle/index.js.map +0 -1
  158. package/build-module/components/header/feature-toggle/index.js +0 -60
  159. package/build-module/components/header/feature-toggle/index.js.map +0 -1
  160. package/src/components/header/feature-toggle/index.js +0 -61
  161. package/src/components/header/more-menu/test/__snapshots__/index.js.snap +0 -129
  162. package/src/components/header/more-menu/test/index.js +0 -17
@@ -122,6 +122,12 @@
122
122
  }
123
123
  }
124
124
 
125
+ @media (min-width: 782px) {
126
+ .components-panel__header + .interface-complementary-area-header {
127
+ margin-top: 0;
128
+ }
129
+ }
130
+
125
131
  .interface-complementary-area {
126
132
  background: #fff;
127
133
  color: #1e1e1e;
@@ -157,12 +163,18 @@
157
163
  .interface-complementary-area p {
158
164
  margin-top: 0;
159
165
  }
160
- .interface-complementary-area h2,
161
- .interface-complementary-area h3 {
166
+ .interface-complementary-area h2 {
162
167
  font-size: 13px;
163
168
  color: #1e1e1e;
164
169
  margin-bottom: 1.5em;
165
170
  }
171
+ .interface-complementary-area h3 {
172
+ font-size: 11px;
173
+ text-transform: uppercase;
174
+ font-weight: 500;
175
+ color: #1e1e1e;
176
+ margin-bottom: 1.5em;
177
+ }
166
178
  .interface-complementary-area hr {
167
179
  border-top: none;
168
180
  border-bottom: 1px solid #f0f0f0;
@@ -383,6 +395,39 @@ body.is-fullscreen-mode .interface-interface-skeleton {
383
395
  bottom: 0;
384
396
  }
385
397
 
398
+ .interface-more-menu-dropdown {
399
+ margin-left: -4px;
400
+ }
401
+ .interface-more-menu-dropdown .components-button {
402
+ width: auto;
403
+ padding: 0 2px;
404
+ }
405
+ @media (min-width: 600px) {
406
+ .interface-more-menu-dropdown {
407
+ margin-left: 0;
408
+ }
409
+ .interface-more-menu-dropdown .components-button {
410
+ padding: 0 4px;
411
+ }
412
+ }
413
+
414
+ .interface-more-menu-dropdown__content .components-popover__content {
415
+ min-width: 280px;
416
+ }
417
+ @media (min-width: 480px) {
418
+ .interface-more-menu-dropdown__content .components-popover__content {
419
+ width: auto;
420
+ max-width: 480px;
421
+ }
422
+ }
423
+ .interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu {
424
+ padding: 0;
425
+ }
426
+
427
+ .components-popover.interface-more-menu-dropdown__content {
428
+ z-index: 99998;
429
+ }
430
+
386
431
  .interface-pinned-items {
387
432
  display: flex;
388
433
  }
@@ -644,7 +689,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
644
689
  align-items: center;
645
690
  align-self: stretch;
646
691
  border: none;
647
- background: #23282e;
692
+ background: #1e1e1e;
648
693
  color: #fff;
649
694
  border-radius: 0;
650
695
  height: 61px;
@@ -668,7 +713,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
668
713
  bottom: 9px;
669
714
  left: 9px;
670
715
  border-radius: 4px;
671
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #23282e;
716
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;
672
717
  }
673
718
  }
674
719
  @media (min-width: 782px) and (prefers-reduced-motion: reduce) {
@@ -1278,55 +1323,9 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1278
1323
  .edit-post-preferences-modal .components-modal__content::before {
1279
1324
  content: none;
1280
1325
  }
1281
- }
1282
- .edit-post-preferences-modal .components-navigation {
1283
- background-color: #fff;
1284
- padding: 0;
1285
- max-height: 100%;
1286
- overflow-y: auto;
1287
- }
1288
- .edit-post-preferences-modal .components-navigation > * {
1289
- padding: 24px 32px;
1290
- }
1291
- .edit-post-preferences-modal .components-navigation .components-navigation__menu {
1292
- margin: 0;
1293
- color: #1e1e1e;
1294
- }
1295
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item {
1296
- color: #1e1e1e;
1297
- }
1298
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button {
1299
- color: inherit;
1300
- padding: 3px 16px;
1301
- height: 48px;
1302
- margin: 0 -16px;
1303
- width: calc(32px + 100%);
1304
- }
1305
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:focus {
1306
- background: #f0f0f0;
1307
- font-weight: 500;
1308
- }
1309
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:hover {
1310
- color: var(--wp-admin-theme-color);
1311
- }
1312
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item .components-toggle-control__label {
1313
- color: inherit;
1314
- }
1315
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__menu-title-heading {
1316
- color: inherit;
1317
- border-bottom: 1px solid #ddd;
1318
- padding-left: 0;
1319
- padding-right: 0;
1320
- }
1321
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button {
1322
- color: inherit;
1323
- padding-left: 0;
1324
- }
1325
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button:hover {
1326
- color: var(--wp-admin-theme-color);
1327
- }
1328
- .edit-post-preferences-modal .components-navigation .components-navigation__menu .edit-post-preferences-modal__custom-fields-confirmation-button {
1329
- width: auto;
1326
+ .edit-post-preferences-modal .components-navigator-provider {
1327
+ height: 100%;
1328
+ }
1330
1329
  }
1331
1330
  .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs {
1332
1331
  position: absolute;
@@ -1359,6 +1358,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1359
1358
  .edit-post-preferences-modal__section-title {
1360
1359
  font-size: 0.9rem;
1361
1360
  font-weight: 600;
1361
+ margin-top: 0;
1362
1362
  }
1363
1363
  .edit-post-preferences-modal__option .components-base-control .components-base-control__field {
1364
1364
  align-items: center;
@@ -1656,8 +1656,9 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1656
1656
  }
1657
1657
 
1658
1658
  h2.edit-post-template-summary__title {
1659
- margin: 0;
1660
1659
  line-height: 24px;
1660
+ margin: 0 0 4px;
1661
+ font-weight: 500;
1661
1662
  }
1662
1663
 
1663
1664
  .edit-post-text-editor {
@@ -1666,34 +1667,24 @@ h2.edit-post-template-summary__title {
1666
1667
  background-color: #fff;
1667
1668
  flex-grow: 1;
1668
1669
  }
1669
- .edit-post-text-editor .editor-post-title.editor-post-title__block {
1670
+ .edit-post-text-editor .editor-post-title {
1670
1671
  max-width: none;
1671
1672
  line-height: 1.4;
1672
- }
1673
- .edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input.editor-post-title__input.editor-post-title__input {
1674
1673
  font-family: Menlo, Consolas, monaco, monospace;
1675
1674
  font-size: 2.5em;
1676
1675
  font-weight: normal;
1677
- }
1678
- .edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input {
1679
1676
  border: 1px solid #949494;
1680
- margin-bottom: -1px;
1681
1677
  padding: 16px;
1682
1678
  }
1683
1679
  @media (min-width: 600px) {
1684
- .edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input {
1680
+ .edit-post-text-editor .editor-post-title {
1685
1681
  padding: 24px;
1686
1682
  }
1687
1683
  }
1688
- .edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input:focus {
1684
+ .edit-post-text-editor .editor-post-title:focus {
1689
1685
  border-color: var(--wp-admin-theme-color);
1690
1686
  box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
1691
1687
  }
1692
- @media (min-width: 600px) {
1693
- .edit-post-text-editor .editor-post-title.editor-post-title__block {
1694
- padding: 0;
1695
- }
1696
- }
1697
1688
 
1698
1689
  .edit-post-text-editor__body {
1699
1690
  width: 100%;
@@ -1755,11 +1746,13 @@ h2.edit-post-template-summary__title {
1755
1746
  padding: 6px;
1756
1747
  }
1757
1748
 
1749
+ .edit-post-visual-editor__post-title-wrapper {
1750
+ margin-top: 4rem;
1751
+ margin-bottom: var(--wp--style--block-gap);
1752
+ }
1758
1753
  .edit-post-visual-editor__post-title-wrapper .editor-post-title {
1759
- margin-top: 2em;
1760
1754
  margin-left: auto;
1761
1755
  margin-right: auto;
1762
- margin-bottom: 0;
1763
1756
  }
1764
1757
 
1765
1758
  .edit-post-visual-editor__exit-template-mode {
@@ -1787,6 +1780,12 @@ h2.edit-post-template-summary__title {
1787
1780
  background: #00a0d2;
1788
1781
  margin: 0 0 16px;
1789
1782
  }
1783
+ .edit-post-welcome-guide__image > img {
1784
+ display: block;
1785
+ max-width: 100%;
1786
+ -o-object-fit: cover;
1787
+ object-fit: cover;
1788
+ }
1790
1789
  .edit-post-welcome-guide__heading {
1791
1790
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
1792
1791
  font-size: 24px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "5.0.1",
3
+ "version": "5.0.5",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,31 +27,31 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.13.10",
30
- "@wordpress/a11y": "^3.2.1",
31
- "@wordpress/api-fetch": "^5.2.1",
32
- "@wordpress/block-editor": "^7.0.1",
33
- "@wordpress/block-library": "^5.0.1",
34
- "@wordpress/blocks": "^11.0.1",
35
- "@wordpress/components": "^16.0.0",
36
- "@wordpress/compose": "^5.0.1",
37
- "@wordpress/core-data": "^4.0.1",
38
- "@wordpress/data": "^6.0.1",
39
- "@wordpress/data-controls": "^2.2.2",
40
- "@wordpress/editor": "^11.0.1",
41
- "@wordpress/element": "^4.0.0",
42
- "@wordpress/hooks": "^3.2.0",
43
- "@wordpress/i18n": "^4.2.1",
44
- "@wordpress/icons": "^5.0.1",
45
- "@wordpress/interface": "^4.0.1",
46
- "@wordpress/keyboard-shortcuts": "^3.0.1",
47
- "@wordpress/keycodes": "^3.2.1",
48
- "@wordpress/media-utils": "^3.0.0",
49
- "@wordpress/notices": "^3.2.2",
50
- "@wordpress/plugins": "^4.0.1",
51
- "@wordpress/primitives": "^3.0.0",
52
- "@wordpress/url": "^3.2.1",
53
- "@wordpress/viewport": "^4.0.1",
54
- "@wordpress/warning": "^2.2.1",
30
+ "@wordpress/a11y": "^3.2.3",
31
+ "@wordpress/api-fetch": "^5.2.5",
32
+ "@wordpress/block-editor": "^8.0.0",
33
+ "@wordpress/block-library": "^6.0.3",
34
+ "@wordpress/blocks": "^11.1.3",
35
+ "@wordpress/components": "^19.0.1",
36
+ "@wordpress/compose": "^5.0.5",
37
+ "@wordpress/core-data": "^4.0.5",
38
+ "@wordpress/data": "^6.1.3",
39
+ "@wordpress/data-controls": "^2.2.6",
40
+ "@wordpress/editor": "^12.0.2",
41
+ "@wordpress/element": "^4.0.3",
42
+ "@wordpress/hooks": "^3.2.1",
43
+ "@wordpress/i18n": "^4.2.3",
44
+ "@wordpress/icons": "^6.1.0",
45
+ "@wordpress/interface": "^4.1.3",
46
+ "@wordpress/keyboard-shortcuts": "^3.0.5",
47
+ "@wordpress/keycodes": "^3.2.3",
48
+ "@wordpress/media-utils": "^3.0.4",
49
+ "@wordpress/notices": "^3.2.6",
50
+ "@wordpress/plugins": "^4.0.5",
51
+ "@wordpress/primitives": "^3.0.3",
52
+ "@wordpress/url": "^3.3.0",
53
+ "@wordpress/viewport": "^4.0.5",
54
+ "@wordpress/warning": "^2.2.2",
55
55
  "classnames": "^2.3.1",
56
56
  "lodash": "^4.17.21",
57
57
  "memize": "^1.1.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "8b67fbd424bc67f81c2d825877f0fae726d6363a"
64
+ "gitHead": "393c2b5533837fd637e998d23f0124c081a10df0"
65
65
  }
@@ -7,12 +7,17 @@ import { get } from 'lodash';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { useSelect } from '@wordpress/data';
10
- import { Button, Icon } from '@wordpress/components';
10
+ import {
11
+ Button,
12
+ Icon,
13
+ __unstableMotion as motion,
14
+ } from '@wordpress/components';
11
15
  import { __ } from '@wordpress/i18n';
12
16
  import { addQueryArgs } from '@wordpress/url';
13
17
  import { wordpress } from '@wordpress/icons';
14
18
  import { store as editorStore } from '@wordpress/editor';
15
19
  import { store as coreStore } from '@wordpress/core-data';
20
+ import { useReducedMotion } from '@wordpress/compose';
16
21
 
17
22
  /**
18
23
  * Internal dependencies
@@ -44,15 +49,26 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
44
49
  []
45
50
  );
46
51
 
52
+ const disableMotion = useReducedMotion();
53
+
47
54
  if ( ! isActive || ! postType ) {
48
55
  return null;
49
56
  }
50
57
 
51
58
  let buttonIcon = <Icon size="36px" icon={ wordpress } />;
52
59
 
60
+ const effect = {
61
+ expand: {
62
+ scale: 1.7,
63
+ borderRadius: 0,
64
+ transition: { type: 'tween', duration: '0.2' },
65
+ },
66
+ };
67
+
53
68
  if ( siteIconUrl ) {
54
69
  buttonIcon = (
55
- <img
70
+ <motion.img
71
+ variants={ ! disableMotion && effect }
56
72
  alt={ __( 'Site Icon' ) }
57
73
  className="edit-post-fullscreen-mode-close_site-icon"
58
74
  src={ siteIconUrl }
@@ -70,19 +86,25 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
70
86
  }
71
87
 
72
88
  return (
73
- <Button
74
- className="edit-post-fullscreen-mode-close has-icon"
75
- href={
76
- href ??
77
- addQueryArgs( 'edit.php', {
78
- post_type: postType.slug,
79
- } )
80
- }
81
- label={ get( postType, [ 'labels', 'view_items' ], __( 'Back' ) ) }
82
- showTooltip={ showTooltip }
83
- >
84
- { buttonIcon }
85
- </Button>
89
+ <motion.div whileHover="expand">
90
+ <Button
91
+ className="edit-post-fullscreen-mode-close has-icon"
92
+ href={
93
+ href ??
94
+ addQueryArgs( 'edit.php', {
95
+ post_type: postType.slug,
96
+ } )
97
+ }
98
+ label={ get(
99
+ postType,
100
+ [ 'labels', 'view_items' ],
101
+ __( 'Back' )
102
+ ) }
103
+ showTooltip={ showTooltip }
104
+ >
105
+ { buttonIcon }
106
+ </Button>
107
+ </motion.div>
86
108
  );
87
109
  }
88
110
 
@@ -11,7 +11,7 @@
11
11
  align-items: center;
12
12
  align-self: stretch;
13
13
  border: none;
14
- background: #23282e; // WP-admin gray.
14
+ background: $gray-900;
15
15
  color: $white;
16
16
  border-radius: 0;
17
17
  height: $header-height + $border-width;
@@ -38,7 +38,7 @@
38
38
  bottom: 9px;
39
39
  left: 9px;
40
40
  border-radius: $radius-block-ui + $border-width + $border-width;
41
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #23282e;
41
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-900;
42
42
  }
43
43
 
44
44
  // Hover color.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { ScrollView, View } from 'react-native';
4
+ import { Platform, ScrollView, View } from 'react-native';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -43,7 +43,13 @@ function HeaderToolbar( {
43
43
  } ) {
44
44
  const scrollViewRef = useRef( null );
45
45
  const scrollToStart = () => {
46
- scrollViewRef.current.scrollTo( { x: 0 } );
46
+ // scrollview doesn't seem to automatically adjust to RTL on Android so, scroll to end when Android
47
+ const isAndroid = Platform.OS === 'android';
48
+ if ( isAndroid && isRTL ) {
49
+ scrollViewRef.current.scrollToEnd();
50
+ } else {
51
+ scrollViewRef.current.scrollTo( { x: 0 } );
52
+ }
47
53
  };
48
54
  const renderHistoryButtons = () => {
49
55
  const buttons = [
@@ -2,9 +2,12 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
- import { DropdownMenu, MenuGroup } from '@wordpress/components';
6
- import { moreVertical } from '@wordpress/icons';
7
- import { ActionItem, PinnedItems } from '@wordpress/interface';
5
+ import { MenuGroup } from '@wordpress/components';
6
+ import {
7
+ ActionItem,
8
+ MoreMenuDropdown,
9
+ PinnedItems,
10
+ } from '@wordpress/interface';
8
11
  import { useViewportMatch } from '@wordpress/compose';
9
12
 
10
13
  /**
@@ -17,26 +20,18 @@ import WritingMenu from '../writing-menu';
17
20
 
18
21
  const POPOVER_PROPS = {
19
22
  className: 'edit-post-more-menu__content',
20
- position: 'bottom left',
21
- };
22
- const TOGGLE_PROPS = {
23
- tooltipPosition: 'bottom',
24
23
  };
25
24
 
26
25
  const MoreMenu = ( { showIconLabels } ) => {
27
26
  const isLargeViewport = useViewportMatch( 'large' );
28
27
 
29
28
  return (
30
- <DropdownMenu
29
+ <MoreMenuDropdown
31
30
  className="edit-post-more-menu"
32
- icon={ moreVertical }
33
- /* translators: button label text should, if possible, be under 16 characters. */
34
- label={ __( 'Options' ) }
35
31
  popoverProps={ POPOVER_PROPS }
36
32
  toggleProps={ {
37
33
  showTooltip: ! showIconLabels,
38
34
  ...( showIconLabels && { variant: 'tertiary' } ),
39
- ...TOGGLE_PROPS,
40
35
  } }
41
36
  >
42
37
  { ( { onClose } ) => (
@@ -61,7 +56,7 @@ const MoreMenu = ( { showIconLabels } ) => {
61
56
  </MenuGroup>
62
57
  </>
63
58
  ) }
64
- </DropdownMenu>
59
+ </MoreMenuDropdown>
65
60
  );
66
61
  };
67
62
 
@@ -28,7 +28,9 @@ function TemplateTitle() {
28
28
  return {
29
29
  template: _isEditing ? getEditedPostTemplate() : null,
30
30
  isEditing: _isEditing,
31
- title: getEditedPostAttribute( 'title' ),
31
+ title: getEditedPostAttribute( 'title' )
32
+ ? getEditedPostAttribute( 'title' )
33
+ : __( 'Untitled' ),
32
34
  };
33
35
  }, [] );
34
36
 
@@ -5,11 +5,7 @@ import { MenuGroup } from '@wordpress/components';
5
5
  import { __, _x } from '@wordpress/i18n';
6
6
  import { useViewportMatch } from '@wordpress/compose';
7
7
  import { displayShortcut } from '@wordpress/keycodes';
8
-
9
- /**
10
- * Internal dependencies
11
- */
12
- import FeatureToggle from '../feature-toggle';
8
+ import { MoreMenuFeatureToggle } from '@wordpress/interface';
13
9
 
14
10
  function WritingMenu() {
15
11
  const isLargeViewport = useViewportMatch( 'medium' );
@@ -19,7 +15,8 @@ function WritingMenu() {
19
15
 
20
16
  return (
21
17
  <MenuGroup label={ _x( 'View', 'noun' ) }>
22
- <FeatureToggle
18
+ <MoreMenuFeatureToggle
19
+ scope="core/edit-post"
23
20
  feature="fixedToolbar"
24
21
  label={ __( 'Top toolbar' ) }
25
22
  info={ __(
@@ -28,14 +25,16 @@ function WritingMenu() {
28
25
  messageActivated={ __( 'Top toolbar activated' ) }
29
26
  messageDeactivated={ __( 'Top toolbar deactivated' ) }
30
27
  />
31
- <FeatureToggle
28
+ <MoreMenuFeatureToggle
29
+ scope="core/edit-post"
32
30
  feature="focusMode"
33
31
  label={ __( 'Spotlight mode' ) }
34
32
  info={ __( 'Focus on one block at a time' ) }
35
33
  messageActivated={ __( 'Spotlight mode activated' ) }
36
34
  messageDeactivated={ __( 'Spotlight mode deactivated' ) }
37
35
  />
38
- <FeatureToggle
36
+ <MoreMenuFeatureToggle
37
+ scope="core/edit-post"
39
38
  feature="fullscreenMode"
40
39
  label={ __( 'Fullscreen mode' ) }
41
40
  info={ __( 'Work without distraction' ) }
@@ -10,19 +10,22 @@ import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
10
10
  import Shortcut from './shortcut';
11
11
 
12
12
  function DynamicShortcut( { name } ) {
13
- const { keyCombination, description, aliases } = useSelect( ( select ) => {
14
- const {
15
- getShortcutKeyCombination,
16
- getShortcutDescription,
17
- getShortcutAliases,
18
- } = select( keyboardShortcutsStore );
13
+ const { keyCombination, description, aliases } = useSelect(
14
+ ( select ) => {
15
+ const {
16
+ getShortcutKeyCombination,
17
+ getShortcutDescription,
18
+ getShortcutAliases,
19
+ } = select( keyboardShortcutsStore );
19
20
 
20
- return {
21
- keyCombination: getShortcutKeyCombination( name ),
22
- aliases: getShortcutAliases( name ),
23
- description: getShortcutDescription( name ),
24
- };
25
- } );
21
+ return {
22
+ keyCombination: getShortcutKeyCombination( name ),
23
+ aliases: getShortcutAliases( name ),
24
+ description: getShortcutDescription( name ),
25
+ };
26
+ },
27
+ [ name ]
28
+ );
26
29
 
27
30
  if ( ! keyCombination ) {
28
31
  return null;
@@ -91,9 +91,7 @@ const ShortcutCategorySection = ( {
91
91
  };
92
92
 
93
93
  export function KeyboardShortcutHelpModal( { isModalActive, toggleModal } ) {
94
- useShortcut( 'core/edit-post/keyboard-shortcuts', toggleModal, {
95
- bindGlobal: true,
96
- } );
94
+ useShortcut( 'core/edit-post/keyboard-shortcuts', toggleModal );
97
95
 
98
96
  if ( ! isModalActive ) {
99
97
  return null;
@@ -1,7 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`KeyboardShortcutHelpModal should match snapshot when the modal is active 1`] = `
4
- <WithInstanceId(Modal)
4
+ <Modal
5
5
  className="edit-post-keyboard-shortcut-help-modal"
6
6
  closeLabel="Close"
7
7
  onRequestClose={[Function]}
@@ -80,7 +80,7 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
80
80
  }
81
81
  title="Text formatting"
82
82
  />
83
- </WithInstanceId(Modal)>
83
+ </Modal>
84
84
  `;
85
85
 
86
86
  exports[`KeyboardShortcutHelpModal should match snapshot when the modal is not active 1`] = `""`;
@@ -131,44 +131,31 @@ function KeyboardShortcuts() {
131
131
  );
132
132
  },
133
133
  {
134
- bindGlobal: true,
135
134
  isDisabled: isModeToggleDisabled,
136
135
  }
137
136
  );
138
137
 
139
- useShortcut(
140
- 'core/edit-post/toggle-fullscreen',
141
- () => {
142
- toggleFeature( 'fullscreenMode' );
143
- },
144
- {
145
- bindGlobal: true,
138
+ useShortcut( 'core/edit-post/toggle-fullscreen', () => {
139
+ toggleFeature( 'fullscreenMode' );
140
+ } );
141
+
142
+ useShortcut( 'core/edit-post/toggle-sidebar', ( event ) => {
143
+ // This shortcut has no known clashes, but use preventDefault to prevent any
144
+ // obscure shortcuts from triggering.
145
+ event.preventDefault();
146
+
147
+ if ( isEditorSidebarOpened() ) {
148
+ closeGeneralSidebar();
149
+ } else {
150
+ const sidebarToOpen = getBlockSelectionStart()
151
+ ? 'edit-post/block'
152
+ : 'edit-post/document';
153
+ openGeneralSidebar( sidebarToOpen );
146
154
  }
147
- );
155
+ } );
148
156
 
149
- useShortcut(
150
- 'core/edit-post/toggle-sidebar',
151
- ( event ) => {
152
- // This shortcut has no known clashes, but use preventDefault to prevent any
153
- // obscure shortcuts from triggering.
154
- event.preventDefault();
155
-
156
- if ( isEditorSidebarOpened() ) {
157
- closeGeneralSidebar();
158
- } else {
159
- const sidebarToOpen = getBlockSelectionStart()
160
- ? 'edit-post/block'
161
- : 'edit-post/document';
162
- openGeneralSidebar( sidebarToOpen );
163
- }
164
- },
165
- { bindGlobal: true }
166
- );
167
-
168
- useShortcut(
169
- 'core/edit-post/toggle-list-view',
170
- () => setIsListViewOpened( ! isListViewOpened() ),
171
- { bindGlobal: true }
157
+ useShortcut( 'core/edit-post/toggle-list-view', () =>
158
+ setIsListViewOpened( ! isListViewOpened() )
172
159
  );
173
160
 
174
161
  return null;