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 |
ntsekouras
left a comment
There was a problem hiding this comment.
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.
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.
keepPlaceholderOnFocus property could be useful here..
|
|
||
| $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.
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 ?