@wordpress/edit-site 4.4.0 → 4.7.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 (134) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/add-new-template/new-template.js +24 -22
  3. package/build/components/add-new-template/new-template.js.map +1 -1
  4. package/build/components/block-editor/index.js +29 -23
  5. package/build/components/block-editor/index.js.map +1 -1
  6. package/build/components/code-editor/code-editor-text-area.js +11 -9
  7. package/build/components/code-editor/code-editor-text-area.js.map +1 -1
  8. package/build/components/global-styles/border-panel.js +2 -7
  9. package/build/components/global-styles/border-panel.js.map +1 -1
  10. package/build/components/global-styles/context-menu.js +3 -3
  11. package/build/components/global-styles/context-menu.js.map +1 -1
  12. package/build/components/global-styles/header.js +15 -11
  13. package/build/components/global-styles/header.js.map +1 -1
  14. package/build/components/global-styles/hooks.js +2 -2
  15. package/build/components/global-styles/hooks.js.map +1 -1
  16. package/build/components/global-styles/navigation-button.js +4 -4
  17. package/build/components/global-styles/navigation-button.js.map +1 -1
  18. package/build/components/global-styles/palette.js +1 -1
  19. package/build/components/global-styles/palette.js.map +1 -1
  20. package/build/components/global-styles/preview.js +13 -2
  21. package/build/components/global-styles/preview.js.map +1 -1
  22. package/build/components/global-styles/screen-block-list.js +1 -1
  23. package/build/components/global-styles/screen-block-list.js.map +1 -1
  24. package/build/components/global-styles/screen-colors.js +3 -3
  25. package/build/components/global-styles/screen-colors.js.map +1 -1
  26. package/build/components/global-styles/screen-root.js +13 -3
  27. package/build/components/global-styles/screen-root.js.map +1 -1
  28. package/build/components/global-styles/screen-typography.js +1 -1
  29. package/build/components/global-styles/screen-typography.js.map +1 -1
  30. package/build/components/global-styles/use-global-styles-output.js +1 -7
  31. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  32. package/build/components/list/table.js +1 -1
  33. package/build/components/list/table.js.map +1 -1
  34. package/build/components/navigation-sidebar/navigation-panel/constants.js +2 -2
  35. package/build/components/navigation-sidebar/navigation-panel/constants.js.map +1 -1
  36. package/build/components/preferences-modal/index.js +5 -1
  37. package/build/components/preferences-modal/index.js.map +1 -1
  38. package/build/components/routes/use-title.js +3 -1
  39. package/build/components/routes/use-title.js.map +1 -1
  40. package/build/components/secondary-sidebar/list-view-sidebar.js +1 -5
  41. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  42. package/build/components/sidebar/global-styles-sidebar.js +2 -4
  43. package/build/components/sidebar/global-styles-sidebar.js.map +1 -1
  44. package/build/components/sidebar/index.js +1 -1
  45. package/build/components/sidebar/index.js.map +1 -1
  46. package/build/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -5
  47. package/build/components/sidebar/navigation-menu-sidebar/navigation-menu.js.map +1 -1
  48. package/build/components/template-details/index.js +4 -2
  49. package/build/components/template-details/index.js.map +1 -1
  50. package/build/index.js +11 -3
  51. package/build/index.js.map +1 -1
  52. package/build-module/components/add-new-template/new-template.js +24 -23
  53. package/build-module/components/add-new-template/new-template.js.map +1 -1
  54. package/build-module/components/block-editor/index.js +29 -24
  55. package/build-module/components/block-editor/index.js.map +1 -1
  56. package/build-module/components/code-editor/code-editor-text-area.js +12 -10
  57. package/build-module/components/code-editor/code-editor-text-area.js.map +1 -1
  58. package/build-module/components/global-styles/border-panel.js +2 -7
  59. package/build-module/components/global-styles/border-panel.js.map +1 -1
  60. package/build-module/components/global-styles/context-menu.js +4 -4
  61. package/build-module/components/global-styles/context-menu.js.map +1 -1
  62. package/build-module/components/global-styles/header.js +16 -11
  63. package/build-module/components/global-styles/header.js.map +1 -1
  64. package/build-module/components/global-styles/hooks.js +2 -2
  65. package/build-module/components/global-styles/hooks.js.map +1 -1
  66. package/build-module/components/global-styles/navigation-button.js +3 -3
  67. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  68. package/build-module/components/global-styles/palette.js +2 -2
  69. package/build-module/components/global-styles/palette.js.map +1 -1
  70. package/build-module/components/global-styles/preview.js +14 -3
  71. package/build-module/components/global-styles/preview.js.map +1 -1
  72. package/build-module/components/global-styles/screen-block-list.js +2 -2
  73. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  74. package/build-module/components/global-styles/screen-colors.js +4 -4
  75. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  76. package/build-module/components/global-styles/screen-root.js +15 -5
  77. package/build-module/components/global-styles/screen-root.js.map +1 -1
  78. package/build-module/components/global-styles/screen-typography.js +2 -2
  79. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  80. package/build-module/components/global-styles/use-global-styles-output.js +1 -7
  81. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  82. package/build-module/components/list/table.js +1 -1
  83. package/build-module/components/list/table.js.map +1 -1
  84. package/build-module/components/navigation-sidebar/navigation-panel/constants.js +2 -2
  85. package/build-module/components/navigation-sidebar/navigation-panel/constants.js.map +1 -1
  86. package/build-module/components/preferences-modal/index.js +5 -1
  87. package/build-module/components/preferences-modal/index.js.map +1 -1
  88. package/build-module/components/routes/use-title.js +2 -1
  89. package/build-module/components/routes/use-title.js.map +1 -1
  90. package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -5
  91. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  92. package/build-module/components/sidebar/global-styles-sidebar.js +2 -4
  93. package/build-module/components/sidebar/global-styles-sidebar.js.map +1 -1
  94. package/build-module/components/sidebar/index.js +3 -3
  95. package/build-module/components/sidebar/index.js.map +1 -1
  96. package/build-module/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -5
  97. package/build-module/components/sidebar/navigation-menu-sidebar/navigation-menu.js.map +1 -1
  98. package/build-module/components/template-details/index.js +4 -2
  99. package/build-module/components/template-details/index.js.map +1 -1
  100. package/build-module/index.js +10 -3
  101. package/build-module/index.js.map +1 -1
  102. package/build-style/style-rtl.css +22 -71
  103. package/build-style/style.css +22 -71
  104. package/package.json +30 -30
  105. package/src/components/add-new-template/new-template.js +22 -17
  106. package/src/components/block-editor/index.js +59 -38
  107. package/src/components/code-editor/code-editor-text-area.js +12 -7
  108. package/src/components/global-styles/border-panel.js +2 -12
  109. package/src/components/global-styles/context-menu.js +7 -7
  110. package/src/components/global-styles/header.js +20 -17
  111. package/src/components/global-styles/hooks.js +1 -1
  112. package/src/components/global-styles/navigation-button.js +3 -3
  113. package/src/components/global-styles/palette.js +3 -3
  114. package/src/components/global-styles/preview.js +17 -2
  115. package/src/components/global-styles/screen-block-list.js +3 -3
  116. package/src/components/global-styles/screen-colors.js +7 -7
  117. package/src/components/global-styles/screen-root.js +34 -24
  118. package/src/components/global-styles/screen-typography.js +3 -3
  119. package/src/components/global-styles/use-global-styles-output.js +1 -4
  120. package/src/components/header/document-actions/style.scss +1 -1
  121. package/src/components/header/style.scss +14 -29
  122. package/src/components/list/style.scss +1 -0
  123. package/src/components/list/table.js +1 -4
  124. package/src/components/navigation-sidebar/navigation-panel/constants.js +2 -2
  125. package/src/components/preferences-modal/index.js +8 -1
  126. package/src/components/routes/use-title.js +3 -2
  127. package/src/components/secondary-sidebar/list-view-sidebar.js +1 -5
  128. package/src/components/sidebar/global-styles-sidebar.js +1 -1
  129. package/src/components/sidebar/index.js +4 -2
  130. package/src/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -7
  131. package/src/components/sidebar/navigation-menu-sidebar/style.scss +0 -1
  132. package/src/components/sidebar/style.scss +4 -47
  133. package/src/components/template-details/index.js +4 -1
  134. package/src/index.js +17 -1
