-
Notifications
You must be signed in to change notification settings - Fork 179
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
Blocks: Remove WP <5.5 compatibility code #7928
Conversation
Size Change: -220 B (0%) Total Size: 2.13 MB
ℹ️ View Unchanged
|
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.
Seems good but we should wait with merging to ensure the WP min level is set to 5.5 in code, too.
Would be good to send this to QA as well, to see if everything works as expected.
Ok, tested just now a little bit and I can see this for example when selecting stories:
Not sure if related or not -- all good in your local?
Absolutely. All tickets were created separately for this effort and set as blockers accordingly. |
This is broken on main from 5.3-5.7 :( I will create a create a follow up issue. |
Follow up issue #7991 |
This PR is blocked by #7926 |
@spacedmonkey The e2e tests seem to be consistently failing, thoughts? |
@@ -87,26 +81,11 @@ const EmbedControls = (props) => { | |||
<> | |||
<BlockControls> | |||
<ToolbarGroup> |
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.
Do wp.components.ToolbarGroup
and wp.components.ToolbarButton
exist in 5.5 already?
The e2e test failures seem to indicate otherwise.
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { BLOCK_TYPES } from '../constants'; | ||
|
||
function BlockTypeSwitcher({ selectedBlockType, setAttributes }) { | ||
// Note: ToolbarGroup and ToolbarButton are only available in Gutenberg 7.0 or later, | ||
// so they do not exist in WP 5.3. | ||
const ToolbarComponent = ToolbarGroup ? ToolbarGroup : Toolbar; |
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.
Do wp.components.ToolbarGroup
and wp.components.ToolbarButton
exist in 5.5 already?
The e2e test failures seem to indicate otherwise.
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.
Looks like it was added 5.6 - https://make.wordpress.org/core/2020/11/18/changes-to-toolbar-components-in-wordpress-5-6/ 🤦
// Note: Card, CardBody, CardMedia are only available in Gutenberg 7.0 or later, | ||
// so they do not exist in WP 5.3. | ||
const { | ||
Card = FallbackComponent, | ||
CardBody = FallbackComponent, | ||
CardMedia = FallbackComponent, |
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.
Doe they exist in WP 5.5 though?
@swissspidy Seems like all the components that have backfill are valid, as they were only added in 5.6. So for that reason I am going to close out this PR. |
Context
Summary
Remove backwards compatiliby workarounds to support WP 5.3
Relevant Technical Choices
To-do
User-facing changes
Testing Instructions
QA
This PR can be tested by following these steps:
UAT
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
Does this PR change what data or activity we track or use?
Does this PR have a legal-related impact?
Checklist
Type: XYZ
label to the PRFixes #7674