Single-page answer to "where is this plugin in the journey to a Gutenberg core PR, and what's next?" Written for future-you returning after a break, or a collaborator picking up the work.
Current branch: review/multiple-plugins
Last alignment commit: 5d956d4 (docs refresh after polish 1–4)
Status: Aligned + polished; pre-PR test gaps remain.
The plugin has completed a five-batch alignment pass plus a four-item polish pass. Public API matches Gutenberg conventions. The code is ready for a proposal-stage PR (RFC post, discussion, initial store + registration surface). It is not ready for a code-lands-in-core PR until the deferred test and performance items ship.
Three questions answer "what's next?":
- Are you drafting the RFC / proposal post? → You can start anytime. See PROPOSAL.md and INTEGRATION.md; those are the inputs.
- Are you cutting code changes into
gutenberg/? → Activate gutenberg-alignment/core-pr-migration.md. That doc is the checklist for translating the standalone plugin into core-style PHP + JS package. - Are you still finishing pre-PR polish on this standalone plugin? → See the "What's left" section below.
Five batches on review/multiple-plugins. See gutenberg-alignment/consolidated-plan.md for commit hashes and per-batch detail.
- Batch 1 — JS source reshape to Gutenberg package layout; hook-first lifecycle;
editor.preSavePostgate;useValidationIssues+useMetaFieldconsolidations;getInvalid*→useInvalid*; aliases dropped - Batch 2 — REST namespace →
wp-validation/v1/checks(plugin-owned; final core namespace TBD in review) - Batch 3 —
Core/I18n.phpdeleted,wp_set_script_translations()inlined - Batch 4 — ~260 LOC of PHP dead code removed (
Meta\Validator,Contracts/CheckProvider, orphan methods + hooks) - Batch 5 —
AbstractRegistryextracted; Block/Meta/Editor registries share defaults / validation / filter plumbing
- @example JSDoc on 13 public API entries — store selectors + actions +
useMetaField+useMetaValidation - TypeScript start —
src/store/constants.tswith typedState,ValidationIssue,BlockValidationResult,MetaValidationResult,ValidationMode,IssueType - Unit tests — 56 tests covering store (reducer, actions, selectors) +
issue-helpers. Run withpnpm test.
- PROPOSAL.md — RFC-style case for adding this to Gutenberg core
- INTEGRATION.md — Gutenberg landscape, component mapping, four-phase contribution plan
- technical/README.md — Current architecture (post-alignment)
- technical/data-flow.md — PHP → JS → UI data path
- technical/hooks.md — Every filter and action with parameters
- technical/api.md — Function signatures and arg shapes
- technical/decisions.md — Design-decision rationale
- guide/troubleshooting.md — Common issues + diagnostics
- gutenberg-alignment/core-pr-migration.md — Dormant checklist for when the PR branch is cut
Grouped by whether it blocks RFC-stage vs. code-landing-stage.
-
Unit tests for validation functions (Polish 5)
validateBlock,validateMetaField/validateAllMetaChecks,validateEditor. Requires mocking@wordpress/hooksfilters and editor-settings. Target:src/utils/__tests__/validate-*.test.js. -
Unit tests for custom hooks (Polish 5b)
useMetaField,useMetaValidation,useInvalidBlocks,useInvalidMeta,useInvalidEditorChecks,useValidationIssues,useDebouncedValidation,useValidationSync,useValidationLifecycle. Requires@testing-library/react+ store test harness. -
Performance benchmarks (Polish 6) 200 / 500 / 1000 blocks. Measure
useInvalidBlockscompute time, store-dispatch frequency, memory ofblockValidationslice. Core reviewers will ask — have answers ready. Outputs determine whether to add per-block diffing or lazy-validation pre-PR. -
E2E integration tests (Polish 7)
@wordpress/env+@wordpress/e2e-test-utils-playwright. Full flow: PHP registration → editor settings → JS validation → store dispatch → save-lock →editor.preSavePostgate. Gives reviewers a reproducible harness. -
Core-PR code translation (core-pr-migration checklist) PSR-4 → flat
WP_*classes, text domain,@sinceversions, CSS prefix, sidebar mount swap toComplementaryArea, Composer autoload →require_oncechain. Activate core-pr-migration.md when drafting.
The RFC post can land against the current standalone plugin as the reference implementation. Reviewers will read PROPOSAL.md, examine the plugin's code, and provide feedback on shape. Only the items above block the follow-up code PR into gutenberg/.
From INTEGRATION.md "Open Questions" section. Expect these to come up in the RFC discussion:
- Package home — Should
core/validationbe a new@wordpress/validationpackage, or merged into@wordpress/editor? block.jsonintegration — Should simple validation rules (required attributes, patterns) be declarable inblock.json?- Async validation — Ship with
applyFiltersAsyncsupport from day one, or add later? - Server-side enforcement — The plugin dropped its
Meta\Validatorhelper; consumers use the nativeregister_post_meta(..., 'validate_callback' => ...)pattern. Does core want a bundled helper, or leave this split? - Default checks — Should WordPress ship with any validation checks enabled by default, or strictly framework-only?
editor.preSavePostrelationship — The plugin useseditor.preSavePostas a belt-and-suspenders overlockPostSaving. Does core want to formalize both as complementary or pick one?- REST namespace —
wp/v2/validation-checksvswp-block-editor/v1/validation-checksvs newwp/v2/validationresource? - Site editor support — Currently excluded. Template validation is a related but separate problem; reviewers will ask if it's in scope.
Kept here as a reminder during drafting:
- Performance at scale — per-block debouncing + single
useValidationSynccomputation help; benchmarks are Polish 6 - API permanence — filter names and function signatures need careful review before they land; renaming post-merge requires deprecation cycles
- Scope creep — discussions may pull in content linting, accessibility auditing, editorial workflows. The framework/rules boundary must hold.
- Field API overlap — DataViews/DataForm has its own validation model (Gutenberg #71500). Coordination needed if that pattern expands.
- Site editor gap — current scope excludes site editor intentionally; not a blocker but will come up.
- Skim this doc and the commit log since you last touched the code:
git log --oneline review/multiple-plugins - Run
pnpm test— confirm 56 tests still pass - Activate the plugin in your local WP — confirm nothing regressed since the last verification
- Pick one of:
- If you want to draft the RFC: re-read PROPOSAL.md, INTEGRATION.md, post in Gutenberg GitHub discussions or Slack #core-editor
- If you want to chip away at pre-PR polish: pick one of Polish 5 / 5b / 6 / 7 from gutenberg-alignment/consolidated-plan.md deferred list
- If you want to draft the code PR: clone
gutenberg/trunk fresh, create a feature branch, open gutenberg-alignment/core-pr-migration.md as your checklist
| Item | Status | Commit |
|---|---|---|
| 5-batch alignment (plugin stays standalone-friendly) | ✅ Shipped | See consolidated-plan.md |
| @example JSDoc on public API | ✅ Shipped | 561e32a |
| TypeScript start (constants.ts + types) | ✅ Shipped | a228e5d |
| Jest unit tests (56 tests for store + issue-helpers) | ✅ Shipped | f78624e |
| Docs refresh / audit / PR-readiness | ✅ Shipped | this commit |
| Unit tests for validate-* functions | ⏳ Deferred | — |
| Unit tests for custom hooks | ⏳ Deferred | — |
| Performance benchmarks | ⏳ Deferred | — |
| E2E tests | ⏳ Deferred | — |
| Core-PR code translation | ⏳ Dormant | See core-pr-migration.md |