@wordpress/block-library 8.18.0 → 8.19.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 (393) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +1 -1
  3. package/build/block/edit.js +53 -2
  4. package/build/block/edit.js.map +1 -1
  5. package/build/button/edit.js +7 -4
  6. package/build/button/edit.js.map +1 -1
  7. package/build/button/index.js +11 -2
  8. package/build/button/index.js.map +1 -1
  9. package/build/button/save.js +10 -4
  10. package/build/button/save.js.map +1 -1
  11. package/build/buttons/edit.js +12 -3
  12. package/build/buttons/edit.js.map +1 -1
  13. package/build/code/edit.js +8 -2
  14. package/build/code/edit.js.map +1 -1
  15. package/build/code/index.js +7 -1
  16. package/build/code/index.js.map +1 -1
  17. package/build/column/edit.native.js +5 -5
  18. package/build/column/edit.native.js.map +1 -1
  19. package/build/column/index.js +1 -0
  20. package/build/column/index.js.map +1 -1
  21. package/build/columns/index.js +2 -0
  22. package/build/columns/index.js.map +1 -1
  23. package/build/file/edit.native.js +1 -1
  24. package/build/file/edit.native.js.map +1 -1
  25. package/build/file/index.js +2 -1
  26. package/build/file/index.js.map +1 -1
  27. package/build/file/utils/index.js +1 -15
  28. package/build/file/utils/index.js.map +1 -1
  29. package/build/file/view.js +14 -1
  30. package/build/file/view.js.map +1 -1
  31. package/build/footnotes/edit.js +14 -5
  32. package/build/footnotes/edit.js.map +1 -1
  33. package/build/gallery/edit.js +1 -1
  34. package/build/gallery/edit.js.map +1 -1
  35. package/build/group/edit.js +0 -1
  36. package/build/group/edit.js.map +1 -1
  37. package/build/group/index.js +5 -0
  38. package/build/group/index.js.map +1 -1
  39. package/build/heading/edit.js +0 -1
  40. package/build/heading/edit.js.map +1 -1
  41. package/build/heading/index.js +2 -0
  42. package/build/heading/index.js.map +1 -1
  43. package/build/heading/transforms.js +3 -6
  44. package/build/heading/transforms.js.map +1 -1
  45. package/build/image/deprecated.js +191 -7
  46. package/build/image/deprecated.js.map +1 -1
  47. package/build/image/edit.js +27 -12
  48. package/build/image/edit.js.map +1 -1
  49. package/build/image/image.js +75 -40
  50. package/build/image/image.js.map +1 -1
  51. package/build/image/index.js +7 -4
  52. package/build/image/index.js.map +1 -1
  53. package/build/image/{view-interactivity.js → view.js} +1 -1
  54. package/build/image/view.js.map +1 -0
  55. package/build/list/deprecated.js +93 -1
  56. package/build/list/deprecated.js.map +1 -1
  57. package/build/list/edit.js +10 -10
  58. package/build/list/edit.js.map +1 -1
  59. package/build/list/ordered-list-settings.js +10 -10
  60. package/build/list/ordered-list-settings.js.map +1 -1
  61. package/build/list/save.js +4 -2
  62. package/build/list/save.js.map +1 -1
  63. package/build/list/utils.js +21 -2
  64. package/build/list/utils.js.map +1 -1
  65. package/build/navigation/constants.js +1 -1
  66. package/build/navigation/constants.js.map +1 -1
  67. package/build/navigation/index.js +4 -2
  68. package/build/navigation/index.js.map +1 -1
  69. package/build/navigation/view.js +168 -82
  70. package/build/navigation/view.js.map +1 -1
  71. package/build/navigation-link/edit.js +3 -9
  72. package/build/navigation-link/edit.js.map +1 -1
  73. package/build/navigation-link/transforms.js +24 -0
  74. package/build/navigation-link/transforms.js.map +1 -1
  75. package/build/page-list/edit.js +2 -1
  76. package/build/page-list/edit.js.map +1 -1
  77. package/build/post-comments-form/edit.js +10 -2
  78. package/build/post-comments-form/edit.js.map +1 -1
  79. package/build/post-comments-form/form.js +5 -3
  80. package/build/post-comments-form/form.js.map +1 -1
  81. package/build/post-content/edit.js +8 -7
  82. package/build/post-content/edit.js.map +1 -1
  83. package/build/post-content/index.js +3 -0
  84. package/build/post-content/index.js.map +1 -1
  85. package/build/post-featured-image/overlay.js +2 -1
  86. package/build/post-featured-image/overlay.js.map +1 -1
  87. package/build/post-terms/use-post-terms.js +3 -2
  88. package/build/post-terms/use-post-terms.js.map +1 -1
  89. package/build/preformatted/edit.js +4 -1
  90. package/build/preformatted/edit.js.map +1 -1
  91. package/build/preformatted/index.js +1 -1
  92. package/build/preformatted/index.js.map +1 -1
  93. package/build/pullquote/deprecated.js +6 -7
  94. package/build/pullquote/deprecated.js.map +1 -1
  95. package/build/query/edit/enhanced-pagination-modal.js +56 -0
  96. package/build/query/edit/enhanced-pagination-modal.js.map +1 -0
  97. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +42 -0
  98. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -0
  99. package/build/query/edit/inspector-controls/index.js +8 -25
  100. package/build/query/edit/inspector-controls/index.js.map +1 -1
  101. package/build/query/edit/query-content.js +8 -2
  102. package/build/query/edit/query-content.js.map +1 -1
  103. package/build/query/utils.js +19 -0
  104. package/build/query/utils.js.map +1 -1
  105. package/build/query/view.js +4 -5
  106. package/build/query/view.js.map +1 -1
  107. package/build/search/index.js +1 -0
  108. package/build/search/index.js.map +1 -1
  109. package/build/search/view.js +81 -150
  110. package/build/search/view.js.map +1 -1
  111. package/build/social-link/edit.native.js +3 -1
  112. package/build/social-link/edit.native.js.map +1 -1
  113. package/build/table/edit.js +7 -7
  114. package/build/table/edit.js.map +1 -1
  115. package/build/table-of-contents/edit.js +2 -130
  116. package/build/table-of-contents/edit.js.map +1 -1
  117. package/build/table-of-contents/hooks.js +145 -0
  118. package/build/table-of-contents/hooks.js.map +1 -0
  119. package/build/table-of-contents/index.js +2 -1
  120. package/build/table-of-contents/index.js.map +1 -1
  121. package/build/verse/edit.js +4 -1
  122. package/build/verse/edit.js.map +1 -1
  123. package/build/verse/index.js +1 -1
  124. package/build/verse/index.js.map +1 -1
  125. package/build-module/block/edit.js +54 -3
  126. package/build-module/block/edit.js.map +1 -1
  127. package/build-module/button/edit.js +7 -4
  128. package/build-module/button/edit.js.map +1 -1
  129. package/build-module/button/index.js +11 -2
  130. package/build-module/button/index.js.map +1 -1
  131. package/build-module/button/save.js +10 -4
  132. package/build-module/button/save.js.map +1 -1
  133. package/build-module/buttons/edit.js +12 -3
  134. package/build-module/buttons/edit.js.map +1 -1
  135. package/build-module/code/edit.js +8 -2
  136. package/build-module/code/edit.js.map +1 -1
  137. package/build-module/code/index.js +7 -1
  138. package/build-module/code/index.js.map +1 -1
  139. package/build-module/column/edit.native.js +5 -5
  140. package/build-module/column/edit.native.js.map +1 -1
  141. package/build-module/column/index.js +1 -0
  142. package/build-module/column/index.js.map +1 -1
  143. package/build-module/columns/index.js +2 -0
  144. package/build-module/columns/index.js.map +1 -1
  145. package/build-module/file/edit.native.js +1 -1
  146. package/build-module/file/edit.native.js.map +1 -1
  147. package/build-module/file/index.js +2 -1
  148. package/build-module/file/index.js.map +1 -1
  149. package/build-module/file/utils/index.js +0 -13
  150. package/build-module/file/utils/index.js.map +1 -1
  151. package/build-module/file/view.js +14 -2
  152. package/build-module/file/view.js.map +1 -1
  153. package/build-module/footnotes/edit.js +14 -5
  154. package/build-module/footnotes/edit.js.map +1 -1
  155. package/build-module/gallery/edit.js +1 -1
  156. package/build-module/gallery/edit.js.map +1 -1
  157. package/build-module/group/edit.js +0 -1
  158. package/build-module/group/edit.js.map +1 -1
  159. package/build-module/group/index.js +5 -0
  160. package/build-module/group/index.js.map +1 -1
  161. package/build-module/heading/edit.js +0 -1
  162. package/build-module/heading/edit.js.map +1 -1
  163. package/build-module/heading/index.js +2 -0
  164. package/build-module/heading/index.js.map +1 -1
  165. package/build-module/heading/transforms.js +3 -6
  166. package/build-module/heading/transforms.js.map +1 -1
  167. package/build-module/image/deprecated.js +191 -7
  168. package/build-module/image/deprecated.js.map +1 -1
  169. package/build-module/image/edit.js +27 -12
  170. package/build-module/image/edit.js.map +1 -1
  171. package/build-module/image/image.js +77 -42
  172. package/build-module/image/image.js.map +1 -1
  173. package/build-module/image/index.js +7 -4
  174. package/build-module/image/index.js.map +1 -1
  175. package/build-module/image/{view-interactivity.js → view.js} +1 -1
  176. package/build-module/image/view.js.map +1 -0
  177. package/build-module/list/deprecated.js +95 -3
  178. package/build-module/list/deprecated.js.map +1 -1
  179. package/build-module/list/edit.js +10 -10
  180. package/build-module/list/edit.js.map +1 -1
  181. package/build-module/list/ordered-list-settings.js +10 -10
  182. package/build-module/list/ordered-list-settings.js.map +1 -1
  183. package/build-module/list/save.js +4 -2
  184. package/build-module/list/save.js.map +1 -1
  185. package/build-module/list/utils.js +20 -2
  186. package/build-module/list/utils.js.map +1 -1
  187. package/build-module/navigation/constants.js +1 -1
  188. package/build-module/navigation/constants.js.map +1 -1
  189. package/build-module/navigation/index.js +4 -2
  190. package/build-module/navigation/index.js.map +1 -1
  191. package/build-module/navigation/view.js +168 -83
  192. package/build-module/navigation/view.js.map +1 -1
  193. package/build-module/navigation-link/edit.js +3 -9
  194. package/build-module/navigation-link/edit.js.map +1 -1
  195. package/build-module/navigation-link/transforms.js +24 -0
  196. package/build-module/navigation-link/transforms.js.map +1 -1
  197. package/build-module/page-list/edit.js +2 -1
  198. package/build-module/page-list/edit.js.map +1 -1
  199. package/build-module/post-comments-form/edit.js +10 -2
  200. package/build-module/post-comments-form/edit.js.map +1 -1
  201. package/build-module/post-comments-form/form.js +5 -3
  202. package/build-module/post-comments-form/form.js.map +1 -1
  203. package/build-module/post-content/edit.js +8 -7
  204. package/build-module/post-content/edit.js.map +1 -1
  205. package/build-module/post-content/index.js +3 -0
  206. package/build-module/post-content/index.js.map +1 -1
  207. package/build-module/post-featured-image/overlay.js +2 -1
  208. package/build-module/post-featured-image/overlay.js.map +1 -1
  209. package/build-module/post-terms/use-post-terms.js +3 -2
  210. package/build-module/post-terms/use-post-terms.js.map +1 -1
  211. package/build-module/preformatted/edit.js +4 -1
  212. package/build-module/preformatted/edit.js.map +1 -1
  213. package/build-module/preformatted/index.js +1 -1
  214. package/build-module/preformatted/index.js.map +1 -1
  215. package/build-module/pullquote/deprecated.js +6 -7
  216. package/build-module/pullquote/deprecated.js.map +1 -1
  217. package/build-module/query/edit/enhanced-pagination-modal.js +50 -0
  218. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -0
  219. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +35 -0
  220. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -0
  221. package/build-module/query/edit/inspector-controls/index.js +9 -26
  222. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  223. package/build-module/query/edit/query-content.js +8 -2
  224. package/build-module/query/edit/query-content.js.map +1 -1
  225. package/build-module/query/utils.js +17 -0
  226. package/build-module/query/utils.js.map +1 -1
  227. package/build-module/query/view.js +4 -5
  228. package/build-module/query/view.js.map +1 -1
  229. package/build-module/search/index.js +1 -0
  230. package/build-module/search/index.js.map +1 -1
  231. package/build-module/search/view.js +81 -151
  232. package/build-module/search/view.js.map +1 -1
  233. package/build-module/social-link/edit.native.js +3 -1
  234. package/build-module/social-link/edit.native.js.map +1 -1
  235. package/build-module/table/edit.js +7 -7
  236. package/build-module/table/edit.js.map +1 -1
  237. package/build-module/table-of-contents/edit.js +3 -131
  238. package/build-module/table-of-contents/edit.js.map +1 -1
  239. package/build-module/table-of-contents/hooks.js +137 -0
  240. package/build-module/table-of-contents/hooks.js.map +1 -0
  241. package/build-module/table-of-contents/index.js +2 -1
  242. package/build-module/table-of-contents/index.js.map +1 -1
  243. package/build-module/verse/edit.js +4 -1
  244. package/build-module/verse/edit.js.map +1 -1
  245. package/build-module/verse/index.js +1 -1
  246. package/build-module/verse/index.js.map +1 -1
  247. package/build-style/cover/style-rtl.css +9 -0
  248. package/build-style/cover/style.css +9 -0
  249. package/build-style/editor-rtl.css +15 -9
  250. package/build-style/editor.css +15 -9
  251. package/build-style/file/style-rtl.css +5 -0
  252. package/build-style/file/style.css +5 -0
  253. package/build-style/heading/style-rtl.css +13 -0
  254. package/build-style/heading/style.css +13 -0
  255. package/build-style/navigation-link/editor-rtl.css +0 -9
  256. package/build-style/navigation-link/editor.css +0 -9
  257. package/build-style/paragraph/editor-rtl.css +5 -0
  258. package/build-style/paragraph/editor.css +5 -0
  259. package/build-style/paragraph/style-rtl.css +5 -0
  260. package/build-style/paragraph/style.css +5 -0
  261. package/build-style/post-navigation-link/style-rtl.css +3 -0
  262. package/build-style/post-navigation-link/style.css +3 -0
  263. package/build-style/query/editor-rtl.css +10 -0
  264. package/build-style/query/editor.css +10 -0
  265. package/build-style/query/style-rtl.css +1 -1
  266. package/build-style/query/style.css +1 -1
  267. package/build-style/reset-rtl.css +27 -27
  268. package/build-style/reset.css +27 -27
  269. package/build-style/style-rtl.css +35 -0
  270. package/build-style/style.css +35 -0
  271. package/package.json +32 -33
  272. package/src/audio/test/__snapshots__/edit.native.js.snap +78 -106
  273. package/src/avatar/index.php +2 -2
  274. package/src/block/edit.js +58 -2
  275. package/src/block/test/edit.native.js +2 -3
  276. package/src/button/block.json +11 -2
  277. package/src/button/edit.js +27 -11
  278. package/src/button/save.js +10 -4
  279. package/src/buttons/edit.js +13 -3
  280. package/src/buttons/test/edit.native.js +28 -24
  281. package/src/calendar/index.php +2 -2
  282. package/src/code/block.json +2 -1
  283. package/src/code/edit.js +13 -1
  284. package/src/code/index.js +5 -0
  285. package/src/column/block.json +1 -0
  286. package/src/column/edit.native.js +4 -4
  287. package/src/columns/block.json +2 -0
  288. package/src/columns/test/__snapshots__/edit.native.js.snap +14 -0
  289. package/src/columns/test/edit.native.js +47 -17
  290. package/src/comment-template/index.php +1 -1
  291. package/src/comments-pagination-next/index.php +1 -1
  292. package/src/comments-pagination-previous/index.php +1 -1
  293. package/src/cover/style.scss +12 -1
  294. package/src/cover/test/edit.js +7 -7
  295. package/src/cover/test/edit.native.js +18 -27
  296. package/src/embed/test/index.native.js +30 -45
  297. package/src/file/block.json +2 -1
  298. package/src/file/edit.native.js +1 -1
  299. package/src/file/index.php +19 -21
  300. package/src/file/style.scss +6 -1
  301. package/src/file/test/__snapshots__/edit.native.js.snap +162 -218
  302. package/src/file/utils/index.js +0 -15
  303. package/src/file/view.js +14 -5
  304. package/src/footnotes/edit.js +16 -2
  305. package/src/gallery/edit.js +1 -1
  306. package/src/gallery/index.php +1 -1
  307. package/src/group/block.json +5 -0
  308. package/src/group/edit.js +0 -1
  309. package/src/heading/block.json +2 -0
  310. package/src/heading/edit.js +0 -1
  311. package/src/heading/style.scss +4 -0
  312. package/src/heading/transforms.js +1 -6
  313. package/src/image/block.json +7 -4
  314. package/src/image/deprecated.js +210 -7
  315. package/src/image/edit.js +43 -29
  316. package/src/image/image.js +86 -43
  317. package/src/image/index.php +251 -28
  318. package/src/latest-posts/index.php +1 -1
  319. package/src/list/deprecated.js +84 -3
  320. package/src/list/edit.js +6 -3
  321. package/src/list/ordered-list-settings.js +20 -5
  322. package/src/list/save.js +10 -1
  323. package/src/list/test/edit.native.js +2 -4
  324. package/src/list/utils.js +22 -1
  325. package/src/navigation/block.json +4 -2
  326. package/src/navigation/constants.js +1 -0
  327. package/src/navigation/index.php +85 -123
  328. package/src/navigation/view.js +192 -96
  329. package/src/navigation-link/edit.js +21 -36
  330. package/src/navigation-link/editor.scss +0 -8
  331. package/src/navigation-link/transforms.js +22 -0
  332. package/src/page-list/edit.js +2 -1
  333. package/src/paragraph/editor.scss +5 -0
  334. package/src/paragraph/style.scss +5 -0
  335. package/src/pattern/index.php +2 -2
  336. package/src/post-comments-form/edit.js +10 -0
  337. package/src/post-comments-form/form.js +7 -1
  338. package/src/post-content/block.json +3 -0
  339. package/src/post-content/edit.js +14 -6
  340. package/src/post-excerpt/index.php +2 -2
  341. package/src/post-featured-image/index.php +2 -2
  342. package/src/post-featured-image/overlay.js +1 -0
  343. package/src/post-navigation-link/index.php +5 -1
  344. package/src/post-navigation-link/style.scss +4 -0
  345. package/src/post-template/index.php +1 -1
  346. package/src/post-terms/index.php +5 -2
  347. package/src/post-terms/use-post-terms.js +4 -2
  348. package/src/preformatted/edit.js +5 -0
  349. package/src/preformatted/index.js +1 -1
  350. package/src/pullquote/deprecated.js +8 -13
  351. package/src/query/edit/enhanced-pagination-modal.js +65 -0
  352. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +49 -0
  353. package/src/query/edit/inspector-controls/index.js +9 -45
  354. package/src/query/edit/query-content.js +8 -0
  355. package/src/query/editor.scss +10 -0
  356. package/src/query/index.php +29 -16
  357. package/src/query/style.scss +2 -2
  358. package/src/query/utils.js +22 -0
  359. package/src/query/view.js +5 -5
  360. package/src/query-pagination-next/index.php +1 -1
  361. package/src/query-pagination-previous/index.php +1 -1
  362. package/src/reset.scss +1 -1
  363. package/src/search/block.json +1 -0
  364. package/src/search/index.php +45 -4
  365. package/src/search/test/__snapshots__/edit.native.js.snap +265 -363
  366. package/src/search/view.js +70 -169
  367. package/src/social-link/edit.native.js +1 -1
  368. package/src/social-link/editor.native.scss +4 -0
  369. package/src/table/edit.js +21 -19
  370. package/src/table-of-contents/block.json +2 -1
  371. package/src/table-of-contents/edit.js +5 -162
  372. package/src/table-of-contents/hooks.js +156 -0
  373. package/src/verse/edit.js +5 -0
  374. package/src/verse/index.js +1 -1
  375. package/src/verse/test/edit.native.js +2 -3
  376. package/build/file/view-interactivity.js +0 -22
  377. package/build/file/view-interactivity.js.map +0 -1
  378. package/build/image/view-interactivity.js.map +0 -1
  379. package/build/navigation/view-interactivity.js +0 -172
  380. package/build/navigation/view-interactivity.js.map +0 -1
  381. package/build/navigation/view-modal.js +0 -115
  382. package/build/navigation/view-modal.js.map +0 -1
  383. package/build-module/file/view-interactivity.js +0 -18
  384. package/build-module/file/view-interactivity.js.map +0 -1
  385. package/build-module/image/view-interactivity.js.map +0 -1
  386. package/build-module/navigation/view-interactivity.js +0 -169
  387. package/build-module/navigation/view-interactivity.js.map +0 -1
  388. package/build-module/navigation/view-modal.js +0 -112
  389. package/build-module/navigation/view-modal.js.map +0 -1
  390. package/src/file/view-interactivity.js +0 -18
  391. package/src/navigation/view-interactivity.js +0 -196
  392. package/src/navigation/view-modal.js +0 -127
  393. /package/src/image/{view-interactivity.js → view.js} +0 -0
