@@ -144,6 +144,13 @@ function convertKitGutenbergRegisterBlock(block) {
144144 label : field . label ,
145145 help : field . description ,
146146 value : props . attributes [ attribute ] ,
147+
148+ // Add __next40pxDefaultSize and __nextHasNoMarginBottom properties,
149+ // preventing deprecation notices in the block editor and opt in to the new styles
150+ // from 7.0.
151+ __next40pxDefaultSize : true ,
152+ __nextHasNoMarginBottom : true ,
153+
147154 onChange ( value ) {
148155 if ( field . type === 'number' ) {
149156 // If value is a blank string i.e. no attribute value was provided,
@@ -229,10 +236,18 @@ function convertKitGutenbergRegisterBlock(block) {
229236 [
230237 el (
231238 FlexItem ,
232- { } ,
239+ {
240+ key : attribute + '-select' ,
241+ } ,
233242 el ( SelectControl , fieldProperties )
234243 ) ,
235- el ( FlexItem , { } , inlineRefreshButton ( props ) ) ,
244+ el (
245+ FlexItem ,
246+ {
247+ key : attribute + '-refresh' ,
248+ } ,
249+ inlineRefreshButton ( props )
250+ ) ,
236251 ]
237252 ) ;
238253
@@ -509,9 +524,15 @@ function convertKitGutenbergRegisterBlock(block) {
509524 } else {
510525 // Refresh button enabled; display the notice, link and button.
511526 elements = [
512- ! block . has_access_token
513- ? block . no_access_token . notice
514- : block . no_resources . notice ,
527+ el (
528+ 'div' ,
529+ {
530+ key : props . clientId + '-notice' ,
531+ } ,
532+ ! block . has_access_token
533+ ? block . no_access_token . notice
534+ : block . no_resources . notice
535+ ) ,
515536 noticeLink ( props , setButtonDisabled ) ,
516537 refreshButton ( props , buttonDisabled , setButtonDisabled ) ,
517538 ] ;
0 commit comments