Skip to content

Commit

Permalink
Feedback changes
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-murugan committed Jan 21, 2025
1 parent ca67193 commit c03e8df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/latest-posts/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const MIN_EXCERPT_LENGTH = 10;
export const MAX_EXCERPT_LENGTH = 100;
export const MAX_POSTS_COLUMNS = 6;
export const DEFAULT_EXCERPT_LENGTH = 10;
export const DEFAULT_EXCERPT_LENGTH = 55;
6 changes: 4 additions & 2 deletions packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
</ToolsPanelItem>
{ displayPostContent && (
<ToolsPanelItem
hasValue={ () => !! displayPostContentRadio }
hasValue={ () => displayPostContentRadio !== 'excerpt' }
label={ __( 'Show' ) }
onDeselect={ () =>
setAttributes( {
Expand Down Expand Up @@ -293,7 +293,9 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
{ displayPostContent &&
displayPostContentRadio === 'excerpt' && (
<ToolsPanelItem
hasValue={ () => excerptLength !== undefined }
hasValue={ () =>
excerptLength !== DEFAULT_EXCERPT_LENGTH
}
label={ __( 'Max number of words' ) }
onDeselect={ () =>
setAttributes( {
Expand Down

0 comments on commit c03e8df

Please sign in to comment.