@wordpress/block-library 9.0.0 → 9.1.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 (112) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/button/save.js +0 -3
  3. package/build/button/save.js.map +1 -1
  4. package/build/comment-date/edit.js +1 -1
  5. package/build/comment-date/edit.js.map +1 -1
  6. package/build/embed/variations.js +0 -10
  7. package/build/embed/variations.js.map +1 -1
  8. package/build/gallery/v1/gallery-image.js +16 -4
  9. package/build/gallery/v1/gallery-image.js.map +1 -1
  10. package/build/list-item/edit.native.js +1 -15
  11. package/build/list-item/edit.native.js.map +1 -1
  12. package/build/missing/edit.native.js +29 -4
  13. package/build/missing/edit.native.js.map +1 -1
  14. package/build/navigation/view.js +1 -1
  15. package/build/navigation/view.js.map +1 -1
  16. package/build/page-list/convert-to-links-modal.js +1 -0
  17. package/build/page-list/convert-to-links-modal.js.map +1 -1
  18. package/build/page-list/edit.js +1 -0
  19. package/build/page-list/edit.js.map +1 -1
  20. package/build/post-content/index.js +13 -1
  21. package/build/post-content/index.js.map +1 -1
  22. package/build/post-date/edit.js +1 -1
  23. package/build/post-date/edit.js.map +1 -1
  24. package/build/pullquote/index.js +13 -0
  25. package/build/pullquote/index.js.map +1 -1
  26. package/build/query/edit/inspector-controls/create-new-post-link.js +10 -10
  27. package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  28. package/build/query/edit/inspector-controls/index.js +2 -2
  29. package/build/query/edit/inspector-controls/index.js.map +1 -1
  30. package/build/quote/index.js +13 -0
  31. package/build/quote/index.js.map +1 -1
  32. package/build/template-part/edit/title-modal.js +1 -1
  33. package/build/template-part/edit/title-modal.js.map +1 -1
  34. package/build/verse/index.js +13 -0
  35. package/build/verse/index.js.map +1 -1
  36. package/build-module/button/save.js +0 -3
  37. package/build-module/button/save.js.map +1 -1
  38. package/build-module/comment-date/edit.js +2 -2
  39. package/build-module/comment-date/edit.js.map +1 -1
  40. package/build-module/embed/variations.js +0 -10
  41. package/build-module/embed/variations.js.map +1 -1
  42. package/build-module/gallery/v1/gallery-image.js +16 -4
  43. package/build-module/gallery/v1/gallery-image.js.map +1 -1
  44. package/build-module/list-item/edit.native.js +2 -16
  45. package/build-module/list-item/edit.native.js.map +1 -1
  46. package/build-module/missing/edit.native.js +30 -5
  47. package/build-module/missing/edit.native.js.map +1 -1
  48. package/build-module/navigation/view.js +1 -1
  49. package/build-module/navigation/view.js.map +1 -1
  50. package/build-module/page-list/convert-to-links-modal.js +1 -0
  51. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  52. package/build-module/page-list/edit.js +1 -0
  53. package/build-module/page-list/edit.js.map +1 -1
  54. package/build-module/post-content/index.js +13 -1
  55. package/build-module/post-content/index.js.map +1 -1
  56. package/build-module/post-date/edit.js +2 -2
  57. package/build-module/post-date/edit.js.map +1 -1
  58. package/build-module/pullquote/index.js +13 -0
  59. package/build-module/pullquote/index.js.map +1 -1
  60. package/build-module/query/edit/inspector-controls/create-new-post-link.js +10 -10
  61. package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  62. package/build-module/query/edit/inspector-controls/index.js +2 -2
  63. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  64. package/build-module/quote/index.js +13 -0
  65. package/build-module/quote/index.js.map +1 -1
  66. package/build-module/template-part/edit/title-modal.js +1 -1
  67. package/build-module/template-part/edit/title-modal.js.map +1 -1
  68. package/build-module/verse/index.js +13 -0
  69. package/build-module/verse/index.js.map +1 -1
  70. package/build-style/editor-rtl.css +2 -16
  71. package/build-style/editor.css +2 -16
  72. package/build-style/media-text/style-rtl.css +17 -17
  73. package/build-style/media-text/style.css +17 -17
  74. package/build-style/navigation/editor-rtl.css +0 -15
  75. package/build-style/navigation/editor.css +0 -15
  76. package/build-style/query/editor-rtl.css +2 -1
  77. package/build-style/query/editor.css +2 -1
  78. package/build-style/style-rtl.css +17 -17
  79. package/build-style/style.css +17 -17
  80. package/package.json +35 -35
  81. package/src/button/index.php +80 -0
  82. package/src/button/save.js +0 -4
  83. package/src/buttons/test/__snapshots__/edit.native.js.snap +30 -10
  84. package/src/buttons/test/edit.native.js +53 -12
  85. package/src/comment-date/edit.js +8 -2
  86. package/src/comment-date/index.php +7 -5
  87. package/src/embed/variations.js +0 -8
  88. package/src/gallery/v1/gallery-image.js +8 -0
  89. package/src/list-item/edit.native.js +2 -22
  90. package/src/media-text/style.scss +16 -15
  91. package/src/missing/edit.native.js +44 -12
  92. package/src/missing/test/__snapshots__/edit.native.js.snap +75 -59
  93. package/src/navigation/editor.scss +0 -16
  94. package/src/navigation/index.php +8 -8
  95. package/src/navigation/view.js +1 -1
  96. package/src/page-list/convert-to-links-modal.js +1 -0
  97. package/src/page-list/edit.js +1 -0
  98. package/src/post-content/block.json +13 -1
  99. package/src/post-date/edit.js +8 -2
  100. package/src/post-date/index.php +14 -3
  101. package/src/pullquote/block.json +13 -0
  102. package/src/query/edit/inspector-controls/create-new-post-link.js +12 -8
  103. package/src/query/edit/inspector-controls/index.js +5 -3
  104. package/src/query/editor.scss +2 -1
  105. package/src/query-pagination-next/index.php +1 -1
  106. package/src/query-pagination-previous/index.php +1 -1
  107. package/src/quote/block.json +13 -0
  108. package/src/search/index.php +2 -2
  109. package/src/site-logo/index.php +6 -0
  110. package/src/social-links/test/edit.native.js +41 -5
  111. package/src/template-part/edit/title-modal.js +1 -1
  112. package/src/verse/block.json +13 -0
