-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added prepent text to tag block #30048
Conversation
Hey @Quintis1212 - thanks for working on this! Can you please setup linter/prettier (https://developer.wordpress.org/block-editor/contributors/code/getting-started-with-code-contribution/#developer-tools)? There are many whitespace changes introduced that are not needed :)
Also without checking thoroughly your code, if we introduce a new block attribute ( |
Hi @ntsekouras ) I installed prettier as you advised to me and add block to json file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following on this! If you've set up linter/prettier, please push the proper changes to make it easier to review and the CI happy :) (https://github.com/WordPress/gutenberg/pull/30048/checks?check_run_id=2207905167)
The direction is going is good though and we need some polishing here 👍
</BlockControls> | ||
<div { ...blockProps }> | ||
<RichText | ||
className="wp-block-post-author__byline" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to change to post-tags
block (wp-block-post-author__byline
-> wp-block-post-tags__byline
).
multiline={ false } | ||
aria-label={ __( 'Byline text' ) } | ||
placeholder={ __( 'Write byline…' ) } | ||
value={ byline } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keepPlaceholderOnFocus
property could be useful here..
@@ -33,7 +34,7 @@ function render_block_core_post_tags( $attributes, $content, $block ) { | |||
} | |||
|
|||
$output = trim( $output, ' | ' ); | |||
$output .= '</div>'; | |||
$output .= '</div>'.( ! empty( $byline ) ? '<p class="wp-block-post-author__byline">' . $byline . '</p>' : '' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
byline
output should be inside the block and before the list output, as is in the editor. Also the class name should be about post-tags
.
Hi! |
Hello ) This is an enhancement for "Category and tag blocks: Add option to prepend text" #29909 . I added Rich Text component to tag block , but it is not saving changes when I click publish and go to published page. Please , who can help me with saving changes ?