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 2 commits
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
9 changes: 9 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,15 @@ function RichTextWrapper(
},
forwardedRef
) {
if ( multiline ) {
deprecated( 'wp.blockEditor.RichText multiline prop', {
since: '6.1',
version: '6.2',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think 6.2 is way too close. Even though everything suggests that the multiline option was minimally used in the ecosystem, it has been part of a stable API for a long time.

For comparison, take the migration of classnames in 5.2 following the introduction of the block editor module. The classes were never even a public API, but we still gave it a year (which was very generous, IMO).

So I think 6.3 should be the absolute minimum.

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright :) I think it depends in how much it's communicated, but I agree that a bit longer is probably best.

ntsekouras marked this conversation as resolved.
Show resolved Hide resolved
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