@@ -12,6 +12,7 @@ import {
12
12
  store as blockEditorStore,
13
13
  } from '@wordpress/block-editor';
14
14
  import { useSelect } from '@wordpress/data';
15
+ import { store as blocksStore } from '@wordpress/blocks';
15
16
 
16
17
  /**
17
18
  * Internal dependencies
@@ -42,17 +43,26 @@ function ButtonsEdit( { attributes, className } ) {
42
43
  'has-custom-font-size': fontSize || style?.typography?.fontSize,
43
44
  } ),
44
45
  } );
45
- const preferredStyle = useSelect( ( select ) => {
46
+ const { preferredStyle, hasButtonVariations } = useSelect( ( select ) => {
46
47
  const preferredStyleVariations =
47
48
  select( blockEditorStore ).getSettings()
48
49
  .__experimentalPreferredStyleVariations;
49
- return preferredStyleVariations?.value?.[ buttonBlockName ];
50
+ const buttonVariations = select( blocksStore ).getBlockVariations(
51
+ buttonBlockName,
52
+ 'inserter'
53
+ );
54
+ return {
55
+ preferredStyle:
56
+ preferredStyleVariations?.value?.[ buttonBlockName ],
57
+ hasButtonVariations: buttonVariations.length > 0,
58
+ };
50
59
  }, [] );
51
60
 
52
61
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
53
62
  allowedBlocks: ALLOWED_BLOCKS,
54
63
  defaultBlock: DEFAULT_BLOCK,
55
- directInsert: true,
64
+ // This check should be handled by the `Inserter` internally to be consistent across all blocks that use it.
65
+ directInsert: ! hasButtonVariations,
56
66
  template: [
57
67
  [
58
68
  buttonBlockName,
@@ -55,9 +55,10 @@ describe( 'Buttons block', () => {
55
55
 
56
56
  // onLayout event has to be explicitly dispatched in BlockList component,
57
57
  // otherwise the inner blocks are not rendered.
58
- const innerBlockListWrapper = await within(
59
- buttonsBlock
60
- ).findByTestId( 'block-list-wrapper' );
58
+ const innerBlockListWrapper =
59
+ await within( buttonsBlock ).findByTestId(
60
+ 'block-list-wrapper'
61
+ );
61
62
  fireEvent( innerBlockListWrapper, 'layout', {
62
63
  nativeEvent: {
63
64
  layout: {
@@ -66,19 +67,18 @@ describe( 'Buttons block', () => {
66
67
  },
67
68
  } );
68
69
 
69
- const [ buttonInnerBlock ] = await within(
70
- buttonsBlock
71
- ).findAllByLabelText( /Button Block\. Row 1/ );
70
+ const [ buttonInnerBlock ] =
71
+ await within( buttonsBlock ).findAllByLabelText(
72
+ /Button Block\. Row 1/
73
+ );
72
74
  fireEvent.press( buttonInnerBlock );
73
75
 
74
- const settingsButton = await editor.findByLabelText(
75
- 'Open Settings'
76
- );
76
+ const settingsButton =
77
+ await editor.findByLabelText( 'Open Settings' );
77
78
  fireEvent.press( settingsButton );
78
79
 
79
- const radiusStepper = await editor.findByLabelText(
80
- /Border Radius/
81
- );
80
+ const radiusStepper =
81
+ await editor.findByLabelText( /Border Radius/ );
82
82
 
83
83
  const incrementButton = await within( radiusStepper ).findByTestId(
84
84
  'Increment',
@@ -98,9 +98,10 @@ describe( 'Buttons block', () => {
98
98
  const buttonsBlock = await getBlock( screen, 'Buttons' );
99
99
 
100
100
  // Trigger inner blocks layout
101
- const innerBlockListWrapper = await within(
102
- buttonsBlock
103
- ).findByTestId( 'block-list-wrapper' );
101
+ const innerBlockListWrapper =
102
+ await within( buttonsBlock ).findByTestId(
103
+ 'block-list-wrapper'
104
+ );
104
105
  fireEvent( innerBlockListWrapper, 'layout', {
105
106
  nativeEvent: {
106
107
  layout: {
@@ -119,9 +120,10 @@ describe( 'Buttons block', () => {
119
120
  fireEvent.press( appenderButton );
120
121
 
121
122
  // Check for new button
122
- const [ secondButtonBlock ] = await within(
123
- buttonsBlock
124
- ).findAllByLabelText( /Button Block\. Row 2/ );
123
+ const [ secondButtonBlock ] =
124
+ await within( buttonsBlock ).findAllByLabelText(
125
+ /Button Block\. Row 2/
126
+ );
125
127
  expect( secondButtonBlock ).toBeVisible();
126
128
 
127
129
  // Add a Paragraph block using the empty placeholder at the bottom
@@ -148,9 +150,10 @@ describe( 'Buttons block', () => {
148
150
  fireEvent.press( buttonsBlock );
149
151
 
150
152
  // Trigger inner blocks layout
151
- const innerBlockListWrapper = await within(
152
- buttonsBlock
153
- ).findByTestId( 'block-list-wrapper' );
153
+ const innerBlockListWrapper =
154
+ await within( buttonsBlock ).findByTestId(
155
+ 'block-list-wrapper'
156
+ );
154
157
  fireEvent( innerBlockListWrapper, 'layout', {
155
158
  nativeEvent: {
156
159
  layout: {
@@ -207,9 +210,10 @@ describe( 'Buttons block', () => {
207
210
  const buttonsBlock = await getBlock( screen, 'Buttons' );
208
211
 
209
212
  // Trigger inner blocks layout
210
- const innerBlockListWrapper = await within(
211
- buttonsBlock
212
- ).findByTestId( 'block-list-wrapper' );
213
+ const innerBlockListWrapper =
214
+ await within( buttonsBlock ).findByTestId(
215
+ 'block-list-wrapper'
216
+ );
213
217
  fireEvent( innerBlockListWrapper, 'layout', {
214
218
  nativeEvent: {
215
219
  layout: {
@@ -44,12 +44,12 @@ function render_block_core_calendar( $attributes ) {
44
44
 
45
45
  // Text color.
46
46
  $preset_text_color = array_key_exists( 'textColor', $attributes ) ? "var:preset|color|{$attributes['textColor']}" : null;
47
- $custom_text_color = _wp_array_get( $attributes, array( 'style', 'color', 'text' ), null );
47
+ $custom_text_color = $attributes['style']['color']['text'] ?? null;
48
48
  $color_block_styles['text'] = $preset_text_color ? $preset_text_color : $custom_text_color;
49
49
 
50
50
  // Background Color.
51
51
  $preset_background_color = array_key_exists( 'backgroundColor', $attributes ) ? "var:preset|color|{$attributes['backgroundColor']}" : null;
52
- $custom_background_color = _wp_array_get( $attributes, array( 'style', 'color', 'background' ), null );
52
+ $custom_background_color = $attributes['style']['color']['background'] ?? null;
53
53
  $color_block_styles['background'] = $preset_background_color ? $preset_background_color : $custom_background_color;
54
54
 
55
55
  // Generate color styles and classes.
@@ -10,7 +10,8 @@
10
10
  "content": {
11
11
  "type": "string",
12
12
  "source": "html",
13
- "selector": "code"
13
+ "selector": "code",
14
+ "__unstablePreserveWhiteSpace": true
14
15
  }
15
16
  },
16
17
  "supports": {
package/src/code/edit.js CHANGED
@@ -3,20 +3,32 @@
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import { RichText, useBlockProps } from '@wordpress/block-editor';
6
+ import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
6
7
 
7
- export default function CodeEdit( { attributes, setAttributes, onRemove } ) {
8
+ export default function CodeEdit( {
9
+ attributes,
10
+ setAttributes,
11
+ onRemove,
12
+ insertBlocksAfter,
13
+ mergeBlocks,
14
+ } ) {
8
15
  const blockProps = useBlockProps();
9
16
  return (
10
17
  <pre { ...blockProps }>
11
18
  <RichText
12
19
  tagName="code"
20
+ identifier="content"
13
21
  value={ attributes.content }
14
22
  onChange={ ( content ) => setAttributes( { content } ) }
15
23
  onRemove={ onRemove }
24
+ onMerge={ mergeBlocks }
16
25
  placeholder={ __( 'Write code…' ) }
17
26
  aria-label={ __( 'Code' ) }
18
27
  preserveWhiteSpace
19
28
  __unstablePastePlainText
29
+ __unstableOnSplitAtDoubleLineEnd={ () =>
30
+ insertBlocksAfter( createBlock( getDefaultBlockName() ) )
31
+ }
20
32
  />
21
33
  </pre>
22
34
  );
package/src/code/index.js CHANGED
@@ -29,6 +29,11 @@ export const settings = {
29
29
  /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
30
30
  },
31
31
  },
32
+ merge( attributes, attributesToMerge ) {
33
+ return {
34
+ content: attributes.content + '\n\n' + attributesToMerge.content,
35
+ };
36
+ },
32
37
  transforms,
33
38
  edit,
34
39
  save,
@@ -30,6 +30,7 @@
30
30
  "color": {
31
31
  "gradients": true,
32
32
  "heading": true,
33
+ "button": true,
33
34
  "link": true,
34
35
  "__experimentalDefaultControls": {
35
36
  "background": true,
@@ -111,10 +111,10 @@ function ColumnEdit( {
111
111
  };
112
112
 
113
113
  const renderAppender = useCallback( () => {
114
- const { width: columnWidth } = contentStyle[ clientId ];
115
- const isFullWidth = columnWidth === screenWidth;
116
-
117
114
  if ( isSelected ) {
115
+ const { width: columnWidth } = contentStyle[ clientId ] || {};
116
+ const isFullWidth = columnWidth === screenWidth;
117
+
118
118
  return (
119
119
  <View
120
120
  style={ [
@@ -133,7 +133,7 @@ function ColumnEdit( {
133
133
  );
134
134
  }
135
135
  return null;
136
- }, [ contentStyle[ clientId ], screenWidth, isSelected, hasChildren ] );
136
+ }, [ contentStyle, clientId, screenWidth, isSelected, hasChildren ] );
137
137
 
138
138
  if ( ! isSelected && ! hasChildren ) {
139
139
  return (
@@ -26,6 +26,8 @@
26
26
  "color": {
27
27
  "gradients": true,
28
28
  "link": true,
29
+ "heading": true,
30
+ "button": true,
29
31
  "__experimentalDefaultControls": {
30
32
  "background": true,
31
33
  "text": true
@@ -82,6 +82,20 @@ exports[`Columns block sets current vertical alignment on new Columns 1`] = `
82
82
  <!-- /wp:columns -->"
83
83
  `;
84
84
 
85
+ exports[`Columns block transforms a nested Columns block into a Group block 1`] = `
86
+ "<!-- wp:group {"layout":{"type":"constrained"}} -->
87
+ <div class="wp-block-group"><!-- wp:group {"layout":{"type":"constrained"}} -->
88
+ <div class="wp-block-group"><!-- wp:columns -->
89
+ <div class="wp-block-columns"><!-- wp:column {"width":"100%"} -->
90
+ <div class="wp-block-column" style="flex-basis:100%"><!-- wp:paragraph -->
91
+ <p></p>
92
+ <!-- /wp:paragraph --></div>
93
+ <!-- /wp:column --></div>
94
+ <!-- /wp:columns --></div>
95
+ <!-- /wp:group --></div>
96
+ <!-- /wp:group -->"
97
+ `;
98
+
85
99
  exports[`Columns block when using columns percentage mechanism sets custom values correctly 1`] = `
86
100
  "<!-- wp:columns -->
87
101
  <div class="wp-block-columns"><!-- wp:column {"width":"90%"} -->
@@ -4,14 +4,16 @@
4
4
  import {
5
5
  act,
6
6
  addBlock,
7
+ dismissModal,
7
8
  fireEvent,
9
+ getBlock,
8
10
  getEditorHtml,
9
11
  initializeEditor,
12
+ openBlockActionsMenu,
10
13
  openBlockSettings,
11
- within,
12
- getBlock,
13
- dismissModal,
14
+ screen,
14
15
  waitForModalVisible,
16
+ within,
15
17
  } from 'test/helpers';
16
18
 
17
19
  /**
@@ -43,7 +45,7 @@ afterAll( () => {
43
45
 
44
46
  describe( 'Columns block', () => {
45
47
  it( 'inserts block', async () => {
46
- const screen = await initializeEditor();
48
+ await initializeEditor();
47
49
 
48
50
  // Add block
49
51
  await addBlock( screen, 'Columns' );
@@ -55,7 +57,7 @@ describe( 'Columns block', () => {
55
57
  } );
56
58
 
57
59
  it( 'adds a column block using the appender', async () => {
58
- const screen = await initializeEditor( {
60
+ await initializeEditor( {
59
61
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
60
62
  } );
61
63
 
@@ -73,7 +75,7 @@ describe( 'Columns block', () => {
73
75
 
74
76
  describe( 'when using the number of columns setting', () => {
75
77
  it( 'adds a column block when incrementing the value', async () => {
76
- const screen = await initializeEditor( {
78
+ await initializeEditor( {
77
79
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
78
80
  } );
79
81
  const { getByLabelText } = screen;
@@ -95,7 +97,7 @@ describe( 'Columns block', () => {
95
97
  } );
96
98
 
97
99
  it( 'adds at least 15 Column blocks without limitation', async () => {
98
- const screen = await initializeEditor( {
100
+ await initializeEditor( {
99
101
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
100
102
  } );
101
103
  const { getByLabelText } = screen;
@@ -120,7 +122,7 @@ describe( 'Columns block', () => {
120
122
  } );
121
123
 
122
124
  it( 'removes a column block when decrementing the value', async () => {
123
- const screen = await initializeEditor( {
125
+ await initializeEditor( {
124
126
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
125
127
  } );
126
128
  const { getByLabelText } = screen;
@@ -142,7 +144,7 @@ describe( 'Columns block', () => {
142
144
  } );
143
145
 
144
146
  it( 'reaches the minimum limit of number of column blocks', async () => {
145
- const screen = await initializeEditor();
147
+ await initializeEditor();
146
148
 
147
149
  // Add block
148
150
  await addBlock( screen, 'Columns' );
@@ -185,7 +187,7 @@ describe( 'Columns block', () => {
185
187
  } );
186
188
 
187
189
  it( 'removes column with the remove button', async () => {
188
- const screen = await initializeEditor( {
190
+ await initializeEditor( {
189
191
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
190
192
  } );
191
193
  const { getByLabelText } = screen;
@@ -210,7 +212,7 @@ describe( 'Columns block', () => {
210
212
  } );
211
213
 
212
214
  it( 'removes the only one left Column with the remove button', async () => {
213
- const screen = await initializeEditor( {
215
+ await initializeEditor( {
214
216
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
215
217
  } );
216
218
  const { getByLabelText } = screen;
@@ -247,7 +249,7 @@ describe( 'Columns block', () => {
247
249
  } );
248
250
 
249
251
  it( 'changes vertical alignment on Columns', async () => {
250
- const screen = await initializeEditor( {
252
+ await initializeEditor( {
251
253
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
252
254
  } );
253
255
  const { getByLabelText } = screen;
@@ -270,7 +272,7 @@ describe( 'Columns block', () => {
270
272
  } );
271
273
 
272
274
  it( 'changes the vertical alignment on individual Column', async () => {
273
- const screen = await initializeEditor( {
275
+ await initializeEditor( {
274
276
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
275
277
  } );
276
278
 
@@ -308,7 +310,7 @@ describe( 'Columns block', () => {
308
310
  } );
309
311
 
310
312
  it( 'sets current vertical alignment on new Columns', async () => {
311
- const screen = await initializeEditor( {
313
+ await initializeEditor( {
312
314
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
313
315
  } );
314
316
  const { getByLabelText } = screen;
@@ -337,7 +339,7 @@ describe( 'Columns block', () => {
337
339
 
338
340
  describe( 'when using columns percentage mechanism', () => {
339
341
  it( "updates the slider's input value", async () => {
340
- const screen = await initializeEditor();
342
+ await initializeEditor();
341
343
 
342
344
  // Add block
343
345
  await addBlock( screen, 'Columns' );
@@ -377,7 +379,7 @@ describe( 'Columns block', () => {
377
379
  } );
378
380
 
379
381
  it( 'sets custom values correctly', async () => {
380
- const screen = await initializeEditor( {
382
+ await initializeEditor( {
381
383
  initialHtml: TWO_COLUMNS_BLOCK_HTML,
382
384
  } );
383
385
  const { getByLabelText, getByTestId } = screen;
@@ -443,7 +445,7 @@ describe( 'Columns block', () => {
443
445
  test.each( testData )(
444
446
  'sets the predefined percentages for %s',
445
447
  async ( layout ) => {
446
- const screen = await initializeEditor();
448
+ await initializeEditor();
447
449
 
448
450
  // Add block
449
451
  await addBlock( screen, 'Columns' );
@@ -463,4 +465,32 @@ describe( 'Columns block', () => {
463
465
  }
464
466
  );
465
467
  } );
468
+
469
+ it( 'transforms a nested Columns block into a Group block', async () => {
470
+ await initializeEditor( {
471
+ initialHtml: `<!-- wp:group {"layout":{"type":"constrained"}} -->
472
+ <div class="wp-block-group"><!-- wp:columns -->
473
+ <div class="wp-block-columns"><!-- wp:column {"width":"100%"} -->
474
+ <div class="wp-block-column" style="flex-basis:100%"><!-- wp:paragraph -->
475
+ <p></p>
476
+ <!-- /wp:paragraph --></div>
477
+ <!-- /wp:column --></div>
478
+ <!-- /wp:columns --></div>
479
+ <!-- /wp:group -->`,
480
+ } );
481
+
482
+ // Get Columns block
483
+ const columnsBlock = await getBlock( screen, 'Columns' );
484
+ fireEvent.press( columnsBlock );
485
+
486
+ // Open block actions menu
487
+ await openBlockActionsMenu( screen );
488
+
489
+ // Tap on the Transform block button
490
+ fireEvent.press( screen.getByLabelText( /Transform block…/ ) );
491
+
492
+ // Tap on the Group transform button
493
+ fireEvent.press( screen.getByLabelText( 'Group' ) );
494
+ expect( getEditorHtml() ).toMatchSnapshot();
495
+ } );
466
496
  } );
@@ -28,7 +28,7 @@ function block_core_comment_template_render_comments( $comments, $block ) {
28
28
  $content = '';
29
29
  foreach ( $comments as $comment ) {
30
30
  $comment_id = $comment->comment_ID;
31
- $filter_block_context = static function( $context ) use ( $comment_id ) {
31
+ $filter_block_context = static function ( $context ) use ( $comment_id ) {
32
32
  $context['commentId'] = $comment_id;
33
33
  return $context;
34
34
  };
@@ -26,7 +26,7 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo
26
26
  $label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
27
27
  $pagination_arrow = get_comments_pagination_arrow( $block, 'next' );
28
28
 
29
- $filter_link_attributes = static function() {
29
+ $filter_link_attributes = static function () {
30
30
  return get_block_wrapper_attributes();
31
31
  };
32
32
  add_filter( 'next_comments_link_attributes', $filter_link_attributes );
@@ -22,7 +22,7 @@ function render_block_core_comments_pagination_previous( $attributes, $content,
22
22
  $label = $pagination_arrow . $label;
23
23
  }
24
24
 
25
- $filter_link_attributes = static function() {
25
+ $filter_link_attributes = static function () {
26
26
  return get_block_wrapper_attributes();
27
27
  };
28
28
  add_filter( 'previous_comments_link_attributes', $filter_link_attributes );
@@ -171,8 +171,19 @@
171
171
  &.has-custom-content-position.has-custom-content-position {
172
172
  .wp-block-cover__inner-container {
173
173
  margin: 0;
174
- width: auto;
175
174
  }
175
+ &.is-position-top-left,
176
+ &.is-position-top-right,
177
+ &.is-position-center-left,
178
+ &.is-position-center-right,
179
+ &.is-position-bottom-left,
180
+ &.is-position-bottom-right {
181
+ .wp-block-cover__inner-container {
182
+ margin: 0;
183
+ width: auto;
184
+ }
185
+ }
186
+
176
187
  }
177
188
 
178
189
  // Extra specificity for in edit mode where other styles would override it otherwise.
@@ -47,7 +47,7 @@ async function setup( attributes, useCoreBlocks, customSettings ) {
47
47
 
48
48
  async function createAndSelectBlock() {
49
49
  await userEvent.click(
50
- screen.getByRole( 'button', {
50
+ screen.getByRole( 'option', {
51
51
  name: 'Color: Black',
52
52
  } )
53
53
  );
@@ -72,7 +72,7 @@ describe( 'Cover block', () => {
72
72
 
73
73
  test( 'can set overlay color using color picker on block placeholder', async () => {
74
74
  const { container } = await setup();
75
- const colorPicker = screen.getByRole( 'button', {
75
+ const colorPicker = screen.getByRole( 'option', {
76
76
  name: 'Color: Black',
77
77
  } );
78
78
  await userEvent.click( colorPicker );
@@ -96,7 +96,7 @@ describe( 'Cover block', () => {
96
96
  await setup();
97
97
 
98
98
  await userEvent.click(
99
- screen.getByRole( 'button', {
99
+ screen.getByRole( 'option', {
100
100
  name: 'Color: Black',
101
101
  } )
102
102
  );
@@ -389,7 +389,7 @@ describe( 'Cover block', () => {
389
389
  describe( 'isDark settings', () => {
390
390
  test( 'should toggle is-light class if background changed from light to dark', async () => {
391
391
  await setup();
392
- const colorPicker = screen.getByRole( 'button', {
392
+ const colorPicker = screen.getByRole( 'option', {
393
393
  name: 'Color: White',
394
394
  } );
395
395
  await userEvent.click( colorPicker );
@@ -405,7 +405,7 @@ describe( 'Cover block', () => {
405
405
  } )
406
406
  );
407
407
  await userEvent.click( screen.getByText( 'Overlay' ) );
408
- const popupColorPicker = screen.getByRole( 'button', {
408
+ const popupColorPicker = screen.getByRole( 'option', {
409
409
  name: 'Color: Black',
410
410
  } );
411
411
  await userEvent.click( popupColorPicker );
@@ -413,7 +413,7 @@ describe( 'Cover block', () => {
413
413
  } );
414
414
  test( 'should remove is-light class if overlay color is removed', async () => {
415
415
  await setup();
416
- const colorPicker = screen.getByRole( 'button', {
416
+ const colorPicker = screen.getByRole( 'option', {
417
417
  name: 'Color: White',
418
418
  } );
419
419
  await userEvent.click( colorPicker );
@@ -428,7 +428,7 @@ describe( 'Cover block', () => {
428
428
  await userEvent.click( screen.getByText( 'Overlay' ) );
429
429
  // The default color is black, so clicking the black color option will remove the background color,
430
430
  // which should remove the isDark setting and assign the is-light class.
431
- const popupColorPicker = screen.getByRole( 'button', {
431
+ const popupColorPicker = screen.getByRole( 'option', {
432
432
  name: 'Color: White',
433
433
  } );
434
434
  await userEvent.click( popupColorPicker );
@@ -169,9 +169,8 @@ describe( 'when an image is attached', () => {
169
169
  />
170
170
  );
171
171
  fireEvent.press( screen.getByLabelText( 'Edit image' ) );
172
- const [ clearMediaButton ] = await screen.findAllByText(
173
- 'Clear Media'
174
- );
172
+ const [ clearMediaButton ] =
173
+ await screen.findAllByText( 'Clear Media' );
175
174
  fireEvent.press( clearMediaButton );
176
175
 
177
176
  expect( setAttributes ).toHaveBeenCalledWith(
@@ -191,9 +190,8 @@ describe( 'when an image is attached', () => {
191
190
  setAttributes={ setAttributes }
192
191
  />
193
192
  );
194
- const fixedBackgroundButton = await screen.findByText(
195
- 'Fixed background'
196
- );
193
+ const fixedBackgroundButton =
194
+ await screen.findByText( 'Fixed background' );
197
195
  fireEvent.press( fixedBackgroundButton );
198
196
 
199
197
  expect( setAttributes ).toHaveBeenCalledWith(
@@ -210,9 +208,8 @@ describe( 'when an image is attached', () => {
210
208
  setAttributes={ setAttributes }
211
209
  />
212
210
  );
213
- const editFocalPointButton = await screen.findByText(
214
- 'Edit focal point'
215
- );
211
+ const editFocalPointButton =
212
+ await screen.findByText( 'Edit focal point' );
216
213
  fireEvent.press( editFocalPointButton );
217
214
  fireEvent(
218
215
  screen.getByTestId( 'Slider Y-Axis Position', { hidden: true } ),
@@ -239,9 +236,8 @@ describe( 'when an image is attached', () => {
239
236
  setAttributes={ setAttributes }
240
237
  />
241
238
  );
242
- const editFocalPointButton = await screen.findByText(
243
- 'Edit focal point'
244
- );
239
+ const editFocalPointButton =
240
+ await screen.findByText( 'Edit focal point' );
245
241
  fireEvent.press( editFocalPointButton );
246
242
  fireEvent.press(
247
243
  screen.getByText( ( attributes.focalPoint.x * 100 ).toString(), {
@@ -268,9 +264,8 @@ describe( 'when an image is attached', () => {
268
264
  setAttributes={ setAttributes }
269
265
  />
270
266
  );
271
- const editFocalPointButton = await screen.findByText(
272
- 'Edit focal point'
273
- );
267
+ const editFocalPointButton =
268
+ await screen.findByText( 'Edit focal point' );
274
269
  fireEvent.press( editFocalPointButton );
275
270
  fireEvent.press(
276
271
  screen.getByText( ( attributes.focalPoint.x * 100 ).toString(), {
@@ -360,9 +355,8 @@ describe( 'color settings', () => {
360
355
  fireEvent.press( colorButton );
361
356
 
362
357
  // Wait for the block to be created.
363
- const [ coverBlockWithOverlay ] = await screen.findAllByLabelText(
364
- /Cover Block\. Row 1/
365
- );
358
+ const [ coverBlockWithOverlay ] =
359
+ await screen.findAllByLabelText( /Cover Block\. Row 1/ );
366
360
  fireEvent.press( coverBlockWithOverlay );
367
361
 
368
362
  // Open Block Settings.
@@ -399,9 +393,8 @@ describe( 'color settings', () => {
399
393
  } );
400
394
 
401
395
  // Wait for the block to be created.
402
- const [ coverBlock ] = await screen.findAllByLabelText(
403
- /Cover Block\. Row 1/
404
- );
396
+ const [ coverBlock ] =
397
+ await screen.findAllByLabelText( /Cover Block\. Row 1/ );
405
398
  fireEvent.press( coverBlock );
406
399
 
407
400
  // Open Block Settings.
@@ -455,9 +448,8 @@ describe( 'color settings', () => {
455
448
  fireEvent.press( colorButton );
456
449
 
457
450
  // Wait for the block to be created.
458
- const [ coverBlockWithOverlay ] = await screen.findAllByLabelText(
459
- /Cover Block\. Row 1/
460
- );
451
+ const [ coverBlockWithOverlay ] =
452
+ await screen.findAllByLabelText( /Cover Block\. Row 1/ );
461
453
  fireEvent.press( coverBlockWithOverlay );
462
454
 
463
455
  // Open Block Settings.
@@ -511,9 +503,8 @@ describe( 'color settings', () => {
511
503
  } );
512
504
 
513
505
  // Wait for the block to be created.
514
- const [ coverBlock ] = await screen.findAllByLabelText(
515
- /Cover Block\. Row 1/
516
- );
506
+ const [ coverBlock ] =
507
+ await screen.findAllByLabelText( /Cover Block\. Row 1/ );
517
508
  fireEvent.press( coverBlock );
518
509
 
519
510
  // Open Block Settings.