@wordpress/block-editor 12.4.0 → 12.5.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 (316) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +5 -0
  3. package/build/components/block-heading-level-dropdown/heading-level-icon.js +10 -2
  4. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  5. package/build/components/block-heading-level-dropdown/index.native.js +4 -3
  6. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  7. package/build/components/block-lock/toolbar.js +25 -6
  8. package/build/components/block-lock/toolbar.js.map +1 -1
  9. package/build/components/block-mobile-toolbar/block-actions-menu.native.js +3 -6
  10. package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  11. package/build/components/block-parent-selector/index.js +8 -5
  12. package/build/components/block-parent-selector/index.js.map +1 -1
  13. package/build/components/block-removal-warning-modal/index.js +18 -25
  14. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  15. package/build/components/block-toolbar/index.js +8 -5
  16. package/build/components/block-toolbar/index.js.map +1 -1
  17. package/build/components/block-tools/block-contextual-toolbar.js +7 -11
  18. package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
  19. package/build/components/dimensions-tool/aspect-ratio-tool.js +99 -0
  20. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -0
  21. package/build/components/dimensions-tool/index.js +207 -0
  22. package/build/components/dimensions-tool/index.js.map +1 -0
  23. package/build/components/dimensions-tool/scale-tool.js +111 -0
  24. package/build/components/dimensions-tool/scale-tool.js.map +1 -0
  25. package/build/components/dimensions-tool/width-height-tool.js +125 -0
  26. package/build/components/dimensions-tool/width-height-tool.js.map +1 -0
  27. package/build/components/global-styles/color-panel.js +1 -1
  28. package/build/components/global-styles/color-panel.js.map +1 -1
  29. package/build/components/global-styles/filters-panel.js +1 -1
  30. package/build/components/global-styles/filters-panel.js.map +1 -1
  31. package/build/components/global-styles/hooks.js +2 -2
  32. package/build/components/global-styles/hooks.js.map +1 -1
  33. package/build/components/global-styles/typography-panel.js +34 -2
  34. package/build/components/global-styles/typography-panel.js.map +1 -1
  35. package/build/components/image-editor/aspect-ratio-dropdown.js +1 -1
  36. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  37. package/build/components/image-editor/use-save-image.js +1 -2
  38. package/build/components/image-editor/use-save-image.js.map +1 -1
  39. package/build/components/image-size-control/index.js +6 -0
  40. package/build/components/image-size-control/index.js.map +1 -1
  41. package/build/components/index.js +19 -1
  42. package/build/components/index.js.map +1 -1
  43. package/build/components/inserter/block-patterns-explorer/patterns-list.js +2 -2
  44. package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  45. package/build/components/inserter/block-patterns-tab.js +7 -35
  46. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  47. package/build/components/inserter/hooks/use-block-types-state.js +3 -4
  48. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  49. package/build/components/inserter/hooks/use-patterns-state.js +9 -3
  50. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  51. package/build/components/inserter/media-tab/hooks.js +2 -21
  52. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  53. package/build/components/inserter/reusable-block-rename-hint.js +62 -0
  54. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -0
  55. package/build/components/inserter/reusable-blocks-tab.js +6 -2
  56. package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
  57. package/build/components/inserter/reusable-blocks-tab.native.js +2 -2
  58. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  59. package/build/components/inserter/tabs.native.js +1 -1
  60. package/build/components/inserter/tabs.native.js.map +1 -1
  61. package/build/components/inserter-draggable-blocks/index.js +9 -1
  62. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  63. package/build/components/link-control/constants.js +1 -1
  64. package/build/components/link-control/constants.js.map +1 -1
  65. package/build/components/link-control/index.js +17 -15
  66. package/build/components/link-control/index.js.map +1 -1
  67. package/build/components/link-control/search-create-button.js +5 -21
  68. package/build/components/link-control/search-create-button.js.map +1 -1
  69. package/build/components/link-control/search-input.js +4 -4
  70. package/build/components/link-control/search-input.js.map +1 -1
  71. package/build/components/link-control/search-item.js +13 -30
  72. package/build/components/link-control/search-item.js.map +1 -1
  73. package/build/components/link-control/search-results.js +2 -2
  74. package/build/components/link-control/search-results.js.map +1 -1
  75. package/build/components/link-control/settings-drawer.js +2 -3
  76. package/build/components/link-control/settings-drawer.js.map +1 -1
  77. package/build/components/list-view/appender.js +2 -6
  78. package/build/components/list-view/appender.js.map +1 -1
  79. package/build/components/provider/index.js +5 -2
  80. package/build/components/provider/index.js.map +1 -1
  81. package/build/components/provider/use-block-sync.js +21 -0
  82. package/build/components/provider/use-block-sync.js.map +1 -1
  83. package/build/components/resolution-tool/index.js +55 -0
  84. package/build/components/resolution-tool/index.js.map +1 -0
  85. package/build/components/url-input/index.js +4 -2
  86. package/build/components/url-input/index.js.map +1 -1
  87. package/build/components/writing-flow/use-tab-nav.js +10 -27
  88. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  89. package/build/components/writing-mode-control/index.js +70 -0
  90. package/build/components/writing-mode-control/index.js.map +1 -0
  91. package/build/hooks/behaviors.js +25 -20
  92. package/build/hooks/behaviors.js.map +1 -1
  93. package/build/hooks/supports.js +7 -1
  94. package/build/hooks/supports.js.map +1 -1
  95. package/build/hooks/typography.js +2 -1
  96. package/build/hooks/typography.js.map +1 -1
  97. package/build/hooks/utils.js +4 -2
  98. package/build/hooks/utils.js.map +1 -1
  99. package/build/private-apis.js +10 -1
  100. package/build/private-apis.js.map +1 -1
  101. package/build/private-apis.native.js +3 -0
  102. package/build/private-apis.native.js.map +1 -1
  103. package/build/store/actions.js +195 -1
  104. package/build/store/actions.js.map +1 -1
  105. package/build/store/defaults.js +1 -0
  106. package/build/store/defaults.js.map +1 -1
  107. package/build/store/index.js +10 -1
  108. package/build/store/index.js.map +1 -1
  109. package/build/store/private-actions.js +46 -40
  110. package/build/store/private-actions.js.map +1 -1
  111. package/build/store/private-selectors.js +3 -3
  112. package/build/store/private-selectors.js.map +1 -1
  113. package/build/store/reducer.js +22 -8
  114. package/build/store/reducer.js.map +1 -1
  115. package/build/store/selectors.js +33 -15
  116. package/build/store/selectors.js.map +1 -1
  117. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +9 -2
  118. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  119. package/build-module/components/block-heading-level-dropdown/index.native.js +4 -3
  120. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  121. package/build-module/components/block-lock/toolbar.js +25 -7
  122. package/build-module/components/block-lock/toolbar.js.map +1 -1
  123. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +4 -6
  124. package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
  125. package/build-module/components/block-parent-selector/index.js +7 -5
  126. package/build-module/components/block-parent-selector/index.js.map +1 -1
  127. package/build-module/components/block-removal-warning-modal/index.js +20 -24
  128. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  129. package/build-module/components/block-toolbar/index.js +8 -5
  130. package/build-module/components/block-toolbar/index.js.map +1 -1
  131. package/build-module/components/block-tools/block-contextual-toolbar.js +8 -11
  132. package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
  133. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +87 -0
  134. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -0
  135. package/build-module/components/dimensions-tool/index.js +195 -0
  136. package/build-module/components/dimensions-tool/index.js.map +1 -0
  137. package/build-module/components/dimensions-tool/scale-tool.js +103 -0
  138. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -0
  139. package/build-module/components/dimensions-tool/width-height-tool.js +122 -0
  140. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -0
  141. package/build-module/components/global-styles/color-panel.js +1 -1
  142. package/build-module/components/global-styles/color-panel.js.map +1 -1
  143. package/build-module/components/global-styles/filters-panel.js +2 -2
  144. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  145. package/build-module/components/global-styles/hooks.js +2 -2
  146. package/build-module/components/global-styles/hooks.js.map +1 -1
  147. package/build-module/components/global-styles/typography-panel.js +33 -2
  148. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  149. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -1
  150. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  151. package/build-module/components/image-editor/use-save-image.js +1 -2
  152. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  153. package/build-module/components/image-size-control/index.js +5 -0
  154. package/build-module/components/image-size-control/index.js.map +1 -1
  155. package/build-module/components/index.js +6 -0
  156. package/build-module/components/index.js.map +1 -1
  157. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +2 -2
  158. package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
  159. package/build-module/components/inserter/block-patterns-tab.js +7 -33
  160. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  161. package/build-module/components/inserter/hooks/use-block-types-state.js +3 -4
  162. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  163. package/build-module/components/inserter/hooks/use-patterns-state.js +9 -3
  164. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  165. package/build-module/components/inserter/media-tab/hooks.js +2 -21
  166. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  167. package/build-module/components/inserter/reusable-block-rename-hint.js +48 -0
  168. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -0
  169. package/build-module/components/inserter/reusable-blocks-tab.js +5 -2
  170. package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
  171. package/build-module/components/inserter/reusable-blocks-tab.native.js +2 -2
  172. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  173. package/build-module/components/inserter/tabs.native.js +1 -1
  174. package/build-module/components/inserter/tabs.native.js.map +1 -1
  175. package/build-module/components/inserter-draggable-blocks/index.js +9 -2
  176. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  177. package/build-module/components/link-control/constants.js +1 -1
  178. package/build-module/components/link-control/constants.js.map +1 -1
  179. package/build-module/components/link-control/index.js +17 -15
  180. package/build-module/components/link-control/index.js.map +1 -1
  181. package/build-module/components/link-control/search-create-button.js +7 -20
  182. package/build-module/components/link-control/search-create-button.js.map +1 -1
  183. package/build-module/components/link-control/search-input.js +4 -4
  184. package/build-module/components/link-control/search-input.js.map +1 -1
  185. package/build-module/components/link-control/search-item.js +14 -28
  186. package/build-module/components/link-control/search-item.js.map +1 -1
  187. package/build-module/components/link-control/search-results.js +3 -3
  188. package/build-module/components/link-control/search-results.js.map +1 -1
  189. package/build-module/components/link-control/settings-drawer.js +4 -5
  190. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  191. package/build-module/components/list-view/appender.js +2 -6
  192. package/build-module/components/list-view/appender.js.map +1 -1
  193. package/build-module/components/provider/index.js +5 -2
  194. package/build-module/components/provider/index.js.map +1 -1
  195. package/build-module/components/provider/use-block-sync.js +21 -0
  196. package/build-module/components/provider/use-block-sync.js.map +1 -1
  197. package/build-module/components/resolution-tool/index.js +45 -0
  198. package/build-module/components/resolution-tool/index.js.map +1 -0
  199. package/build-module/components/url-input/index.js +4 -2
  200. package/build-module/components/url-input/index.js.map +1 -1
  201. package/build-module/components/writing-flow/use-tab-nav.js +8 -26
  202. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  203. package/build-module/components/writing-mode-control/index.js +57 -0
  204. package/build-module/components/writing-mode-control/index.js.map +1 -0
  205. package/build-module/hooks/behaviors.js +26 -20
  206. package/build-module/hooks/behaviors.js.map +1 -1
  207. package/build-module/hooks/supports.js +7 -1
  208. package/build-module/hooks/supports.js.map +1 -1
  209. package/build-module/hooks/typography.js +2 -1
  210. package/build-module/hooks/typography.js.map +1 -1
  211. package/build-module/hooks/utils.js +4 -2
  212. package/build-module/hooks/utils.js.map +1 -1
  213. package/build-module/private-apis.js +7 -1
  214. package/build-module/private-apis.js.map +1 -1
  215. package/build-module/private-apis.native.js +2 -0
  216. package/build-module/private-apis.native.js.map +1 -1
  217. package/build-module/store/actions.js +191 -1
  218. package/build-module/store/actions.js.map +1 -1
  219. package/build-module/store/defaults.js +1 -0
  220. package/build-module/store/defaults.js.map +1 -1
  221. package/build-module/store/index.js +10 -1
  222. package/build-module/store/index.js.map +1 -1
  223. package/build-module/store/private-actions.js +45 -36
  224. package/build-module/store/private-actions.js.map +1 -1
  225. package/build-module/store/private-selectors.js +2 -2
  226. package/build-module/store/private-selectors.js.map +1 -1
  227. package/build-module/store/reducer.js +22 -8
  228. package/build-module/store/reducer.js.map +1 -1
  229. package/build-module/store/selectors.js +33 -15
  230. package/build-module/store/selectors.js.map +1 -1
  231. package/build-style/content-rtl.css +3 -0
  232. package/build-style/content.css +3 -0
  233. package/build-style/style-rtl.css +131 -129
  234. package/build-style/style.css +131 -129
  235. package/package.json +32 -31
  236. package/src/components/alignment-control/test/__snapshots__/index.js.snap +6 -6
  237. package/src/components/block-alignment-control/test/__snapshots__/index.js.snap +5 -5
  238. package/src/components/block-draggable/style.scss +1 -0
  239. package/src/components/block-heading-level-dropdown/heading-level-icon.js +6 -1
  240. package/src/components/block-heading-level-dropdown/index.native.js +8 -4
  241. package/src/components/block-inspector/style.scss +2 -1
  242. package/src/components/block-lock/toolbar.js +34 -6
  243. package/src/components/block-mobile-toolbar/block-actions-menu.native.js +4 -8
  244. package/src/components/block-parent-selector/index.js +13 -8
  245. package/src/components/block-removal-warning-modal/index.js +20 -33
  246. package/src/components/block-toolbar/index.js +9 -6
  247. package/src/components/block-tools/block-contextual-toolbar.js +5 -11
  248. package/src/components/block-tools/style.scss +73 -26
  249. package/src/components/default-block-appender/content.scss +11 -0
  250. package/src/components/dimensions-tool/aspect-ratio-tool.js +124 -0
  251. package/src/components/dimensions-tool/index.js +212 -0
  252. package/src/components/dimensions-tool/scale-tool.js +124 -0
  253. package/src/components/dimensions-tool/stories/aspect-ratio-tool.js +52 -0
  254. package/src/components/dimensions-tool/stories/index.js +54 -0
  255. package/src/components/dimensions-tool/stories/scale-tool.js +48 -0
  256. package/src/components/dimensions-tool/stories/width-height-tool.js +54 -0
  257. package/src/components/dimensions-tool/test/index.js +641 -0
  258. package/src/components/dimensions-tool/width-height-tool.js +113 -0
  259. package/src/components/font-family/README.md +71 -0
  260. package/src/components/global-styles/color-panel.js +1 -1
  261. package/src/components/global-styles/filters-panel.js +2 -2
  262. package/src/components/global-styles/hooks.js +2 -0
  263. package/src/components/global-styles/typography-panel.js +40 -0
  264. package/src/components/image-editor/aspect-ratio-dropdown.js +1 -1
  265. package/src/components/image-editor/use-save-image.js +0 -1
  266. package/src/components/image-size-control/index.js +6 -0
  267. package/src/components/index.js +6 -0
  268. package/src/components/inserter/block-patterns-explorer/patterns-list.js +8 -2
  269. package/src/components/inserter/block-patterns-tab.js +8 -56
  270. package/src/components/inserter/hooks/use-block-types-state.js +3 -4
  271. package/src/components/inserter/hooks/use-patterns-state.js +35 -19
  272. package/src/components/inserter/media-tab/hooks.js +2 -22
  273. package/src/components/inserter/reusable-block-rename-hint.js +52 -0
  274. package/src/components/inserter/reusable-blocks-tab.js +5 -1
  275. package/src/components/inserter/reusable-blocks-tab.native.js +2 -2
  276. package/src/components/inserter/style.scss +28 -0
  277. package/src/components/inserter/tabs.native.js +5 -1
  278. package/src/components/inserter-draggable-blocks/index.js +13 -2
  279. package/src/components/link-control/constants.js +1 -1
  280. package/src/components/link-control/index.js +32 -28
  281. package/src/components/link-control/search-create-button.js +8 -26
  282. package/src/components/link-control/search-input.js +4 -3
  283. package/src/components/link-control/search-item.js +21 -43
  284. package/src/components/link-control/search-results.js +48 -46
  285. package/src/components/link-control/settings-drawer.js +6 -5
  286. package/src/components/link-control/style.scss +51 -123
  287. package/src/components/link-control/test/index.js +135 -123
  288. package/src/components/list-view/appender.js +5 -6
  289. package/src/components/list-view/style.scss +1 -2
  290. package/src/components/media-replace-flow/test/index.js +1 -1
  291. package/src/components/panel-color-settings/README.md +98 -0
  292. package/src/components/provider/index.js +9 -2
  293. package/src/components/provider/test/use-block-sync.js +21 -6
  294. package/src/components/provider/use-block-sync.js +19 -0
  295. package/src/components/recursion-provider/README.md +101 -0
  296. package/src/components/resolution-tool/index.js +56 -0
  297. package/src/components/resolution-tool/stories/index.js +48 -0
  298. package/src/components/url-input/index.js +2 -0
  299. package/src/components/writing-flow/use-tab-nav.js +10 -33
  300. package/src/components/writing-mode-control/index.js +68 -0
  301. package/src/components/writing-mode-control/style.scss +18 -0
  302. package/src/hooks/behaviors.js +25 -16
  303. package/src/hooks/supports.js +7 -0
  304. package/src/hooks/typography.js +2 -0
  305. package/src/hooks/utils.js +3 -0
  306. package/src/private-apis.js +6 -0
  307. package/src/private-apis.native.js +2 -0
  308. package/src/store/actions.js +194 -1
  309. package/src/store/defaults.js +1 -0
  310. package/src/store/index.js +10 -0
  311. package/src/store/private-actions.js +39 -39
  312. package/src/store/private-selectors.js +2 -2
  313. package/src/store/reducer.js +22 -8
  314. package/src/store/selectors.js +54 -20
  315. package/src/store/test/actions.js +111 -0
  316. package/src/store/test/private-actions.js +56 -0
