Skip to content
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

Rich text: log deprecation message for multiline prop #43613

Merged
merged 3 commits into from
Aug 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/block-editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ function RichTextWrapper(
},
forwardedRef
) {
if ( multiline ) {
deprecated( 'wp.blockEditor.RichText multiline prop', {
since: '14.1',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Searching through the codebase, I'd say the convention is to use WP versions here. The only two instances of Gutenberg version numbers (12.6 and 12.7) are in deprecated calls with the accompanying plugin: 'Gutenberg' option.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Adjusted it to use WP version numbers and added a version prop.

alternative: 'nested blocks (InnerBlocks)',
link: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/',
} );
}

const instanceId = useInstanceId( RichTextWrapper );

identifier = identifier || instanceId;
Expand Down