@@ -3,8 +3,8 @@
3
3
  */
4
4
  import {
5
5
  __experimentalItemGroup as ItemGroup,
6
- __experimentalItem as Item,
7
6
  __experimentalHStack as HStack,
7
+ __experimentalSpacer as Spacer,
8
8
  __experimentalVStack as VStack,
9
9
  FlexItem,
10
10
  CardBody,
@@ -21,7 +21,7 @@ import { store as coreStore } from '@wordpress/core-data';
21
21
  * Internal dependencies
22
22
  */
23
23
  import { IconWithCurrentColor } from './icon-with-current-color';
24
- import { NavigationButton } from './navigation-button';
24
+ import { NavigationButtonAsItem } from './navigation-button';
25
25
  import ContextMenu from './context-menu';
26
26
  import StylesPreview from './preview';
27
27
 
@@ -37,48 +37,58 @@ function ScreenRoot() {
37
37
  return (
38
38
  <Card size="small">
39
39
  <CardBody>
40
- <VStack spacing={ 2 }>
40
+ <VStack spacing={ 4 }>
41
41
  <Card>
42
42
  <CardMedia>
43
43
  <StylesPreview />
44
44
  </CardMedia>
45
45
  </Card>
46
46
  { !! variations?.length && (
47
- <NavigationButton path="/variations">
48
- <HStack justify="space-between">
49
- <FlexItem>{ __( 'Browse styles' ) }</FlexItem>
50
- <IconWithCurrentColor
51
- icon={
52
- isRTL() ? chevronLeft : chevronRight
53
- }
54
- />
55
- </HStack>
56
- </NavigationButton>
47
+ <ItemGroup>
48
+ <NavigationButtonAsItem path="/variations">
49
+ <HStack justify="space-between">
50
+ <FlexItem>
51
+ { __( 'Browse styles' ) }
52
+ </FlexItem>
53
+ <IconWithCurrentColor
54
+ icon={
55
+ isRTL() ? chevronLeft : chevronRight
56
+ }
57
+ />
58
+ </HStack>
59
+ </NavigationButtonAsItem>
60
+ </ItemGroup>
57
61
  ) }
62
+ <ContextMenu />
58
63
  </VStack>
59
64
  </CardBody>
60
65
 
61
- <CardBody>
62
- <ContextMenu />
63
- </CardBody>
64
-
65
66
  <CardDivider />
66
67
 
67
68
  <CardBody>
69
+ <Spacer
70
+ as="p"
71
+ paddingTop={ 2 }
72
+ /*
73
+ * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).
74
+ * This is an ad hoc override for this particular instance only and should be reconsidered before making into a pattern.
75
+ */
76
+ paddingX="13px"
77
+ marginBottom={ 4 }
78
+ >
79
+ { __(
80
+ 'Customize the appearance of specific blocks for the whole site.'
81
+ ) }
82
+ </Spacer>
68
83
  <ItemGroup>
69
- <Item>
70
- { __(
71
- 'Customize the appearance of specific blocks for the whole site.'
72
- ) }
73
- </Item>
74
- <NavigationButton path="/blocks">
84
+ <NavigationButtonAsItem path="/blocks">
75
85
  <HStack justify="space-between">
76
86
  <FlexItem>{ __( 'Blocks' ) }</FlexItem>
77
87
  <IconWithCurrentColor
78
88
  icon={ isRTL() ? chevronLeft : chevronRight }
79
89
  />
80
90
  </HStack>
81
- </NavigationButton>
91
+ </NavigationButtonAsItem>
82
92
  </ItemGroup>
83
93
  </CardBody>
84
94
  </Card>
@@ -13,7 +13,7 @@ import {
13
13
  * Internal dependencies
14
14
  */
15
15
  import ScreenHeader from './header';
16
- import { NavigationButton } from './navigation-button';
16
+ import { NavigationButtonAsItem } from './navigation-button';
17
17
  import { useStyle } from './hooks';
18
18
  import Subtitle from './subtitle';
19
19
  import TypographyPanel from './typography-panel';
@@ -44,7 +44,7 @@ function Item( { name, parentMenu, element, label } ) {
44
44
  }
45
45
 
46
46
  return (
47
- <NavigationButton path={ parentMenu + '/typography/' + element }>
47
+ <NavigationButtonAsItem path={ parentMenu + '/typography/' + element }>
48
48
  <HStack justify="flex-start">
49
49
  <FlexItem
50
50
  className="edit-site-global-styles-screen-typography__indicator"
@@ -62,7 +62,7 @@ function Item( { name, parentMenu, element, label } ) {
62
62
  </FlexItem>
63
63
  <FlexItem>{ label }</FlexItem>
64
64
  </HStack>
65
- </NavigationButton>
65
+ </NavigationButtonAsItem>
66
66
  );
67
67
  }
68
68
 
@@ -220,11 +220,8 @@ function getStylesDeclarations( blockStyles = {} ) {
220
220
 
221
221
  // The goal is to move everything to server side generated engine styles
222
222
  // This is temporary as we absorb more and more styles into the engine.
223
- const extraRules = getCSSRules( blockStyles, { selector: 'self' } );
223
+ const extraRules = getCSSRules( blockStyles );
224
224
  extraRules.forEach( ( rule ) => {
225
- if ( rule.selector !== 'self' ) {
226
- throw "This style can't be added as inline style";
227
- }
228
225
  const cssProperty = rule.key.startsWith( '--' )
229
226
  ? rule.key
230
227
  : kebabCase( rule.key );
@@ -66,7 +66,7 @@
66
66
  }
67
67
  }
68
68
 
69
- .edit-site-document-actions__info-dropdown > .components-popover__content > div {
69
+ .edit-site-document-actions__info-dropdown > .components-popover__content {
70
70
  padding: 0;
71
71
  min-width: 240px;
72
72
  }
@@ -104,8 +104,9 @@ body.is-navigation-sidebar-open {
104
104
  margin: 0 -6px 0;
105
105
  }
106
106
 
107
+
107
108
  /**
108
- * Buttons in the Toolbar
109
+ * Buttons on the right side
109
110
  */
110
111
 
111
112
  .edit-site-header__actions {
@@ -113,36 +114,23 @@ body.is-navigation-sidebar-open {
113
114
  align-items: center;
114
115
  padding-right: $grid-unit-05;
115
116
 
116
- .interface-pinned-items {
117
- display: none;
118
-
119
- @include break-medium() {
120
- display: inline-flex;
121
- }
117
+ @include break-small () {
118
+ padding-right: $grid-unit-20 - ($grid-unit-15 * 0.5);
122
119
  }
123
120
 
124
- // Adjust button paddings to scale better to mobile.
125
- .editor-post-saved-state,
126
- .components-button.components-button {
127
- margin-right: $grid-unit-05;
128
-
129
- @include break-small() {
130
- margin-right: $grid-unit-15;
131
- }
132
- }
121
+ gap: $grid-unit-05;
133
122
 
134
- .editor-post-saved-state,
135
- .components-button.is-tertiary {
136
- padding: 0 #{$grid-unit-15 * 0.5};
123
+ @include break-small() {
124
+ gap: $grid-unit-10;
137
125
  }
138
126
 
139
- .edit-site-more-menu .components-button,
140
- .interface-pinned-items .components-button {
141
- margin-right: 0;
142
- }
127
+ // Pinned items.
128
+ .interface-pinned-items {
129
+ display: none;
143
130
 
144
- @include break-small() {
145
- padding-right: $grid-unit-20;
131
+ @include break-medium() {
132
+ display: inline-flex;
133
+ }
146
134
  }
147
135
  }
148
136
 
@@ -192,11 +180,8 @@ body.is-navigation-sidebar-open {
192
180
  .edit-site-save-button__button {
193
181
  padding-left: 6px;
194
182
  padding-right: 6px;
195
- margin-right: $grid-unit-05;
196
- }
197
- .block-editor-post-preview__button-toggle {
198
- margin-right: $grid-unit-05;
199
183
  }
184
+
200
185
  // The inserter and the template details toggle have custom labels, different from their aria-label, so we don't want to display both.
201
186
  .edit-site-header-toolbar__inserter-toggle.edit-site-header-toolbar__inserter-toggle,
202
187
  .edit-site-document-actions__get-info.edit-site-document-actions__get-info.edit-site-document-actions__get-info {
@@ -95,6 +95,7 @@
95
95
  // Added by.
96
96
  .edit-site-list-table-column:nth-child(2) {
97
97
  width: calc(40% - 18px);
98
+ word-break: break-word;
98
99
  }
99
100
 
100
101
  // Actions.
@@ -2,10 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useSelect } from '@wordpress/data';
5
- import {
6
- store as coreStore,
7
- __experimentalUseEntityRecords as useEntityRecords,
8
- } from '@wordpress/core-data';
5
+ import { store as coreStore, useEntityRecords } from '@wordpress/core-data';
9
6
  import { __, sprintf } from '@wordpress/i18n';
10
7
  import {
11
8
  VisuallyHidden,
@@ -31,7 +31,7 @@ export const TEMPLATES_SECONDARY = [
31
31
  'date',
32
32
  'tag',
33
33
  'attachment',
34
- 'single-post',
34
+ 'single',
35
35
  'front-page',
36
36
  ];
37
37
 
@@ -45,7 +45,7 @@ export const TEMPLATES_GENERAL = [ 'page-home' ];
45
45
  export const TEMPLATES_POSTS_PREFIXES = [
46
46
  'post-',
47
47
  'author-',
48
- 'single-post-',
48
+ 'single-',
49
49
  'tag-',
50
50
  ];
51
51
 
@@ -39,7 +39,14 @@ export default function EditSitePreferencesModal( {
39
39
  <EnableFeature
40
40
  featureName="showIconLabels"
41
41
  label={ __( 'Show button text labels' ) }
42
- help={ __( 'Show text instead of icons on buttons' ) }
42
+ help={ __( 'Show text instead of icons on buttons.' ) }
43
+ />
44
+ <EnableFeature
45
+ featureName="showListViewByDefault"
46
+ help={ __(
47
+ 'Opens the block list view sidebar by default.'
48
+ ) }
49
+ label={ __( 'Always open list view' ) }
43
50
  />
44
51
  </PreferencesModalSection>
45
52
  ),
@@ -6,6 +6,7 @@ import { useSelect } from '@wordpress/data';
6
6
  import { store as coreStore } from '@wordpress/core-data';
7
7
  import { __, sprintf } from '@wordpress/i18n';
8
8
  import { speak } from '@wordpress/a11y';
9
+ import { decodeEntities } from '@wordpress/html-entities';
9
10
 
10
11
  /**
11
12
  * Internal dependencies
@@ -36,8 +37,8 @@ export default function useTitle( title ) {
36
37
  const formattedTitle = sprintf(
37
38
  /* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
38
39
  __( '%1$s ‹ %2$s — WordPress' ),
39
- title,
40
- siteTitle
40
+ decodeEntities( title ),
41
+ decodeEntities( siteTitle )
41
42
  );
42
43
 
43
44
  document.title = formattedTitle;
@@ -59,11 +59,7 @@ export default function ListViewSidebar() {
59
59
  focusOnMountRef,
60
60
  ] ) }
61
61
  >
62
- <ListView
63
- showNestedBlocks
64
- __experimentalFeatures
65
- __experimentalPersistentListViewFeatures
66
- />
62
+ <ListView />
67
63
  </div>
68
64
  </div>
69
65
  );
@@ -37,11 +37,11 @@ export default function GlobalStylesSidebar() {
37
37
  <DropdownMenu
38
38
  icon={ moreVertical }
39
39
  label={ __( 'More Global Styles Actions' ) }
40
- toggleProps={ { disabled: ! canReset } }
41
40
  controls={ [
42
41
  {
43
42
  title: __( 'Reset to defaults' ),
44
43
  onClick: onReset,
44
+ isDisabled: ! canReset,
45
45
  },
46
46
  {
47
47
  title: __( 'Welcome Guide' ),
@@ -4,7 +4,7 @@
4
4
  import { createSlotFill, PanelBody } from '@wordpress/components';
5
5
  import { __ } from '@wordpress/i18n';
6
6
  import { cog } from '@wordpress/icons';
7
- import { useEffect } from '@wordpress/element';
7
+ import { useEffect, Fragment } from '@wordpress/element';
8
8
  import { useSelect, useDispatch } from '@wordpress/data';
9
9
  import { store as interfaceStore } from '@wordpress/interface';
10
10
  import { store as blockEditorStore } from '@wordpress/block-editor';
@@ -46,6 +46,7 @@ export function SidebarComplementaryAreaFills() {
46
46
  []
47
47
  );
48
48
  const { enableComplementaryArea } = useDispatch( interfaceStore );
49
+
49
50
  useEffect( () => {
50
51
  if ( ! isEditorSidebarOpened ) return;
51
52
  if ( hasBlockSelection ) {
@@ -54,6 +55,7 @@ export function SidebarComplementaryAreaFills() {
54
55
  enableComplementaryArea( STORE_NAME, SIDEBAR_TEMPLATE );
55
56
  }
56
57
  }, [ hasBlockSelection, isEditorSidebarOpened ] );
58
+
57
59
  let sidebarName = sidebar;
58
60
  if ( ! isEditorSidebarOpened ) {
59
61
  sidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_TEMPLATE;
@@ -62,7 +64,7 @@ export function SidebarComplementaryAreaFills() {
62
64
  // Conditionally include NavMenu sidebar in Plugin only.
63
65
  // Optimise for dead code elimination.
64
66
  // See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination.
65
- let MaybeNavigationMenuSidebar = 'Fragment';
67
+ let MaybeNavigationMenuSidebar = Fragment;
66
68
 
67
69
  if ( process.env.IS_GUTENBERG_PLUGIN ) {
68
70
  MaybeNavigationMenuSidebar = NavigationMenuSidebar;
@@ -50,13 +50,7 @@ export default function NavigationMenu( { innerBlocks, id } ) {
50
50
  }, [ updateBlockListSettings, innerBlocks ] );
51
51
  return (
52
52
  <>
53
- <ListView
54
- id={ id }
55
- showNestedBlocks
56
- expandNested={ false }
57
- __experimentalFeatures
58
- __experimentalPersistentListViewFeatures
59
- />
53
+ <ListView id={ id } />
60
54
  </>
61
55
  );
62
56
  }
@@ -14,7 +14,6 @@
14
14
  padding: $grid-unit-20;
15
15
 
16
16
  .block-editor-list-view-leaf .block-editor-list-view-block-contents {
17
- align-items: flex-start;
18
17
  white-space: normal;
19
18
  }
20
19
 
@@ -88,51 +88,8 @@
88
88
  line-height: 1;
89
89
  }
90
90
 
91
-
92
- .edit-site-global-styles-sidebar__border-box-control__popover,
93
- .edit-site-global-styles-sidebar__border-box-control__popover-top,
94
- .edit-site-global-styles-sidebar__border-box-control__popover-right,
95
- .edit-site-global-styles-sidebar__border-box-control__popover-bottom,
96
- .edit-site-global-styles-sidebar__border-box-control__popover-left {
97
- .components-popover__content {
98
- width: 282px;
99
- }
100
- }
101
-
102
- $split-border-control-offset: 55px;
103
-
104
- @include break-medium() {
105
- .edit-site-global-styles-sidebar__border-box-control__popover,
106
- .edit-site-global-styles-sidebar__border-box-control__popover-left {
107
- .components-popover__content {
108
- margin-right: #{ $grid-unit-50 + $grid-unit-15 } !important;
109
- }
110
- }
111
-
112
- .edit-site-global-styles-sidebar__border-box-control__popover-top,
113
- .edit-site-global-styles-sidebar__border-box-control__popover-bottom {
114
- .components-popover__content {
115
- margin-right: #{ $grid-unit-50 + $grid-unit-15 + $split-border-control-offset } !important;
116
- }
117
- }
118
-
119
- .edit-site-global-styles-sidebar__border-box-control__popover-right {
120
- .components-popover__content {
121
- margin-right: #{ $grid-unit-50 + $grid-unit-15 + ( $split-border-control-offset * 2 )} !important;
122
- }
123
- }
124
-
125
- .edit-site-global-styles-sidebar__border-box-control__popover,
126
- .edit-site-global-styles-sidebar__border-box-control__popover-top,
127
- .edit-site-global-styles-sidebar__border-box-control__popover-right,
128
- .edit-site-global-styles-sidebar__border-box-control__popover-bottom,
129
- .edit-site-global-styles-sidebar__border-box-control__popover-left {
130
- &.is-from-top .components-popover__content {
131
- margin-top: #{ -($grid-unit-50 + $grid-unit-15) } !important;
132
- }
133
-
134
- &.is-from-bottom .components-popover__content {
135
- margin-bottom: #{ -($grid-unit-50 + $grid-unit-15) } !important;
136
- }
137
- }
91
+ // Override the `hr` styles defined in the `ComplementaryArea` component
92
+ // from the `@wordpress/interface` package.
93
+ .edit-site-global-styles-sidebar hr {
94
+ margin: 0;
138
95
  }
@@ -50,6 +50,9 @@ export default function TemplateDetails( { template, onClose } ) {
50
50
  postId: undefined,
51
51
  } );
52
52
 
53
+ // Only user-created and non-default templates can change the name.
54
+ const canEditTitle = template.is_custom && ! template.has_theme_file;
55
+
53
56
  if ( ! template ) {
54
57
  return null;
55
58
  }
@@ -62,7 +65,7 @@ export default function TemplateDetails( { template, onClose } ) {
62
65
  return (
63
66
  <div className="edit-site-template-details">
64
67
  <div className="edit-site-template-details__group">
65
- { template.is_custom ? (
68
+ { canEditTitle ? (
66
69
  <EditTemplateTitle template={ template } />
67
70
  ) : (
68
71
  <Heading
package/src/index.js CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  __experimentalFetchUrlData as fetchUrlData,
14
14
  } from '@wordpress/core-data';
15
15
  import { store as editorStore } from '@wordpress/editor';
16
+ import { store as interfaceStore } from '@wordpress/interface';
16
17
  import { store as preferencesStore } from '@wordpress/preferences';
17
18
  import { __ } from '@wordpress/i18n';
18
19
  import { store as viewportStore } from '@wordpress/viewport';
@@ -64,8 +65,24 @@ export function reinitializeEditor( target, settings ) {
64
65
  keepCaretInsideBlock: false,
65
66
  welcomeGuide: true,
66
67
  welcomeGuideStyles: true,
68
+ shouldListViewOpenByDefault: false,
67
69
  } );
68
70
 
71
+ // Check if the block list view should be open by default.
72
+ if (
73
+ select( preferencesStore ).get(
74
+ 'core/edit-site',
75
+ 'showListViewByDefault'
76
+ )
77
+ ) {
78
+ dispatch( editSiteStore ).setIsListViewOpened( true );
79
+ }
80
+
81
+ dispatch( interfaceStore ).setDefaultComplementaryArea(
82
+ 'core/edit-site',
83
+ 'edit-site/template'
84
+ );
85
+
69
86
  dispatch( editSiteStore ).updateSettings( settings );
70
87
 
71
88
  // Keep the defaultTemplateTypes in the core/editor settings too,
@@ -103,7 +120,6 @@ export function initializeEditor( id, settings ) {
103
120
  settings.__experimentalFetchLinkSuggestions = ( search, searchOptions ) =>
104
121
  fetchLinkSuggestions( search, searchOptions, settings );
105
122
  settings.__experimentalFetchRichUrlData = fetchUrlData;
106
- settings.__experimentalSpotlightEntityBlocks = [ 'core/template-part' ];
107
123
 
108
124
  const target = document.getElementById( id );
109
125