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

Non-plain-text block description is being deprecated in WordPress 6.2 #26792

Open
anomiex opened this issue Oct 12, 2022 · 3 comments
Open

Non-plain-text block description is being deprecated in WordPress 6.2 #26792

anomiex opened this issue Oct 12, 2022 · 3 comments
Assignees
Labels
[Block] AI Image [Block] AI Paragraph [Block] Blogging Prompt [Block] Markdown [Block] Pay With Paypal aka Simple Payments [Block] Payment Button aka Recurring Payments [Block] Payment Buttons [Block] Recipe [Block] Subscriptions [Feature] WordAds [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Platform] Atomic [Platform] Simple [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Escalated to Kitkat [Status] In Progress [Type] Bug When a feature is broken and / or not performing as intended

Comments

@anomiex
Copy link
Contributor

anomiex commented Oct 12, 2022

Impacted plugin

Jetpack

Steps to Reproduce

  1. Run Jetpack (or its extension tests) with a version of WordPress or the Gutenberg plugin that provides @wordpress/blocks 11.18.0 or later.
  2. See deprecation warnings.

Affected blocks are recurring-payments, subscriptions, simple-payments, and wordads.

A clear and concise description of what you expected to happen.

No deprecation warnings.

What actually happened

"Declaring non-string block descriptions is deprecated since version 6.2."

Browser

No response

Other information

No response

Platform (Simple, Atomic, or both?)

Simple, Atomic, Self-hosted

Reproducibility

Consistent

Severity

No response

Available workarounds?

No but the platform is still usable

Workaround details

No response

@anomiex anomiex added [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged [Feature] WordAds [Block] Payment Button aka Recurring Payments [Block] Subscriptions [Block] Pay With Paypal aka Simple Payments labels Oct 12, 2022
@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Platform] Atomic [Platform] Simple [Pri] High labels Oct 12, 2022
@kraftbj
Copy link
Contributor

kraftbj commented Oct 12, 2022

Asked on the Gutenberg PR what's the preferred way to pass a link into a description WordPress/gutenberg#44455 (comment)

@brbrr brbrr removed the Needs triage Ticket needs to be triaged label Jan 3, 2023
@jeherve
Copy link
Member

jeherve commented Mar 9, 2023

I've been looking into this, and I'm not sure what's the best approach we could take.

Remove the existing custom description

This would be the nuclear option. We would lose a lot of data for each block; we do use custom descriptions with multiple paragraphs and external links in at least 9 blocks in Jetpack at the moment. See #29757 for implementation.

Add a new panel to each block

We could manually add InspectorControls with a PanelBody to each one of the blocks where we have a custom description with a link, but this would separate our custom description from the default description.

We could extract this to Jetpack's registerJetpackBlock, by using the editor.BlockEdit filter to add a custom InspectorControls with a custom description to each block where a custom description was passed when registering the block.

However, this doesn't solve the above problem. More importantly, we do not have any control over the order of the panels in the sidebar, so our custom description may end up at the bottom of the sidebar, below other settings:

image

#29402 is one example of that.

Use a SlotFill

This would be nice, but there is no existing SlotFill in a location that wouldn't be completely separated from the default description. This is what was suggested in WordPress/gutenberg#44455 (comment)


@mtias Would you have any recommendations on this?

@jeherve jeherve added the [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack label Mar 21, 2023
jeherve added a commit that referenced this issue Mar 28, 2023
Closes #29402

Discussion: #26792

Until we have a better way to have custom descriptions for blocks, let's keep only strings to avoid notices.
@jeherve
Copy link
Member

jeherve commented Apr 18, 2023

Use a SlotFill

I created an issue in the Gutenberg repo to try to revive that conversation: WordPress/gutenberg#49887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] AI Image [Block] AI Paragraph [Block] Blogging Prompt [Block] Markdown [Block] Pay With Paypal aka Simple Payments [Block] Payment Button aka Recurring Payments [Block] Payment Buttons [Block] Recipe [Block] Subscriptions [Feature] WordAds [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Platform] Atomic [Platform] Simple [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Escalated to Kitkat [Status] In Progress [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants