fix: resolve WP 7.0 / Gutenberg editor deprecations#2876
Conversation
Editor console deprecations surfaced under WP 7.0 / Gutenberg, fixed across lite and pro: - captcha: Block API v2 -> v3 (6.9) - options sidebar: import PluginSidebar/PluginSidebarMoreMenuItem from @wordpress/editor (6.6) - otter-store: registerGenericStore -> createReduxStore + register (5.9) - preferences: read/write hiddenBlockTypes under the 'core' scope (6.5) - device type: core/editor getDeviceType/setDeviceType instead of core/edit-post __experimentalGetPreviewDeviceType (6.5) - toolbar controls: use ToolbarButton; mark the Design Library header button as a toolbar item (5.6) - interface scope: enableComplementaryArea( 'core', ... ) not 'core/edit-post' (6.6) - date: getSettings instead of __experimentalGetSettings (6.1) - icon-list item: RichText onSplit -> block.json supports.splitting (6.4) - FormFileUpload: opt into __next40pxDefaultSize (6.8 / removal 7.1) - countdown: fix malformed timezone offset (+0:0) fed into moment(), which forced a fallback to the JS Date constructor Deferred, documented: advanced-heading onSplit (core splitting would convert the styled heading tail to a plain paragraph) and the broad TextControl 40px migration (tracked separately, removal in 7.1). Tests: - unit: getTimezone returns a valid ISO 8601 offset (red->green) - e2e: icon-list splits into same-type items on Enter (guards the onSplit -> supports.splitting migration) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bundle Size Diff
|
|
Plugin build for 70678db is ready 🛎️!
|
E2E TestsPlaywright Test Status: See serial and parallel matrix jobs Performance ResultsserverResponse: {"q25":484.9,"q50":504.4,"q75":516.7,"cnt":10}, firstPaint: {"q25":1344.3,"q50":1533.1,"q75":1682.1,"cnt":10}, domContentLoaded: {"q25":3827.3,"q50":3840.65,"q75":3865.8,"cnt":10}, loaded: {"q25":3829.1,"q50":3842.6,"q75":3867.7,"cnt":10}, firstContentfulPaint: {"q25":4365,"q50":4378.5,"q75":4397.3,"cnt":10}, firstBlock: {"q25":15265.4,"q50":15405.15,"q75":15567.6,"cnt":10}, type: {"q25":29.22,"q50":31.95,"q75":36.1,"cnt":10}, typeWithoutInspector: {"q25":28.1,"q50":28.98,"q75":30.41,"cnt":10}, typeWithTopToolbar: {"q25":38.39,"q50":40,"q75":43,"cnt":10}, typeContainer: {"q25":19.3,"q50":21.47,"q75":23.27,"cnt":10}, focus: {"q25":149.76,"q50":152.73,"q75":160.68,"cnt":10}, inserterOpen: {"q25":45.71,"q50":50.4,"q75":54.53,"cnt":10}, inserterSearch: {"q25":18.72,"q50":19.84,"q75":21.19,"cnt":10}, inserterHover: {"q25":5.89,"q50":6.49,"q75":7.32,"cnt":20}, loadPatterns: {"q25":1959.28,"q50":2003.01,"q75":2040.02,"cnt":10}, listViewOpen: {"q25":254.62,"q50":270.71,"q75":288.93,"cnt":10} |
Remove redundant test assertions and helpers, simplify section device-type selectors and the otter-store action types, and shorten the OpenAI e2e stub. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the legacy wp-scripts/Puppeteer uniq-id spec with a Playwright test and drop the broken test:e2e:blockId npm script. Co-authored-by: Cursor <cursoragent@cursor.com>
Return memoized responsive helpers from a primitive view selector so useSelect no longer warns about changing return values. Add e2e coverage for per-device align without console warnings. Co-authored-by: Cursor <cursoragent@cursor.com>
Guard dashboard block visibility, responsive device attributes, form captcha v3 canvas, and toolbar migrations; fix countdown plural label assertion that failed CI. Co-authored-by: Cursor <cursoragent@cursor.com>
Fix jsdoc/check-line-alignment lint error that failed the JS Test CI job. Co-authored-by: Cursor <cursoragent@cursor.com>
abaicus
left a comment
There was a problem hiding this comment.
@Soare-Robert-Daniel looks fine. Can you maybe provide some comprehensive testing steps so @poonam279 could do some smoke-testing on this (i.e. a list of which blocks to check, what to test when migrating to an older version to this - what should not break, which versions to test with, etc).
@poonam279 after Robert provides some testing steps we can do a quick sweep to make sure nothing breaks when migrating from an older version, using the changed blocks, etc.
|
@poonam279 here are the steps. Most of them are covered by E2E tests so you can check mostly if we have an unexpected crash. Testing stepsSetup
1. Otter sidebar
2. Posts block (otter store)
3. Hidden blocks (Dashboard → Blocks)
4. Responsive controls (Desktop / Tablet / Mobile)
5. Toolbar buttons (Button → ToolbarButton)For each, the button should look normal in the toolbar, be reachable with keyboard arrows, and work:
6. Countdown & dates
7. Icon List splitting
8. Export / Import
Migration check (old version → this build)
Versions
|
- otter-sidebar: sidebar opens from the pinned button, Options menu, and "Manage Default Tools" — asserts the 'core' complementary-area scope - posts: otter-store (createReduxStore migration) actions/selectors round-trip and notify subscribers - export-import: export-as-JSON → importer FormFileUpload round-trip - heading: "Typography Settings" toolbar dropdown (ToolbarButton swap) - google-map: "Block Styles" style-switcher applies a style from the toolbar Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@Soare-Robert-Daniel, I have tested this PR, and everything is working fine except these:
Admin area URL: https://whipseat.s6-tastewp.com/wp-admin https://whipseat.s6-tastewp.com/wp-admin/post.php?post=6&action=edit |
This was a bit misspelled. There were some underlying function changes regarding the retrieval of data, and it should work like before without missing or duplicated posts.
This should be fixed now. It was a very odd issue in the build system. cc @poonam279 |
# Conflicts: # src/blocks/helpers/utility-hooks.js # src/blocks/plugins/ai-content/index.tsx
Summary
Resolves the editor-console deprecation warnings that surface under WP 7.0 / Gutenberg, across both the lite and pro bundles. Each fix targets the documented stable replacement; behavior is preserved.
wp.editPost.PluginSidebar/PluginSidebarMoreMenuItem@wordpress/editorwp.data.registerGenericStore(otter-store)createReduxStore+registercore/preferenceshiddenBlockTypesnamespacecorescope__experimentalGetPreviewDeviceType(core/edit-post)core/editorgetDeviceType/setDeviceType(section blocks, responsive control, CSS injector, global defaults, pro plugins)ToolbarButton;data-toolbar-itemon the Design Library header buttoncore/edit-postinterface scopeenableComplementaryArea( 'core', … )wp.date.__experimentalGetSettingsgetSettingsRichTextonSplit(icon-list item)block.jsonsupports.splittingFormFileUpload36px default__next40pxDefaultSize(export/import)momentmalformed timezone offset (countdown)getTimezone()to emit a valid ISO±HH:MMoffsetDeferred (documented, intentional)
onSplit— coresupports.splittingconverts a heading's split tail to a plaincore/paragraph, dropping all heading styling. Left as-is to avoid a real regression; needs a style-preserving transform.TextControl40px migration — broad, plugin-wide; tracked separately. Has a hard 7.1 removal.Test plan
helper-functions-timezone.test.ts):getTimezone()returns a valid ISO 8601 offset for UTC, whole, negative, and fractional offsets — genuine red (+0:0) → green.icon-list.spec.js): pressing Enter mid-text splits an item into two same-type icon-list items with the content divided at the caret — guards theonSplit→supports.splittingmigration.phpstanclean;lintclean.Follow-up cleanup (
171b9632)No behavior change — trims redundant e2e assertions/helpers, simplifies section device-type selectors and otter-store action types, and shortens the OpenAI e2e stub.