@@ -495,7 +495,7 @@ class WP_Navigation_Block_Renderer {
495
495
  $close_button_directives = '';
496
496
  if ( $is_interactive ) {
497
497
  $open_button_directives = '
498
- data-wp-on--click="actions.openMenuOnClick"
498
+ data-wp-on-async--click="actions.openMenuOnClick"
499
499
  data-wp-on--keydown="actions.handleMenuKeydown"
500
500
  ';
501
501
  $responsive_container_directives = '
@@ -503,7 +503,7 @@ class WP_Navigation_Block_Renderer {
503
503
  data-wp-class--is-menu-open="state.isMenuOpen"
504
504
  data-wp-watch="callbacks.initMenu"
505
505
  data-wp-on--keydown="actions.handleMenuKeydown"
506
- data-wp-on--focusout="actions.handleMenuFocusout"
506
+ data-wp-on-async--focusout="actions.handleMenuFocusout"
507
507
  tabindex="-1"
508
508
  ';
509
509
  $responsive_dialog_directives = '
@@ -512,7 +512,7 @@ class WP_Navigation_Block_Renderer {
512
512
  data-wp-bind--role="state.roleAttribute"
513
513
  ';
514
514
  $close_button_directives = '
515
- data-wp-on--click="actions.closeMenuOnClick"
515
+ data-wp-on-async--click="actions.closeMenuOnClick"
516
516
  ';
517
517
  $responsive_container_content_directives = '
518
518
  data-wp-watch="callbacks.focusFirstElement"
@@ -826,7 +826,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
826
826
  $tags->set_attribute( 'data-wp-interactive', 'core/navigation' );
827
827
  $tags->set_attribute( 'data-wp-context', '{ "submenuOpenedBy": { "click": false, "hover": false, "focus": false }, "type": "submenu" }' );
828
828
  $tags->set_attribute( 'data-wp-watch', 'callbacks.initMenu' );
829
- $tags->set_attribute( 'data-wp-on--focusout', 'actions.handleMenuFocusout' );
829
+ $tags->set_attribute( 'data-wp-on-async--focusout', 'actions.handleMenuFocusout' );
830
830
  $tags->set_attribute( 'data-wp-on--keydown', 'actions.handleMenuKeydown' );
831
831
 
832
832
  // This is a fix for Safari. Without it, Safari doesn't change the active
@@ -836,8 +836,8 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
836
836
  $tags->set_attribute( 'tabindex', '-1' );
837
837
 
838
838
  if ( ! isset( $block_attributes['openSubmenusOnClick'] ) || false === $block_attributes['openSubmenusOnClick'] ) {
839
- $tags->set_attribute( 'data-wp-on--mouseenter', 'actions.openMenuOnHover' );
840
- $tags->set_attribute( 'data-wp-on--mouseleave', 'actions.closeMenuOnHover' );
839
+ $tags->set_attribute( 'data-wp-on-async--mouseenter', 'actions.openMenuOnHover' );
840
+ $tags->set_attribute( 'data-wp-on-async--mouseleave', 'actions.closeMenuOnHover' );
841
841
  }
842
842
 
843
843
  // Add directives to the toggle submenu button.
@@ -847,7 +847,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
847
847
  'class_name' => 'wp-block-navigation-submenu__toggle',
848
848
  )
849
849
  ) ) {
850
- $tags->set_attribute( 'data-wp-on--click', 'actions.toggleMenuOnClick' );
850
+ $tags->set_attribute( 'data-wp-on-async--click', 'actions.toggleMenuOnClick' );
851
851
  $tags->set_attribute( 'data-wp-bind--aria-expanded', 'state.isMenuOpen' );
852
852
  // The `aria-expanded` attribute for SSR is already added in the submenu block.
853
853
  }
@@ -858,7 +858,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
858
858
  'class_name' => 'wp-block-navigation__submenu-container',
859
859
  )
