WordPress / WordPress/block-development-examples
Normalization sweep across example plugins (apiVersion, wp-scripts, text domains, headers, leftover debug code)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 334
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Problem
The 30 example plugins have drifted apart in ways learners copy-paste. Found while auditing:
- apiVersion 2 stragglers (everything else is on 3):
editable-block-1b8c51/src/blocks/basic-editable-block-1b8c51,editable-block-1b8c51/src/blocks/enhanced-editable-block-1b8c51,interactive-blocks-demos-99def1/src/counter-web-component-99def1. Insideeditable-block-1b8c51the no-build sibling block is already on v3 — inconsistent within a single plugin. @wordpress/scriptsspread: baseline^27.8.0(26 plugins),server-side-render-block-d26119on^26.15.0, three plugins on^30.x. The baseline itself is ~3 majors behind.- Text domains: leftover create-block scaffold slugs
01-block-dynamic(block-dynamic-rendering-64756b) and02-block-static(block-static-rendering-b16608); divergent domains informat-api-f14b86,non-block-react-wp-data-56d6f3,editor-bindings(block-dev-ex),interactivity-router-2f43f8(bde_2f43f8__interactivity-router-beatles); and two plugins whose header and block.json textdomain disagree with each other (interactivity-router-2f43f8,my-first-interactive-block). - Plugin headers: five plugins missing
Requires at least/Requires PHP/Text Domain/License(basic-block-translations-3df23d,editable-block-1b8c51,minimal-block-ca6eda,minimal-block-no-build-e621a6,editor-bindings);Plugin Nameprefix varies (Block Development Examples -,WP Block Development Examples -,BDE -, none); someRequiresvalues are wrong-by-underclaim —interactivity-router-2f43f8declares WP 6.1 but uses the Interactivity API router (6.5+),interactive-blocks-demos-99def1declares WP 5.8 / PHP 5.6. - Debug leftovers in shipped source (and committed build/):
post-meta-modal-2502fb/src/index.js(console.log( 'sds' )),editor-bindings/src/index.js,slotfill-2fb190/src/index.js(×2),interactivity-router-2f43f8/src/view.js(×4). - Block namespace:
create-block/my-first-interactive-blockandtutorial/post-meta-testimonialvsblock-development-examples/*everywhere else. - package.json scripts: no two plugin families agree (14 plugins minimal
build/start/plugin-zip, 6 full create-block set with deadtest:*entries, oddballs);editor-bindingslacksplugin-zipentirely, so it silently drops out of the release zips.
Proposed approach: small stacked PRs
One tracking issue, one focused PR per concern, stacked for sequential merge:
- PR 1 — apiVersion 2 → 3 (3 block.json files + rebuild)
- PR 2 — align
@wordpress/scriptsto latest (^30) in all 30 plugins + root, rebuild everything (the build-freshness check from #149 verifies the rebuild) - PR 3 — text domains: normalize to
block-development-exampleseverywhere except tutorial-mirror plugins (my-first-interactive-block,post-meta-testimonial) which keep their tutorial-faithful domains but must be internally consistent (header == block.json). Includes the01-…/02-…scaffold slug cleanup; the eslintallowedTextDomainrule keeps it honest. - PR 4 — plugin headers: complete the five truncated headers, unify the
Block Development Examples -name prefix, correct wrongRequires at least/Requires PHPvalues (audit table in a comment below). - PR 5 — strip debug console.logs from src + rebuild.
- PR 6 — block namespaces to
block-development-examples/*(tutorial-mirror exception applies here too if fidelity requires it). - PR 7 — standardize plugin package.json scripts: minimal set
build/start/plugin-zipeverywhere (restoreseditor-bindingsto the release flow), drop deadtest:*/check-*scripts, alignversionfields.
Out of scope
- Directory renames / hash-suffix convention (separate issue, pending an inbound-link audit).
_data/*.jsonmetadata fixes (separate issue).- e2e (#147), CI (#148), build policy (#149).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the listed block.json files, plugin headers, package.json files, and src files, then review the proposed PR sequence and the build-freshness check from #149. Treat each concern as a separate focused change; done means the affected examples are normalized, rebuilt where required, and editor-bindings is included in release zips without changing the stated out-of-scope areas.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, release, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100