@@ -138,7 +138,7 @@ describe( 'Basic rendering', () => {
138
138
  render( <LinkControl /> );
139
139
 
140
140
  // Search Input UI.
141
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
141
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
142
142
 
143
143
  expect( searchInput ).toBeVisible();
144
144
  } );
@@ -147,7 +147,7 @@ describe( 'Basic rendering', () => {
147
147
  render( <LinkControl /> );
148
148
 
149
149
  // Search Input UI.
150
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
150
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
151
151
 
152
152
  expect( searchInput ).toBeVisible();
153
153
  // Make sure we use the ARIA 1.0 pattern with aria-owns.
@@ -170,7 +170,7 @@ describe( 'Basic rendering', () => {
170
170
  render( <LinkControl /> );
171
171
 
172
172
  // Search Input UI.
173
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
173
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
174
174
 
175
175
  // Simulate searching for a term.
176
176
  await user.type( searchInput, 'Hello' );
@@ -283,7 +283,7 @@ describe( 'Basic rendering', () => {
283
283
  render( <LinkControl /> );
284
284
 
285
285
  // Search Input UI.
286
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
286
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
287
287
 
288
288
  // Simulate searching for a term.
289
289
  await user.type( searchInput, searchTerm );
@@ -296,7 +296,7 @@ describe( 'Basic rendering', () => {
296
296
  render( <LinkControl value={ { url: 'https://example.com' } } /> );
297
297
 
298
298
  expect(
299
- screen.queryByRole( 'combobox', { name: 'URL' } )
299
+ screen.queryByRole( 'combobox', { name: 'Link' } )
300
300
  ).not.toBeInTheDocument();
301
301
  } );
302
302
 
@@ -309,7 +309,7 @@ describe( 'Basic rendering', () => {
309
309
  );
310
310
 
311
311
  expect(
312
- screen.getByRole( 'combobox', { name: 'URL' } )
312
+ screen.getByRole( 'combobox', { name: 'Link' } )
313
313
  ).toBeVisible();
314
314
  } );
315
315
 
@@ -327,7 +327,7 @@ describe( 'Basic rendering', () => {
327
327
  await user.click( editButton );
328
328
 
329
329
  expect(
330
- screen.getByRole( 'combobox', { name: 'URL' } )
330
+ screen.getByRole( 'combobox', { name: 'Link' } )
331
331
  ).toBeVisible();
332
332
 
333
333
  // If passed `forceIsEditingLink` of `false` while editing, should
@@ -340,7 +340,7 @@ describe( 'Basic rendering', () => {
340
340
  );
341
341
 
342
342
  expect(
343
- screen.queryByRole( 'combobox', { name: 'URL' } )
343
+ screen.queryByRole( 'combobox', { name: 'Link' } )
344
344
  ).not.toBeInTheDocument();
345
345
  } );
346
346
 
@@ -424,7 +424,7 @@ describe( 'Searching for a link', () => {
424
424
  render( <LinkControl /> );
425
425
 
426
426
  // Search Input UI.
427
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
427
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
428
428
 
429
429
  // Simulate searching for a term.
430
430
  await user.type( searchInput, searchTerm );
@@ -448,7 +448,9 @@ describe( 'Searching for a link', () => {
448
448
  render( <LinkControl /> );
449
449
 
450
450
  // Search Input UI.
451
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
451
+ const searchInput = screen.getByRole( 'combobox', {
452
+ name: 'Link',
453
+ } );
452
454
 
453
455
  // Simulate searching for a term.
454
456
  await user.type( searchInput, searchTerm );
@@ -476,16 +478,16 @@ describe( 'Searching for a link', () => {
476
478
  // The fallback URL suggestion should not be shown when input is not URL-like.
477
479
  expect(
478
480
  searchResultElements[ searchResultElements.length - 1 ]
479
- ).not.toHaveTextContent( 'URL' );
481
+ ).not.toHaveTextContent( 'Press ENTER to add this link' );
480
482
  }
481
483
  );
482
484
 
483
485
  it.each( [
484
- [ 'https://wordpress.org', 'URL' ],
485
- [ 'http://wordpress.org', 'URL' ],
486
- [ 'www.wordpress.org', 'URL' ],
487
- [ 'wordpress.org', 'URL' ],
488
- [ 'ftp://wordpress.org', 'URL' ],
486
+ [ 'https://wordpress.org', 'link' ],
487
+ [ 'http://wordpress.org', 'link' ],
488
+ [ 'www.wordpress.org', 'link' ],
489
+ [ 'wordpress.org', 'link' ],
490
+ [ 'ftp://wordpress.org', 'link' ],
489
491
  [ 'mailto:hello@wordpress.org', 'mailto' ],
490
492
  [ 'tel:123456789', 'tel' ],
491
493
  [ '#internal', 'internal' ],
@@ -497,7 +499,9 @@ describe( 'Searching for a link', () => {
497
499
  render( <LinkControl /> );
498
500
 
499
501
  // Search Input UI.
500
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
502
+ const searchInput = screen.getByRole( 'combobox', {
503
+ name: 'Link',
504
+ } );
501
505
 
502
506
  // Simulate searching for a term.
503
507
  await user.type( searchInput, searchTerm );
@@ -528,7 +532,7 @@ describe( 'Searching for a link', () => {
528
532
  render( <LinkControl /> );
529
533
 
530
534
  // Search Input UI.
531
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
535
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
532
536
 
533
537
  // Simulate searching for a term.
534
538
  await user.type( searchInput, searchTerm );
@@ -571,7 +575,7 @@ describe( 'Searching for a link', () => {
571
575
  render( <LinkControl showSuggestions={ false } /> );
572
576
 
573
577
  // Search Input UI.
574
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
578
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
575
579
 
576
580
  // Simulate searching for a term.
577
581
  await user.type( searchInput, 'anything' );
@@ -582,12 +586,43 @@ describe( 'Searching for a link', () => {
582
586
  expect( mockFetchSearchSuggestions ).not.toHaveBeenCalled();
583
587
  } );
584
588
 
589
+ it( 'should not display a URL suggestion when input is not likely to be a URL.', async () => {
590
+ const searchTerm = 'unlikelytobeaURL';
591
+ const user = userEvent.setup();
592
+ render( <LinkControl /> );
593
+
594
+ // Search Input UI.
595
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
596
+
597
+ // Simulate searching for a term.
598
+ await user.type( searchInput, searchTerm );
599
+
600
+ const searchResultElements = within(
601
+ await screen.findByRole( 'listbox', {
602
+ name: /Search results for.*/,
603
+ } )
604
+ ).getAllByRole( 'option' );
605
+
606
+ const lastSearchResultItem =
607
+ searchResultElements[ searchResultElements.length - 1 ];
608
+
609
+ // We should see a search result for each of the expect search suggestions.
610
+ expect( searchResultElements ).toHaveLength(
611
+ fauxEntitySuggestions.length
612
+ );
613
+
614
+ // The URL search suggestion should not exist.
615
+ expect( lastSearchResultItem ).not.toHaveTextContent(
616
+ 'Press ENTER to add this link'
617
+ );
618
+ } );
619
+
585
620
  it( 'should not display a URL suggestion as a default fallback when noURLSuggestion is passed.', async () => {
586
621
  const user = userEvent.setup();
587
622
  render( <LinkControl noURLSuggestion /> );
588
623
 
589
624
  // Search Input UI.
590
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
625
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
591
626
 
592
627
  // Simulate searching for a term.
593
628
  await user.type( searchInput, 'couldbeurlorentitysearchterm' );
@@ -617,7 +652,9 @@ describe( 'Manual link entry', () => {
617
652
  render( <LinkControl /> );
618
653
 
619
654
  // Search Input UI.
620
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
655
+ const searchInput = screen.getByRole( 'combobox', {
656
+ name: 'Link',
657
+ } );
621
658
 
622
659
  // Simulate searching for a term.
623
660
  await user.type( searchInput, searchTerm );
@@ -630,7 +667,6 @@ describe( 'Manual link entry', () => {
630
667
 
631
668
  expect( searchResultElements ).toBeVisible();
632
669
  expect( searchResultElements ).toHaveTextContent( searchTerm );
633
- expect( searchResultElements ).toHaveTextContent( 'URL' );
634
670
  expect( searchResultElements ).toHaveTextContent(
635
671
  'Press ENTER to add this link'
636
672
  );
@@ -653,19 +689,9 @@ describe( 'Manual link entry', () => {
653
689
 
654
690
  // Search Input UI.
655
691
  const searchInput = screen.getByRole( 'combobox', {
656
- name: 'URL',
657
- } );
658
-
659
- let submitButton = screen.getByRole( 'button', {
660
- name: 'Save',
692
+ name: 'Link',
661
693
  } );
662
694
 
663
- expect( submitButton ).toHaveAttribute(
664
- 'aria-disabled',
665
- 'true'
666
- );
667
- expect( submitButton ).toBeVisible();
668
-
669
695
  if ( searchString.length ) {
670
696
  // Simulate searching for a term.
671
697
  await user.type( searchInput, searchString );
@@ -677,102 +703,74 @@ describe( 'Manual link entry', () => {
677
703
  // Attempt to submit the empty search value in the input.
678
704
  await user.keyboard( '[Enter]' );
679
705
 
680
- submitButton = screen.getByRole( 'button', {
681
- name: 'Save',
682
- } );
683
-
684
- // Verify the UI hasn't allowed submission.
706
+ // Verify the UI hasn't allowed submission because
707
+ // the search input is still visible.
685
708
  expect( searchInput ).toBeVisible();
686
- expect( submitButton ).toHaveAttribute(
687
- 'aria-disabled',
688
- 'true'
689
- );
690
- expect( submitButton ).toBeVisible();
691
709
  }
692
710
  );
693
711
 
694
712
  it.each( testTable )(
695
- 'should not allow creation of links %s via the UI "submit" button',
713
+ 'should not allow editing of links to a new link %s via the UI "submit" button',
696
714
  async ( _desc, searchString ) => {
697
715
  const user = userEvent.setup();
698
716
 
699
- render( <LinkControl /> );
717
+ render(
718
+ <LinkControl
719
+ value={ fauxEntitySuggestions[ 0 ] }
720
+ forceIsEditingLink
721
+ />
722
+ );
700
723
 
701
724
  // Search Input UI.
702
725
  const searchInput = screen.getByRole( 'combobox', {
703
- name: 'URL',
726
+ name: 'Link',
704
727
  } );
705
728
 
706
- let submitButton = screen.queryByRole( 'button', {
707
- name: 'Save',
708
- } );
729
+ // Remove the existing link.
730
+ await user.clear( searchInput );
709
731
 
710
- expect( submitButton ).toHaveAttribute(
711
- 'aria-disabled',
712
- 'true'
713
- );
714
- expect( submitButton ).toBeVisible();
715
-
716
- // Simulate searching for a term.
717
732
  if ( searchString.length ) {
718
- // Simulate searching for a term.
719
733
  await user.type( searchInput, searchString );
720
734
  } else {
721
735
  // Simulate clearing the search term.
722
736
  await user.clear( searchInput );
723
737
  }
724
738
 
725
- // Attempt to submit the empty search value in the input.
726
- await user.click( submitButton );
727
-
728
- submitButton = screen.queryByRole( 'button', {
739
+ const submitButton = screen.queryByRole( 'button', {
729
740
  name: 'Save',
730
741
  } );
731
742
 
732
- // Verify the UI hasn't allowed submission.
733
- expect( searchInput ).toBeVisible();
743
+ // debug the UI state
744
+ // screen.debug();
745
+
746
+ // Verify the submission UI is disabled.
747
+ expect( submitButton ).toBeVisible();
734
748
  expect( submitButton ).toHaveAttribute(
735
749
  'aria-disabled',
736
750
  'true'
737
751
  );
738
- expect( submitButton ).toBeVisible();
752
+
753
+ // Attempt to submit the empty search value in the input.
754
+ await user.click( submitButton );
755
+
756
+ // Verify the UI hasn't allowed submission because
757
+ // the search input is still visible.
758
+ expect( searchInput ).toBeVisible();
739
759
  }
740
760
  );
741
761
  } );
742
762
 
743
763
  describe( 'Handling cancellation', () => {
744
- it( 'should allow cancellation of the link creation process and reset any entered values', async () => {
745
- const user = userEvent.setup();
764
+ it( 'should not show cancellation button during link creation', async () => {
746
765
  const mockOnRemove = jest.fn();
747
- const mockOnCancel = jest.fn();
748
766
 
749
767
  render( <LinkControl onRemove={ mockOnRemove } /> );
750
768
 
751
- // Search Input UI.
752
- const searchInput = screen.getByRole( 'combobox', {
753
- name: 'URL',
754
- } );
755
-
756
769
  const cancelButton = screen.queryByRole( 'button', {
757
770
  name: 'Cancel',
758
771
  } );
759
772
 
760
- expect( cancelButton ).toBeEnabled();
761
- expect( cancelButton ).toBeVisible();
762
-
763
- // Simulate adding a link for a term.
764
- await user.type( searchInput, 'https://www.wordpress.org' );
765
-
766
- // Attempt to submit the empty search value in the input.
767
- await user.click( cancelButton );
768
-
769
- // Verify the consumer can handle the cancellation.
770
- expect( mockOnRemove ).toHaveBeenCalled();
771
-
772
- // Ensure optional callback is not called.
773
- expect( mockOnCancel ).not.toHaveBeenCalled();
774
-
775
- expect( searchInput ).toHaveValue( '' );
773
+ expect( cancelButton ).not.toBeInTheDocument();
776
774
  } );
777
775
 
778
776
  it( 'should allow cancellation of the link editing process and reset any entered values', async () => {
@@ -809,7 +807,7 @@ describe( 'Manual link entry', () => {
809
807
  await toggleSettingsDrawer( user );
810
808
 
811
809
  let searchInput = screen.getByRole( 'combobox', {
812
- name: 'URL',
810
+ name: 'Link',
813
811
  } );
814
812
 
815
813
  let textInput = screen.getByRole( 'textbox', {
@@ -844,7 +842,7 @@ describe( 'Manual link entry', () => {
844
842
 
845
843
  // Re-query the inputs as they have been replaced.
846
844
  searchInput = screen.getByRole( 'combobox', {
847
- name: 'URL',
845
+ name: 'Link',
848
846
  } );
849
847
 
850
848
  textInput = screen.getByRole( 'textbox', {
@@ -860,7 +858,13 @@ describe( 'Manual link entry', () => {
860
858
  const user = userEvent.setup();
861
859
  const mockOnCancel = jest.fn();
862
860
 
863
- render( <LinkControl onCancel={ mockOnCancel } /> );
861
+ render(
862
+ <LinkControl
863
+ value={ fauxEntitySuggestions[ 0 ] }
864
+ onCancel={ mockOnCancel }
865
+ forceIsEditingLink
866
+ />
867
+ );
864
868
 
865
869
  const cancelButton = screen.queryByRole( 'button', {
866
870
  name: 'Cancel',
@@ -886,7 +890,7 @@ describe( 'Manual link entry', () => {
886
890
 
887
891
  // Search Input UI.
888
892
  const searchInput = screen.getByRole( 'combobox', {
889
- name: 'URL',
893
+ name: 'Link',
890
894
  } );
891
895
 
892
896
  // Simulate searching for a term.
@@ -922,7 +926,7 @@ describe( 'Default search suggestions', () => {
922
926
  // Verify input has no value has default suggestions should only show
923
927
  // when this does not have a value.
924
928
  // Search Input UI.
925
- expect( screen.getByRole( 'combobox', { name: 'URL' } ) ).toHaveValue(
929
+ expect( screen.getByRole( 'combobox', { name: 'Link' } ) ).toHaveValue(
926
930
  ''
927
931
  );
928
932
 
@@ -951,7 +955,7 @@ describe( 'Default search suggestions', () => {
951
955
  } );
952
956
  await user.click( currentLinkBtn );
953
957
 
954
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
958
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
955
959
 
956
960
  // Search input is set to the URL value.
957
961
  expect( searchInput ).toHaveValue( initialValue.url );
@@ -973,7 +977,7 @@ describe( 'Default search suggestions', () => {
973
977
  render( <LinkControl showInitialSuggestions /> );
974
978
 
975
979
  // Search Input UI.
976
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
980
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
977
981
 
978
982
  // Simulate searching for a term.
979
983
  await user.type( searchInput, searchTerm );
@@ -1011,7 +1015,7 @@ describe( 'Default search suggestions', () => {
1011
1015
 
1012
1016
  render( <LinkControl showInitialSuggestions /> );
1013
1017
 
1014
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1018
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
1015
1019
 
1016
1020
  const searchResultsField = screen.queryByRole( 'listbox', {
1017
1021
  name: 'Suggestions',
@@ -1069,7 +1073,9 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1069
1073
  render( <LinkControlConsumer /> );
1070
1074
 
1071
1075
  // Search Input UI.
1072
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1076
+ const searchInput = screen.getByRole( 'combobox', {
1077
+ name: 'Link',
1078
+ } );
1073
1079
 
1074
1080
  // Simulate searching for a term.
1075
1081
  await user.type( searchInput, entityNameText );
@@ -1136,7 +1142,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1136
1142
  render( <LinkControlConsumer /> );
1137
1143
 
1138
1144
  // Search Input UI.
1139
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1145
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
1140
1146
 
1141
1147
  // Simulate searching for a term.
1142
1148
  await user.type( searchInput, 'Some new page to create' );
@@ -1185,7 +1191,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1185
1191
  render( <LinkControlConsumer /> );
1186
1192
 
1187
1193
  // Search Input UI.
1188
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1194
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
1189
1195
 
1190
1196
  // Simulate searching for a term.
1191
1197
  await user.type( searchInput, entityNameText );
@@ -1228,7 +1234,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1228
1234
  render( <LinkControlConsumer /> );
1229
1235
 
1230
1236
  // Search Input UI.
1231
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1237
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
1232
1238
 
1233
1239
  // Simulate searching for a term.
1234
1240
  await user.type( searchInput, entityNameText );
@@ -1252,7 +1258,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1252
1258
 
1253
1259
  // Search Input UI.
1254
1260
  const searchInput = screen.getByRole( 'combobox', {
1255
- name: 'URL',
1261
+ name: 'Link',
1256
1262
  } );
1257
1263
 
1258
1264
  const searchResultsField = screen.queryByRole( 'listbox' );
@@ -1272,7 +1278,9 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1272
1278
  );
1273
1279
 
1274
1280
  // Search Input UI.
1275
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1281
+ const searchInput = screen.getByRole( 'combobox', {
1282
+ name: 'Link',
1283
+ } );
1276
1284
 
1277
1285
  const searchResultsField = screen.queryByRole( 'listbox' );
1278
1286
 
@@ -1295,7 +1303,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1295
1303
 
1296
1304
  // Search Input UI.
1297
1305
  const searchInput = screen.getByRole( 'combobox', {
1298
- name: 'URL',
1306
+ name: 'Link',
1299
1307
  } );
1300
1308
 
1301
1309
  // Simulate searching for a term.
@@ -1329,7 +1337,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1329
1337
  render( <LinkControl createSuggestion={ createSuggestion } /> );
1330
1338
 
1331
1339
  // Search Input UI.
1332
- searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1340
+ searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
1333
1341
 
1334
1342
  // Simulate searching for a term.
1335
1343
  await user.type( searchInput, searchText );
@@ -1344,7 +1352,7 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => {
1344
1352
 
1345
1353
  await user.click( createButton );
1346
1354
 
1347
- searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1355
+ searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
1348
1356
 
1349
1357
  const errorNotice = screen.getAllByText(
1350
1358
  'API response returned invalid entity.'
@@ -1417,7 +1425,7 @@ describe( 'Selecting links', () => {
1417
1425
  // Simulate searching for a term.
1418
1426
  await user.click( currentLinkBtn );
1419
1427
 
1420
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1428
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
1421
1429
  currentLinkUI = screen.queryByLabelText( 'Currently selected' );
1422
1430
 
1423
1431
  // We should be back to showing the search input.
@@ -1458,7 +1466,7 @@ describe( 'Selecting links', () => {
1458
1466
 
1459
1467
  // Search Input UI.
1460
1468
  const searchInput = screen.getByRole( 'combobox', {
1461
- name: 'URL',
1469
+ name: 'Link',
1462
1470
  } );
1463
1471
 
1464
1472
  // Simulate searching for a term.
@@ -1520,7 +1528,7 @@ describe( 'Selecting links', () => {
1520
1528
 
1521
1529
  // Search Input UI.
1522
1530
  const searchInput = screen.getByRole( 'combobox', {
1523
- name: 'URL',
1531
+ name: 'Link',
1524
1532
  } );
1525
1533
 
1526
1534
  // Simulate searching for a term.
@@ -1609,7 +1617,9 @@ describe( 'Selecting links', () => {
1609
1617
  ).toBeVisible();
1610
1618
 
1611
1619
  // Search Input UI.
1612
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1620
+ const searchInput = screen.getByRole( 'combobox', {
1621
+ name: 'Link',
1622
+ } );
1613
1623
 
1614
1624
  // Step down into the search results, highlighting the first result item.
1615
1625
  triggerArrowDown( searchInput );
@@ -1665,7 +1675,9 @@ describe( 'Selecting links', () => {
1665
1675
  render( <LinkControl value={ selectedLink } forceIsEditingLink /> );
1666
1676
 
1667
1677
  // focus the search input
1668
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1678
+ const searchInput = screen.getByRole( 'combobox', {
1679
+ name: 'Link',
1680
+ } );
1669
1681
 
1670
1682
  fireEvent.focus( searchInput );
1671
1683
 
@@ -1707,10 +1719,7 @@ describe( 'Addition Settings UI', () => {
1707
1719
 
1708
1720
  render( <LinkControlConsumer /> );
1709
1721
 
1710
- const settingsToggle = screen.queryByRole( 'button', {
1711
- name: 'Link Settings',
1712
- ariaControls: 'link-settings-1',
1713
- } );
1722
+ const settingsToggle = getSettingsDrawerToggle();
1714
1723
 
1715
1724
  expect( settingsToggle ).not.toBeInTheDocument();
1716
1725
  } );
@@ -1727,10 +1736,7 @@ describe( 'Addition Settings UI', () => {
1727
1736
 
1728
1737
  const user = userEvent.setup();
1729
1738
 
1730
- const settingsToggle = screen.queryByRole( 'button', {
1731
- name: 'Link Settings',
1732
- ariaControls: 'link-settings-1',
1733
- } );
1739
+ const settingsToggle = getSettingsDrawerToggle();
1734
1740
 
1735
1741
  expect( settingsToggle ).toHaveAttribute( 'aria-expanded', 'false' );
1736
1742
 
@@ -1891,7 +1897,7 @@ describe( 'Post types', () => {
1891
1897
  render( <LinkControl /> );
1892
1898
 
1893
1899
  // Search Input UI.
1894
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1900
+ const searchInput = screen.getByRole( 'combobox', { name: 'Link' } );
1895
1901
 
1896
1902
  // Simulate searching for a term.
1897
1903
  await user.type( searchInput, searchTerm );
@@ -1918,7 +1924,9 @@ describe( 'Post types', () => {
1918
1924
  render( <LinkControl suggestionsQuery={ { type: postType } } /> );
1919
1925
 
1920
1926
  // Search Input UI.
1921
- const searchInput = screen.getByRole( 'combobox', { name: 'URL' } );
1927
+ const searchInput = screen.getByRole( 'combobox', {
1928
+ name: 'Link',
1929
+ } );
1922
1930
 
1923
1931
  // Simulate searching for a term.
1924
1932
  await user.type( searchInput, searchTerm );
@@ -2376,10 +2384,14 @@ describe( 'Controlling link title text', () => {
2376
2384
  } );
2377
2385
  } );
2378
2386
 
2379
- async function toggleSettingsDrawer( user ) {
2380
- const settingsToggle = screen.queryByRole( 'button', {
2381
- name: 'Link Settings',
2387
+ function getSettingsDrawerToggle() {
2388
+ return screen.queryByRole( 'button', {
2389
+ name: 'Advanced',
2382
2390
  } );
2391
+ }
2392
+
2393
+ async function toggleSettingsDrawer( user ) {
2394
+ const settingsToggle = getSettingsDrawerToggle();
2383
2395
 
2384
2396
  await user.click( settingsToggle );
2385
2397
  }
@@ -21,16 +21,15 @@ export const Appender = forwardRef(
21
21
  const { insertedBlock, setInsertedBlock } = useListViewContext();
22
22
 
23
23
  const instanceId = useInstanceId( Appender );
24
- const { hideInserter } = useSelect(
24
+ const hideInserter = useSelect(
25
25
  ( select ) => {
26
26
  const { getTemplateLock, __unstableGetEditorMode } =
27
27
  select( blockEditorStore );
28
28
 
29
- return {
30
- hideInserter:
31
- !! getTemplateLock( clientId ) ||
32
- __unstableGetEditorMode() === 'zoom-out',
33
- };
29
+ return (
30
+ !! getTemplateLock( clientId ) ||
31
+ __unstableGetEditorMode() === 'zoom-out'
32
+ );
34
33
  },
35
34
  [ clientId ]
36
35
  );
@@ -408,8 +408,7 @@ $block-navigation-max-indent: 8;
408
408
 
409
409
  .block-editor-list-view-drop-indicator__line {
410
410
  background: var(--wp-admin-theme-color);
411
- height: 6px;
412
- border: 1px solid $white;
411
+ height: 4px;
413
412
  border-radius: 4px;
414
413
  }
415
414
  }
@@ -128,7 +128,7 @@ describe( 'General media replace flow', () => {
128
128
  );
129
129
 
130
130
  const mediaURLInput = screen.getByRole( 'combobox', {
131
- name: 'URL',
131
+ name: 'Link',
132
132
  expanded: false,
133
133
  } );
134
134