860
860
  ) ) {
861
- $tags->set_attribute( 'data-wp-on--focus', 'actions.openMenuOnFocus' );
861
+ $tags->set_attribute( 'data-wp-on-async--focus', 'actions.openMenuOnFocus' );
862
862
  }
863
863
 
864
864
  // Iterate through subitems if exist.
@@ -143,7 +143,7 @@ const { state, actions } = store(
143
143
  // If focus is outside modal, and in the document, close menu
144
144
  // event.target === The element losing focus
145
145
  // event.relatedTarget === The element receiving focus (if any)
146
- // When focusout is outsite the document,
146
+ // When focusout is outside the document,
147
147
  // `window.document.activeElement` doesn't change.
148
148
 
149
149
  // The event.relatedTarget is null when something outside the navigation menu is clicked. This is only necessary for Safari.
@@ -36,6 +36,7 @@ export function ConvertToLinksModal( { onClick, onClose, disabled } ) {
36
36
  </Button>
37
37
  <Button
38
38
  variant="primary"
39
+ __experimentalIsFocusable
39
40
  disabled={ disabled }
40
41
  onClick={ onClick }
41
42
  >
@@ -338,6 +338,7 @@ export default function PageListEdit( {
338
338
  <p>{ convertDescription }</p>
339
339
  <Button
340
340
  variant="primary"
341
+ __experimentalIsFocusable
341
342
  disabled={ ! hasResolvedPages }
342
343
  onClick={ convertToNavigationLinks }
343
344
  >
@@ -11,11 +11,23 @@
11
11
  "align": [ "wide", "full" ],
12
12
  "html": false,
13
13
  "layout": true,
14
+ "background": {
15
+ "backgroundImage": true,
16
+ "backgroundSize": true,
17
+ "__experimentalDefaultControls": {
18
+ "backgroundImage": true
19
+ }
20
+ },
14
21
  "dimensions": {
15
22
  "minHeight": true
16
23
  },
17
24
  "spacing": {
18
- "blockGap": true
25
+ "blockGap": true,
26
+ "padding": true,
27
+ "__experimentalDefaultControls": {
28
+ "margin": false,
29
+ "padding": false
30
+ }
19
31
  },
20
32
  "color": {
21
33
  "gradients": true,
@@ -8,7 +8,11 @@ import clsx from 'clsx';
8
8
  */
9
9
  import { useEntityProp, store as coreStore } from '@wordpress/core-data';
10
10
  import { useMemo, useState } from '@wordpress/element';
11
- import { dateI18n, getSettings as getDateSettings } from '@wordpress/date';
11
+ import {
12
+ dateI18n,
13
+ humanTimeDiff,
14
+ getSettings as getDateSettings,
15
+ } from '@wordpress/date';
12
16
  import {
13
17
  AlignmentControl,
14
18
  BlockControls,
@@ -82,7 +86,9 @@ export default function PostDateEdit( {
82
86
 
83
87
  let postDate = date ? (
84
88
  <time dateTime={ dateI18n( 'c', date ) } ref={ setPopoverAnchor }>
85
- { dateI18n( format || siteFormat, date ) }
89
+ { format === 'human-diff'
90
+ ? humanTimeDiff( date )
91
+ : dateI18n( format || siteFormat, date ) }
86
92
  </time>
87
93
  ) : (
88
94
  dateLabel
@@ -20,8 +20,14 @@ function render_block_core_post_date( $attributes, $content, $block ) {
20
20
  return '';
21
21
  }
22
22
 
23
- $post_ID = $block->context['postId'];
24
- $formatted_date = get_the_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
23
+ $post_ID = $block->context['postId'];
24
+
25
+ if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) {
26
+ // translators: %s: human-readable time difference.
27
+ $formatted_date = sprintf( __( '%s ago', 'gutenberg' ), human_time_diff( get_post_timestamp( $post_ID ) ) );
28
+ } else {
29
+ $formatted_date = get_the_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
30
+ }
25
31
  $unformatted_date = esc_attr( get_the_date( 'c', $post_ID ) );
26
32
  $classes = array();
27
33
 
@@ -38,7 +44,12 @@ function render_block_core_post_date( $attributes, $content, $block ) {
38
44
  */
39
45
  if ( isset( $attributes['displayType'] ) && 'modified' === $attributes['displayType'] ) {
40
46
  if ( get_the_modified_date( 'Ymdhi', $post_ID ) > get_the_date( 'Ymdhi', $post_ID ) ) {
41
- $formatted_date = get_the_modified_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
47
+ if ( 'human-diff' === $attributes['format'] ) {
48
+ // translators: %s: human-readable time difference.
49
+ $formatted_date = sprintf( __( '%s ago', 'gutenberg' ), human_time_diff( get_post_timestamp( $post_ID, 'modified' ) ) );
50
+ } else {
51
+ $formatted_date = get_the_modified_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
52
+ }
42
53
  $unformatted_date = esc_attr( get_the_modified_date( 'c', $post_ID ) );
43
54
  $classes[] = 'wp-block-post-date__modified-date';
44
55
  } else {
@@ -26,6 +26,13 @@
26
26
  "supports": {
27
27
  "anchor": true,
28
28
  "align": [ "left", "right", "wide", "full" ],
29
+ "background": {
30
+ "backgroundImage": true,
31
+ "backgroundSize": true,
32
+ "__experimentalDefaultControls": {
33
+ "backgroundImage": true
34
+ }
35
+ },
29
36
  "color": {
30
37
  "gradients": true,
31
38
  "background": true,
@@ -35,6 +42,12 @@
35
42
  "text": true
36
43
  }
37
44
  },
45
+ "dimensions": {
46
+ "minHeight": true,
47
+ "__experimentalDefaultControls": {
48
+ "minHeight": false
49
+ }
50
+ },
38
51
  "spacing": {
39
52
  "margin": true,
40
53
  "padding": true
@@ -1,23 +1,27 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { __ } from '@wordpress/i18n';
5
4
  import { createInterpolateElement } from '@wordpress/element';
6
5
  import { addQueryArgs } from '@wordpress/url';
6
+ import { store as coreStore } from '@wordpress/core-data';
7
+ import { useSelect } from '@wordpress/data';
7
8
 
8
- const CreateNewPostLink = ( {
9
- attributes: { query: { postType } = {} } = {},
10
- } ) => {
11
- if ( ! postType ) {
12
- return null;
13
- }
9
+ const CreateNewPostLink = ( { postType } ) => {
14
10
  const newPostUrl = addQueryArgs( 'post-new.php', {
15
11
  post_type: postType,
16
12
  } );
13
+
14
+ const addNewItemLabel = useSelect(
15
+ ( select ) => {
16
+ const { getPostType } = select( coreStore );
17
+ return getPostType( postType )?.labels?.add_new_item;
18
+ },
19
+ [ postType ]
20
+ );
17
21
  return (
18
22
  <div className="wp-block-query__create-new-link">
19
23
  { createInterpolateElement(
20
- __( '<a>Add new post</a>' ),
24
+ '<a>' + addNewItemLabel + '</a>',
21
25
  // eslint-disable-next-line jsx-a11y/anchor-has-content
22
26
  { a: <a href={ newPostUrl } /> }
23
27
  ) }
@@ -131,9 +131,11 @@ export default function QueryInspectorControls( props ) {
131
131
 
132
132
  return (
133
133
  <>
134
- <BlockInfo>
135
- <CreateNewPostLink { ...props } />
136
- </BlockInfo>
134
+ { !! postType && (
135
+ <BlockInfo>
136
+ <CreateNewPostLink postType={ postType } />
137
+ </BlockInfo>
138
+ ) }
137
139
  { showSettingsPanel && (
138
140
  <PanelBody title={ __( 'Settings' ) }>
139
141
  { showInheritControl && (
@@ -39,7 +39,8 @@
39
39
  position: sticky;
40
40
  top: 0;
41
41
  padding: $grid-unit-20 0;
42
- margin-bottom: 2px;
42
+ transform: translateY(- $grid-unit-05); // Offsets the top padding on the modal content container
43
+ margin-bottom: - $grid-unit-05;
43
44
  z-index: z-index(".block-library-query-pattern__selection-search");
44
45
  }
45
46
  }
@@ -77,7 +77,7 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
77
77
  ) ) {
78
78
  $p->set_attribute( 'data-wp-key', 'query-pagination-next' );
79
79
  $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
80
- $p->set_attribute( 'data-wp-on--mouseenter', 'core/query::actions.prefetch' );
80
+ $p->set_attribute( 'data-wp-on-async--mouseenter', 'core/query::actions.prefetch' );
81
81
  $p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' );
82
82
  $content = $p->get_updated_html();
83
83
  }
@@ -63,7 +63,7 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
63
63
  ) ) {
64
64
  $p->set_attribute( 'data-wp-key', 'query-pagination-previous' );
65
65
  $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
66
- $p->set_attribute( 'data-wp-on--mouseenter', 'core/query::actions.prefetch' );
66
+ $p->set_attribute( 'data-wp-on-async--mouseenter', 'core/query::actions.prefetch' );
67
67
  $p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' );
68
68
  $content = $p->get_updated_html();
69
69
  }
@@ -29,6 +29,19 @@
29
29
  "supports": {
30
30
  "anchor": true,
31
31
  "html": false,
32
+ "background": {
33
+ "backgroundImage": true,
34
+ "backgroundSize": true,
35
+ "__experimentalDefaultControls": {
36
+ "backgroundImage": true
37
+ }
38
+ },
39
+ "dimensions": {
40
+ "minHeight": true,
41
+ "__experimentalDefaultControls": {
42
+ "minHeight": false
43
+ }
44
+ },
32
45
  "__experimentalOnEnter": true,
33
46
  "__experimentalOnMerge": true,
34
47
  "typography": {
@@ -191,8 +191,8 @@ function render_block_core_search( $attributes ) {
191
191
  data-wp-interactive="core/search"'
192
192
  . $form_context .
193
193
  'data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
194
- data-wp-on--keydown="actions.handleSearchKeydown"
195
- data-wp-on--focusout="actions.handleSearchFocusout"
194
+ data-wp-on-async--keydown="actions.handleSearchKeydown"
195
+ data-wp-on-async--focusout="actions.handleSearchFocusout"
196
196
  ';
197
197
  }
198
198
 
@@ -159,6 +159,8 @@ add_filter( 'pre_set_theme_mod_custom_logo', '_sync_custom_logo_to_site_logo' );
159
159
  *
160
160
  * @since 5.8.0
161
161
  *
162
+ * @global array $_ignore_site_logo_changes
163
+ *
162
164
  * @param array $old_value Previous theme mod settings.
163
165
  * @param array $value Updated theme mod settings.
164
166
  */
@@ -179,6 +181,8 @@ function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
179
181
  * Deletes the site logo when all theme mods are being removed.
180
182
  *
181
183
  * @since 5.8.0
184
+ *
185
+ * @global array $_ignore_site_logo_changes
182
186
  */
183
187
  function _delete_site_logo_on_remove_theme_mods() {
184
188
  global $_ignore_site_logo_changes;
@@ -211,6 +215,8 @@ add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_the
211
215
  * Removes the custom_logo theme-mod when the site_logo option gets deleted.
212
216
  *
213
217
  * @since 5.9.0
218
+ *
219
+ * @global array $_ignore_site_logo_changes
214
220
  */
215
221
  function _delete_custom_logo_on_remove_site_logo() {
216
222
  global $_ignore_site_logo_changes;
@@ -9,6 +9,8 @@ import {
9
9
  initializeEditor,
10
10
  within,
11
11
  getBlock,
12
+ screen,
13
+ triggerBlockListLayout,
12
14
  waitFor,
13
15
  waitForModalVisible,
14
16
  } from 'test/helpers';
@@ -33,7 +35,7 @@ afterAll( () => {
33
35
 
34
36
  describe( 'Social links block', () => {
35
37
  it( 'inserts block with the default icons and the WordPress link set as active', async () => {
36
- const screen = await initializeEditor();
38
+ await initializeEditor();
37
39
 
38
40
  // Add block
39
41
  await addBlock( screen, 'Social Icons' );
@@ -65,7 +67,7 @@ describe( 'Social links block', () => {
65
67
  } );
66
68
 
67
69
  it( 'shows active links correctly when not selected', async () => {
68
- const screen = await initializeEditor();
70
+ await initializeEditor();
69
71
 
70
72
  // Add Social Icons block
71
73
  await addBlock( screen, 'Social Icons' );
@@ -105,7 +107,7 @@ describe( 'Social links block', () => {
105
107
  } );
106
108
 
107
109
  it( 'shows the social links bottom sheet when tapping on the inline appender', async () => {
108
- const screen = await initializeEditor();
110
+ await initializeEditor();
109
111
 
110
112
  // Add block
111
113
  await addBlock( screen, 'Social Icons' );
@@ -154,8 +156,42 @@ describe( 'Social links block', () => {
154
156
  expect( getEditorHtml() ).toMatchSnapshot();
155
157
  } );
156
158
 
159
+ it( 'shows only the social link blocks when tapping on the inline appender', async () => {
160
+ await initializeEditor();
161
+
162
+ // Add block
163
+ await addBlock( screen, 'Social Icons' );
164
+
165
+ // Get block
166
+ const socialLinksBlock = await getBlock( screen, 'Social Icons' );
167
+ fireEvent.press( socialLinksBlock );
168
+ await triggerBlockListLayout( socialLinksBlock );
169
+
170
+ // Open the links bottom sheet
171
+ const appenderButton =
172
+ within( socialLinksBlock ).getByTestId( 'appender-button' );
173
+ fireEvent.press( appenderButton );
174
+
175
+ // Find a social link in the inserter
176
+ const inserterList = screen.getByTestId( 'InserterUI-Blocks' );
177
+
178
+ // onScroll event used to force the FlatList to render all items
179
+ fireEvent.scroll( inserterList, {
180
+ nativeEvent: {
181
+ contentOffset: { y: 0, x: 0 },
182
+ contentSize: { width: 100, height: 100 },
183
+ layoutMeasurement: { width: 100, height: 100 },
184
+ },
185
+ } );
186
+
187
+ // Check the Paragraph core block is not in the list
188
+ expect(
189
+ within( inserterList ).queryByLabelText( 'Paragraph block' )
190
+ ).toBeNull();
191
+ } );
192
+
157
193
  it( 'shows the ghost placeholder when no icon is active', async () => {
158
- const screen = await initializeEditor();
194
+ await initializeEditor();
159
195
  const { getByLabelText } = screen;
160
196
 
161
197
  // Add block
@@ -201,7 +237,7 @@ describe( 'Social links block', () => {
201
237
  } );
202
238
 
203
239
  it( "should set a icon's URL", async () => {
204
- const screen = await initializeEditor();
240
+ await initializeEditor();
205
241
  await addBlock( screen, 'Social Icons' );
206
242
  fireEvent.press( screen.getByLabelText( 'Facebook social icon' ) );
207
243
  fireEvent.press( screen.getByLabelText( 'Add link to Facebook' ) );
@@ -43,8 +43,8 @@ export default function TitleModal( { areaLabel, onClose, onSubmit } ) {
43
43
  <Button
44
44
  variant="primary"
45
45
  type="submit"
46
+ __experimentalIsFocusable
46
47
  disabled={ ! title.length }
47
- aria-disabled={ ! title.length }
48
48
  >
49
49
  { __( 'Create' ) }
50
50
  </Button>
@@ -21,6 +21,13 @@
21
21
  },
22
22
  "supports": {
23
23
  "anchor": true,
24
+ "background": {
25
+ "backgroundImage": true,
26
+ "backgroundSize": true,
27
+ "__experimentalDefaultControls": {
28
+ "backgroundImage": true
29
+ }
30
+ },
24
31
  "color": {
25
32
  "gradients": true,
26
33
  "link": true,
@@ -29,6 +36,12 @@
29
36
  "text": true
30
37
  }
31
38
  },
39
+ "dimensions": {
40
+ "minHeight": true,
41
+ "__experimentalDefaultControls": {
42
+ "minHeight": false
43
+ }
44
+ },
32
45
  "typography": {
33
46
  "fontSize": true,
34
47
  "__experimentalFontFamily": true,