Skip to content

Commit

Permalink
Merge pull request #5546 from Automattic/update/make_course_categorie…
Browse files Browse the repository at this point in the history
…s_no_display_message_shorter

Remove block align to avoid error message have different width
  • Loading branch information
LavaGolem authored Aug 29, 2022
2 parents fc59870 + 2bdc7b7 commit f17d76e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/blocks/course-categories-block/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"blockGap": true
},
"textAlign": true,
"align": true,
"align": true,
"alignWide": true,
"typography": {
"lineHeight": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function CourseCategoryEdit( props ) {
defaultBackgroundColor,
defaultTextColor,
textColor,
setAttributes,
} = props;

const { textAlign, previewCategories } = attributes;
Expand Down Expand Up @@ -79,6 +80,7 @@ export function CourseCategoryEdit( props ) {
}

if ( 'course' !== postType ) {
setAttributes( { align: false } );
return (
<InvalidUsageError
message={ __(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ describe( 'CourseCategoryEdit', () => {
clientId="some-client-id"
attributes={ attributes }
context={ context }
setAttributes={ () => {} }
/>
);
categories.forEach( ( category ) =>
Expand All @@ -77,6 +78,7 @@ describe( 'CourseCategoryEdit', () => {
postId: 'some-post-id',
postType: 'page',
} }
setAttributes={ () => {} }
/>
);

Expand Down

0 comments on commit f17d76e

Please sign in to comment.